10 Feb 2022 - Forge CLI version 3.0.0

Have you tried deactivating snapshots in the manifest?

app:
  runtime:
    snapshots: false

this may be a temporary solution.

1 Like

I second that. This might be the same issue as here: Temporary issues with deploying and listing Forge apps

Thanks @a.yessipovskiy!

You right disabling snapshots works brilliantly! :wink: :raised_hands:

Glad to hear that worked for you. The question is only what are the drawbacks of deactivating the snapshots. I would really like to have a comment from Atlassian on that.

1 Like

Update… No development possible on Forge since CLI 3.0.0 doesn’t work and running previous CLI versions is not possible

Disabling the snapshots allows me to run “forge deploy” successfully.

However the app doesn’t load anymore:

Looking at the “forge tunnel” logs these are the errors:

=== Bundling code...
App code bundled.
App code reloaded.

Listening for requests...

Received proxy request. Serving file index.html for resource main from specified address http://localhost:8002

invocation: a59d61d7fe519a21 index.handler

invocation: e5a413353a13c50e index.handler

invocation: d963e8c6a7e21e26 index.handler

invocation: cb8290534293955c index.handler
ERROR   11:25:47.838  a59d61d7fe519a21  TypeError: out is not a constructor
    at index.js:34286:18
    at index.js:35210:3
    at index.js:35215:12
    at (<isolated-vm boundary>)
    at compileAndRun (/tunnel/node_modules/@forge/runtime/out/sandbox-isolate/index.js:71:22)
ERROR   11:25:47.879  e5a413353a13c50e  TypeError: out is not a constructor
    at index.js:34286:18
    at index.js:35210:3
    at index.js:35215:12
    at (<isolated-vm boundary>)
    at compileAndRun (/tunnel/node_modules/@forge/runtime/out/sandbox-isolate/index.js:71:22)

Can someone from Atlassian comment on this @MatthewFreeman @XavierCaron maybe?

Why can’t I run CLI 2.0.7 while these problems are being resolved?


Warning: Your version of Forge CLI is out of date. We recommend you update to the latest version to get the latest features and bug fixes.

Run npm uninstall -g @forge/cli followed by npm install -g @forge/cli to update from version 2.0.7 to 3.0.0.

Deploying your app to the development environment.

Press Ctrl+C to cancel.

Running forge lint...

1 issue found. Run forge lint to review the warnings.

Error: Your version of Forge CLI is no longer supported.

Run npm uninstall -g @forge/cli followed by npm install -g @forge/cli to update to the latest version.```
2 Likes

forge tunnel does not work with runtime snapshots property true

Get this:

=== Bundling code...
App code bundled.

=== Snapshotting functions...

#
# Fatal error in , line 0
# Check failed: (backing_store) != nullptr.
#
#
#
#FailureMessage Object: 0x7fff543be400
 1: 0xaa8321  [node]
 2: 0x1a46f04 V8_Fatal(char const*, ...) [node]
 3: 0x11108ec bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
 4: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
 5: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
 6: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
 7: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
 8: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
 9: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
10: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
11: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
12: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
13: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
14: 0x1110bd6 v8::internal::Deserializer::ReadObject(v8::internal::SnapshotSpace) [node]
15: 0x1110446 bool v8::internal::Deserializer::ReadData<v8::internal::FullMaybeObjectSlot>(v8::internal::FullMaybeObjectSlot, v8::internal::FullMaybeObjectSlot, v8::internal::SnapshotSpace, unsigned long) [node]
16: 0x1110a34 v8::internal::Deserializer::DeserializeDeferredObjects() [node]
17: 0x110af6c v8::internal::ContextDeserializer::Deserialize(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSGlobalProxy>, v8::DeserializeInternalFieldsCallback) [node]
18: 0x110b774 v8::internal::ContextDeserializer::DeserializeContext(v8::internal::Isolate*, v8::internal::SnapshotData const*, bool, v8::internal::Handle<v8::internal::JSGlobalProxy>, v8::DeserializeInternalFieldsCallback) [node]
19: 0x1131b6a v8::internal::Snapshot::NewContextFromSnapshot(v8::internal::Isolate*, v8::internal::Handle<v8::internal::JSGlobalProxy>, unsigned long, v8::DeserializeInternalFieldsCallback) [node]
20: 0xe32d98 v8::internal::Genesis::Genesis(v8::internal::Isolate*, v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, unsigned long, v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) [node]
21: 0xe33148 v8::internal::Bootstrapper::CreateEnvironment(v8::internal::MaybeHandle<v8::internal::JSGlobalProxy>, v8::Local<v8::ObjectTemplate>, v8::ExtensionConfiguration*, unsigned long, v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) [node]
22: 0xbcfa8e v8::NewContext(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, unsigned long, v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) [node]
23: 0xbd00a4 v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, v8::MaybeLocal<v8::ObjectTemplate>, v8::MaybeLocal<v8::Value>, v8::DeserializeInternalFieldsCallback, v8::MicrotaskQueue*) [node]
24: 0x7f77edc31534 ivm::IsolateEnvironment::NewContext() [/tunnel/node_modules/@forge/isolated-vm/build/Release/isolated_vm.node]
25: 0x7f77edc326fd ivm::IsolateEnvironment::IsolateCtor(unsigned long, std::shared_ptr<v8::BackingStore>, unsigned long) [/tunnel/node_modules/@forge/isolated-vm/build/Release/isolated_vm.node]
26: 0x7f77edc60be9 ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>) [/tunnel/node_modules/@forge/isolated-vm/build/Release/isolated_vm.node]
27: 0x7f77edc68a45 ivm::ConstructorFunction<std::unique_ptr<ivm::ClassHandle, std::default_delete<ivm::ClassHandle> > (*)(v8::MaybeLocal<v8::Object>), &ivm::IsolateHandle::New>::Entry(v8::FunctionCallbackInfo<v8::Value> const&) [/tunnel/node_modules/@forge/isolated-vm/build/Release/isolated_vm.node]
28: 0xc272e5  [node]
29: 0xc278ef  [node]
30: 0xc27f16 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [node]
31: 0x1448ef9  [node]

What node version are you using?

@bentley this one:

% node --version
v12.22.9

:thinking: I’ve bumped mine back to that and can deploy without issue (with snapshots off and on). Though the app I have isn’t doing a ton.

Curious - does bumping node up to a recent version do anything? The documentation says that 10+ should be supported (and this CLI update should yell at you if using an unsupported version: Forge CLI will now display a warning when it is installed or used with an unsupported Node version. But worth giving it a try?

Ok, I had some changes in progress when I left yesterday, once I started again this morning I got the update CLI message - and was unable to run the app.

After reviewing the console logs it seems the problem is related the changes I had in progress and not the CLI. I will investigate further and confirm.

Thanks @bentley!

1 Like

We’re having this issue as well. Completely blocked with progressing updates for any of the Forge apps

2 Likes

Seems the problem is not on my end. I have updated node to:

node --version
v12.22.10

The problem occurs when the front end invokes the first back-end method. Console errors from the call:

readGameInfo error:  Error: There was an error invoking the function - Function with handler "index.handler" was not found
    at invoke (https://jira-frontend-static.prod.public.atl-paas.net/assets-brotli/async-forge-ui-iframe.250768f8bb4e02c9f60d.8.js:259:862)
    at async https://jira-frontend-static.prod.public.atl-paas.net/assets-brotli/async-forge-ui-iframe.250768f8bb4e02c9f60d.8.js:238:273

Error: There was an error invoking the function - Function with handler "index.handler" was not found
    at hn.error (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:19406)
    at Object.<anonymous> (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:27179)
    at JSON.parse (<anonymous>)
    at o (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:27038)
    at jn (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:27191)
    at Tn.u.on (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:31851)
    at Tn (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:31988)
    at https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:37974
    at Function.n.try (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:10458)
    at https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:37771
    at r (https://forge.cdn.prod.atlassian-dev.net/global-bridge.js:1:38023)
console.<computed> @ index.js:1

Notice - there are no changes in the manifest or the function being called from both sides - so it seems the problem is with CLI 3.0.0.

@bentley can you enable previous versions of CLI because all development is stopped since CLI 3.0.0 and it seems I am not the only partner experiencing this problem.

I’m getting warnings about the scopes I’m using are deprecated - but when I go and look at the documentation it refers to - they’re not… #confused

3 Likes

Hi @bjornbrynjar @biro, are you using npm or yarn to install the CLI? We are working to narrow down the cause of this issue.

1 Like

Hi everyone, we have removed the restriction forcing developers to use @forge/cli@3.0.0, we would love if anyone who faced issues with 3.0.0 could leave a detailed report on the feedback board.

2 Likes

Thanks @SamSmyth!

I am using npm. What else do you need?

%npm version
{
  npm: '6.14.16',
  ares: '1.18.1',
  brotli: '1.0.9',
  cldr: '37.0',
  http_parser: '2.9.4',
  icu: '67.1',
  llhttp: '2.1.4',
  modules: '72',
  napi: '8',
  nghttp2: '1.41.0',
  node: '12.22.10',
  openssl: '1.1.1m',
  tz: '2021a4',
  unicode: '13.0',
  uv: '1.40.0',
  v8: '7.8.279.23-node.56',
  zlib: '1.2.11'
}

v12.22.1 for my node version

@SamSmyth, just updated npm to the lastest version: ‘8.5.0’

Then I run:

forge uninstall
forge deploy
forge install

But got the same error in the tunnel console opening the app:

Listening for requests...

Received proxy request. Serving file index.html for resource main from specified address http://localhost:8002

invocation: 35d26027f52b7a47 index.handler

invocation: 274aef93b03458a6 index.handler

invocation: b16b30bdbdde3a6c index.handler

invocation: 02b398923039db26 index.handler
ERROR   08:02:29.674  b16b30bdbdde3a6c  TypeError: out is not a constructor
    at index.js:34276:18
    at index.js:35200:3
    at index.js:35205:12
    at (<isolated-vm boundary>)
    at compileAndRun (/tunnel/node_modules/@forge/runtime/out/sandbox-isolate/index.js:71:22)

Will create an issue in the feedback board shortly!

@SamSmyth here is the issue I created: [FRGE-612] - Ecosystem Jira

Cheers

2 Likes

Please refer to this post related to the issue