Skip to content

Update to NW.js v0.46.0 to fix GitLab sign in

Eric Eastwood requested to merge 289-update-nw.js-0.46.0 into master

Update to NW.js v0.46.0 to fix GitLab sign in

NW.js v0.46.0 uses Chromium 83.0.4103.61

Previously, we were using NW.js v0.30.2 which uses Chromium 66.0.3359.139. When you try to sign in to GitLab on Chromium 66.0.3359.139, GitLab responds with a 422 The change you requested was rejected. error. More context in https://gitlab.com/gitlab-org/gitter/desktop/-/issues/289#note_354190666

GitLab only officially supports the current and previous major version of browsers, https://docs.gitlab.com/ee/install/requirements.html#supported-web-browsers

Fix https://gitlab.com/gitlab-org/gitter/desktop/-/issues/289

Dev notes

npm start -- --remote-debugging-port=1234 --log-level=trace

NW.js v0.46.0

$ process.versions
{
	ares: "1.16.0"
	brotli: "1.0.7"
	chromium: "83.0.4103.61"
	icu: "65.1"
	llhttp: "2.0.4"
	modules: "83"
	napi: "6"
	nghttp2: "1.40.0"
	node: "14.2.0"
	node-webkit: "0.46.0"
	nw: "0.46.0"
	nw-commit-id: "e2e639f-82dea33-5ca5d17-4f50402"
	nw-flavor: "sdk"
	openssl: "1.1.1g"
	unicode: "12.1"
	uv: "1.37.0"
	v8: "8.3.110.9"
	zlib: "1.2.11"
}

Getting gulp to work with Node.js v10. Update natives dependency in package-lock.json to 1.1.6

Errors

Here are some known errors in the app:

Windows 10

This error doesn't seem to affect things. https://github.com/nwjs/nw.js/issues/7300 tracks the problem

Unchecked runtime.lastError: The context from which the function was called did not have an associated app window.

I assume this is related to the first error

Unchecked runtime.lastError: cannot find browser window

Doesn't seem to affect things. Windows still close and open (like the login and loggedin views)

Unchecked runtime.lastError: No window with id: 15.

macOS

nw-builder failing to build win32 on macOS: https://github.com/nwjs-community/nw-builder/issues/528

Error: spawn Unknown system error -86
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at spawn (child_process.js:551:9)
    at module.exports (/Users/eric/Documents/gitlab/gitter-desktop/node_modules/nw-builder/node_modules/rcedit/lib/rcedit.js:47:15)
   ...

Linux (Ubuntu 18.04)

Need to run apt-get install libatomic1

[16093:16093:0605/174259.647732:FATAL:nw_content_renderer_hooks.cc(53)] Failed to load node library (error: libatomic.so.1: cannot open shared object file: No such file or directory)
#0 0x7fd530d2eeb9 (/home/eric/Documents/gitlab/desktop/node_modules/nw/nwjs/lib/libnw.so+0x45daeb8)

[16096:16096:0605/174259.649539:FATAL:nw_content_renderer_hooks.cc(53)] Failed to load node library (error: libatomic.so.1: cannot open shared object file: No such file or directory)
#0 0x7f537ae94eb9 (/home/eric/Documents/gitlab/desktop/node_modules/nw/nwjs/lib/libnw.so+0x45daeb8)

Linux (Ubuntu 20.04)

The main problem I was running into was that I forgot to copy over nwapp/oauth.json so the login view wouldn't show


You can ignore these errors, the app will run fine with them.

6789:6789:0605/190726.139257:ERROR:edid_parser.cc(102)] Too short EDID data: manufacturer id

DevTools listening on ws://127.0.0.1:1234/devtools/browser/08ee6ba2-727a-42f7-920e-1c9a9511f6ea
[6819:6819:0605/190726.636324:ERROR:viz_main_impl.cc(152)] Exiting GPU process due to errors during initialization

TODO

  • Test on Windows
  • Test on Linux (Ubuntu)
  • Test on macOS

Testing strategy

  1. npm install
  2. npm start -- --remote-debugging-port=1234 --log-level=trace
  3. See if the apps runs and you can sign in
Edited by Eric Eastwood

Merge request reports