Skip to content

Update to nw@0.30.2

Eric Eastwood requested to merge feature/update-nw-js3-without-autoupdate into master

Successor of https://gitlab.com/gitlab-org/gitter/desktop/merge_requests/201


If you want to see the devtools, https://www.npmjs.com/package/nw#install-a-specific-build-type-of-nwjs

npm install nw --nwjs_build_type=sdk

If you want to see devtools console output in the CMD output, add --enable-logging


Update notes

  • Create new OAuth apps for all platforms with redirect_uri: https://gitter.im/login/desktop/callback
    • windows-desktop-prod-v4
    • osx-desktop-prod-v4
    • linux-desktop-prod-v4
  • Update nwapp/oauth.json with these new apps for builds

Todo/problems

  • Figure out why focus events aren't working, http://docs.nwjs.io/en/latest/References/Window/#event-focus
  • Should we wait for focus hooks to be fixed? https://github.com/nwjs/nw.js/issues/4601#issuecomment-386528893
    • No, we will always show notifications regardless of focus
  • "Developer Tools" menu option fails to open devtools
  • Running into an issue where the app crashes when you sign in (it works fine if you sign out then sign back in)
    • Reproduction steps:
      1. Start the app as signed out, npm start -- --base-url=http://localhost:5000 --faye-url=http://localhost:5000/bayeux --remote-debugging-port=1234
      2. Try signing in
      3. After pressing "Allow" on the decision screen the app will crash
      Uncaught
      sendRequestSync @ extensions::sendRequest:148
      (anonymous) @ extensions::nw.Window:160
      (anonymous) @ extensions::binding:64
      (anonymous) @ extensions::binding:377
      NWWindow @ extensions::nw.Window:182
      (anonymous) @ extensions::nw.Window:658
      (anonymous) @ extensions::binding:64
      (anonymous) @ extensions::binding:377
    • It seems to work just fine if when using gitter.im vs localhost:5000 🤷. I'll leave it for now

Notes

  • npm start -- --base-url=http://localhost:5000 --faye-url=http://localhost:5000/bayeux --update-url=http://localhost:5350 --remote-debugging-port=1234
  • npm start -- --remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose --enable-logging
  • Open already intalled app with args
    • Windows: "C:\Users\MLM\AppData\Local\Programs\Gitter\Gitter.exe" --remote-debugging-port=1234 --update-url=http://localhost:5350 --verbose --enable-logging
    • macOs: open /Applications/Gitter.app --args --remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose --enable-logging
    • Linux: /usr/local/bin/gitter --remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose --enable-logging
  • dataPath user data directory, https://github.com/nwjs/nw.js/wiki/App#datapath
    • Windows: C:\Users\MLM\AppData\Local\Gitter\User Data\Default\gitter_preferences.json

Closes https://gitlab.com/gitlab-org/gitter/desktop/issues/239, https://gitlab.com/gitlab-org/gitter/desktop/issues/231, https://gitlab.com/gitlab-org/gitter/desktop/issues/222, https://gitlab.com/gitlab-org/gitter/desktop/issues/150, https://gitlab.com/gitlab-org/gitter/desktop/issues/209

Edited by 🤖 GitLab Bot 🤖

Merge request reports