NWJS app crashing because of website console errors

Viewed 149

I've a NW.JS desktop app keeps crashing because of webpage errors. I'm trying to open this webpage inside my app - URL

As soon as the pages get loaded my app starts to crash with the following error:

[3491:775:0210/215448.347299:FATAL:native_extension_bindings_system.cc(214)] Check failed: schema. arcAppsPrivate
0   nwjs Framework                      0x000000011243a239 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14936185
1   nwjs Framework                      0x000000011239a8f3 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14282547
2   nwjs Framework                      0x00000001123ad73f v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14359935
3   nwjs Framework                      0x00000001123ae5ee v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 14363694
4   nwjs Framework                      0x0000000111ad1838 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5070456
5   nwjs Framework                      0x0000000111a9900a v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4838986
6   nwjs Framework                      0x0000000111a98f7d v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 4838845
7   nwjs Framework                      0x0000000111ad4de8 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5084200
8   nwjs Framework                      0x0000000111ad48b3 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5082867
9   nwjs Framework                      0x0000000111ad4253 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5081235
10  nwjs Framework                      0x0000000111ad447f v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 5081791
11  nwjs Framework                      0x0000000110f02f73 v8::internal::FixedArray::SetAndGrow(v8::internal::Isolate*, v8::internal::Handle<v8::internal::FixedArray>, int, v8::internal::Handle<v8::internal::Object>) + 1763
12  nwjs Framework                      0x0000000110f02321 v8::internal::Object::GetProperty(v8::internal::LookupIterator*, bool) + 3041
13  nwjs Framework                      0x0000000110f01814 v8::internal::Object::GetProperty(v8::internal::LookupIterator*, bool) + 212
14  nwjs Framework                      0x0000000111048bf5 v8::internal::Runtime::GetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool*) + 181
15  nwjs Framework                      0x000000011104f103 v8::internal::Runtime::DefineObjectOwnProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) + 13571
16  ???                                 0x0000003707f0a8f8 0x0 + 236356413688
17  ???                                 0x0000003707fa17b6 0x0 + 236357031862
18  ???                                 0x0000003707e8c862 0x0 + 236355897442
Task trace:
    0   nwjs Framework                      0x0000000115920992 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 70406098
1   nwjs Framework                      0x00000001125fe106 v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Heap*) + 16787270
IPC message handler context: 0x95373B38
Crash keys:
    "discardable-memory-free" = "2715648"
"discardable-memory-allocated" = "4194304"
"view-count" = "3"
"extension-1" = "jhedmmohalmhagooekjmhcjkphpnfmfa"
"num-extensions" = "1"
"blink_scheduler_async_stack" = "0x115920992 0x1125FE106"
"v8_code_space_firstpage_address" = "0x3700000000"
"v8_map_space_firstpage_address" = "0x3708180000"
"v8_ro_space_firstpage_address" = "0x3708000000"
"v8_isolate_address" = "0x7ff2f8c44000"
"variations" = "f475deb0-f475deb0,313957be-3ef44cd2,7e184ca7-2ec1a7e,60c843ad-3f4a17df,3fa8d059-3fa8d059,3c98d047-3f4a17df,8950ab95-3f4a17df,6cbcf5b7-3f4a17df,4701a278-3f4a17df,4749874c-a300a3e6,65570806-377be55a,6aa15a86-9d8c1aae,8e3b682d-3f4a17df,722b8030-3f4a17df,3042ad4b-ad2fa222,e4a357e9-3f4a17df,3fd33f16-fa281276,5252c71-3f4a17df,e79de56c-dee0823,8bccc03b-3f4a17df,178e8b37-3f4a17df,facdb7bf-3f4a17df,69d4ebd5-3f4a17df,9e5c75f1-30e1b12b,255dfea8-cf12f279,a083757a-d6a08b38,e4cbd6c7-3f4a17df,f7a3ec9-bd336006,3487aa71-84708353,23a898eb-fc93cf74,d3566fbd-c6f74b94,4ea303a6-3f4a17df,7048821f-7b0f7072,ef4764d7-c9f4d4ef,931c5f72-3f4a17df,ade3efeb-e1cc0f14,32d6b1fe-3f4a17df,ae82076d-3f4a17df,17b84626-3f4a17df,8d7344de-3f4a17df,1bb6a450-3f4a17df,3e7d7783-f38a9353,90a7075b-725c8fbe,1d606bb5-8d14c5d8,a0da97d6-3f4a17df,3b96a1d-3f4a17df,248e3a0-3f4a17df,dba92675-f23d1dea,5306c29b-9cbf73ff,f8a7f5e4-d6a08b38,e87da360-3f4a17df,39ec51c3-572726d7,77e44b8e-3f4a17df,6c5f69af-3f4a17df,bef5c006-3f4a17df,fc7e4d22-3f4a17df,7638c831-857014ec,a112f012-3f4a17df,6e08fc3e-3f4a17df,8470b833-3f4a17df,6be2e990-3f4a17df,47d92407-5b5edf5b,4b9a5bc0-efbbc50a,49a20295-49a20295,f2cb61f-3f4a17df,8c8d8faf-3f4a17df,727723f1-40193c20,b012722b-3f4a17df,d8692482-fe3984ae,29c62d4-3f4a17df,7760b5b2-3f4a17df,ad4acdda-3f4a17df,234de0a0-ace4e138,b1ceb06f-3f4a17df,ca5a2953-ff983c32,4e3ec83a-e4938e2c,7f655da7-3f4a17df,248c3fbd-3f4a17df,6cb5e962-3f4a17df,bf4029fe-1776d9e,6a5f15b-3f4a17df,61a655b5-3f4a17df,54410569-3f4a17df,6aa685f2-dcaf2061,f48c01d3-6eb2bd2b,89a16501-3f4a17df,"
"num-experiments" = "86"
"switch-21" = "--user-data-dir=/path/temp/userdatadir/profile2"
"switch-20" = "--user-data-dir=/path/temp/userdatadir/profile2"
"switch-19" = "--disable-gpu"
"switch-18" = "--field-trial-handle=1718379636,962445429152936292,7087525159415"
"switch-17" = "--shared-files"
"switch-16" = "--launch-time-ticks=8302334130"
"switch-15" = "--renderer-client-id=6"
"switch-14" = "--enable-main-frame-before-activation"
"switch-13" = "--enable-gpu-memory-buffer-compositor-resources"
"switch-12" = "--enable-zero-copy"
"switch-11" = "--num-raster-threads=4"
"switch-10" = "--lang=en-GB"
"switch-9" = "--disable-gpu-compositing"
"switch-8" = "--no-zygote"
"switch-7" = "--file-url-path-alias=/gen=/path/software/nwjs-sdk-"
"switch-6" = "--no-sandbox"
"switch-5" = "--display-capture-permissions-policy-allowed"
"switch-4" = "--extension-process"
"switch-3" = "--nwjs"
"switch-2" = "--nwapp-path=/path/projects/soft-v2/nw"
"switch-1" = "--user-data-dir=/path/temp/userdatadir/profile2"
"num-switches" = "24"
"osarch" = "x86_64"
"pid" = "3491"
"ptype" = "renderer"

    [0210/215448.351355:WARNING:process_memory_mac.cc(93)] mach_vm_read(0x7ffeebe70000, 0x2000): (os/kern) invalid address (1)
    [3486:12803:0210/215448.434605:ERROR:ssl_client_socket_impl.cc(995)] handshake failed; returned -1, SSL error code 1, net_error -200
    [3486:18691:0210/215448.806969:WARNING:sqlite_persistent_store_backend_base.cc(171)] Failed to post task from FlushAndNotifyInBackground@net/extras/sqlite/sqlite_persistent_store_backend_base.cc:219 to client_task_runner_.
    [3486:18691:0210/215448.807044:WARNING:sqlite_persistent_store_backend_base.cc(171)] Failed to post task from FlushAndNotifyInBackground@net/extras/sqlite/sqlite_persistent_store_backend_base.cc:219 to client_task_runner_.
    [3475:775:0210/215448.857362:WARNING:pref_notifier_impl.cc(40)] Pref observer for media_router.cast_allow_all_ips found at shutdown.

There's a similar issue already open - URL

  1. I tried upgrading/downgrading NWJS version.

  2. Tried passing the flags suggested in one of the comments of the github issue

  3. Tried adding try catch to window open like below:

    try { nw.Window.open(url); } catch(err) { log.info("Got error") }

  4. Tried different OS (Mac & Windows)

  5. It crashes with both 32 Bit NWJS and 64 Bit. Tried both of them.

But nothing is working.

However, another page link of the same website is working, which does not have console errors and much content. URL

Need help in understanding the problem and fixing it.

Also, I'm surprised as well, since a webpage can cause the NWJS desktop app to crash.

1 Answers

I could be wrong, but I think the feature you're looking for is:

nw.Shell.openExternal('https://seller.flipkart.com/sell-online');

That page just looks like a normal website, not a desktop app that would need access to Node.js. So you can just use nw.Shell.openExternal to open the page in the user's default browser. For security reasons, it's best to avoid using node-remote unless you are running a local webserver and pointing it to "http://localhost:8000" (or whatever port).

Related