nwjs / nw.js

Call all Node.js modules directly from DOM/WebWorker and enable a new way of writing applications with all Web technologies.
https://nwjs.io
MIT License
40.39k stars 3.88k forks source link

Signal app does not get rendered #5528

Closed onny closed 6 years ago

onny commented 7 years ago

Hey, I'm using ArchLinux x64 with the latest version of nwjs (0.19) and signal (0.27). Signal is a Chrome app for secure messaging and it worked fine with nwjs in previous version.

In the registration process window, everything is fine: 2016-12-07-201924_swaygrab After that, the message and contact list window doesn't get rendered: 2016-12-07-202504_swaygrab

Is there a way to debug this? Can I switch to another rendering engine for testing purposes?

Best regards, Jonas

rogerwang commented 7 years ago

Does it happen with 0.18.8?

On Thu, Dec 8, 2016, 3:27 AM Jonas Heinrich notifications@github.com wrote:

Hey, I'm using ArchLinux x64 with the latest version of nwjs (0.19) and signal (0.27). Signal https://github.com/WhisperSystems/Signal-Desktop is a Chrome app for secure messaging and it worked fine with nwjs in previous version.

In the registration process window, everything is fine: [image: 2016-12-07-201924_swaygrab] https://cloud.githubusercontent.com/assets/757752/20983020/30bac792-bcbb-11e6-87ad-30b34f466fd5.png After that, the message and contact list window doesn't get rendered: [image: 2016-12-07-202504_swaygrab] https://cloud.githubusercontent.com/assets/757752/20983040/409b5744-bcbb-11e6-8a1a-34526e62617c.png

Is there a way to debug this? Can I switch to another rendering engine for testing purposes?

Best regards, Jonas

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nwjs/nw.js/issues/5528, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKGGW6F5CrIox8fyZ8vUUCDLqTtdBD4ks5rFwiPgaJpZM4LG_-f .

onny commented 7 years ago

The bug was introduced in version 0.17.4 and since then not fixed. With version 0.17.3: 2016-12-08-133726_swaygrab Version 0.17.4: 2016-12-08-133752_swaygrab So maybe I have to further git bisect the issue?!

rogerwang commented 7 years ago

@onny No need to bisect, thanks. We'll try to fix it here.

xzhan96 commented 7 years ago

@onny Does the app can be launched in Ubuntu? I got the error "Failed to load extension from: ... Signal-Desktop.Localization used, but default_locale wasn't specified in the manifest" when launching it.

onny commented 7 years ago

This should work:

wget https://github.com/WhisperSystems/Signal-Desktop/archive/v0.27.0.tar.gz
tar xvf v0.27.0.tar.gz
cd Signal-Desktop-0.27.0
npm install
node_modules/grunt-cli/bin/grunt
nw ../Signal-Desktop-0.27.0

In ArchLinux I need following packages as make dependency:

xzhan96 commented 7 years ago

@onny I always got error as below:

$ npm install npm WARN signal-desktop@0.0.0 No license field. $ node_modules/grunt-cli/bin/grunt ... Running "copy:src" (copy) task Warning: Error while processing "js/expire.js" file. Use --force to continue. Aborted due to warnings.

My sass version is Sass 3.4.23 and ruby is ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

onny commented 7 years ago

Thanks @xzhan96 for helping out! For me this is just a warning which I can ignore. Here's a setup instruction for Ubuntu x86_64 16.10:

sudo aptitude install npm ruby-sass nodejs-legacy
cd /tmp
wget "https://github.com/WhisperSystems/Signal-Desktop/archive/v0.27.0.tar.gz"
tar xvf v0.27.0.tar.gz
cd Signal-Desktop-0.27.0
npm install
node_modules/grunt-cli/bin/grunt
cd /tmp 
wget "https://dl.nwjs.io/v0.19.3/nwjs-v0.19.3-linux-x64.tar.gz"
tar xvf nwjs-v0.19.3-linux-x64.tar.gz
nwjs-v0.19.3-linux-x64/nw Signal-Desktop-0.27.0

Unfortunately I get another error message there, I wans't able to fix yet:

Failed to load extension from: /tmp/Signal-Desktop-0.27.0. Localization used, but default_locale wasn't specified in the manifest.
xzhan96 commented 7 years ago

@onny you also can't launch the Signal application in Ubuntu?

onny commented 7 years ago

Nope in Ubuntu I cannot start it yet :( This might be related to the npm and ruby versions Ubuntu is using.

onny commented 7 years ago

Oh sorry I was wrong. Now it is working! This instruction is working for Ubuntu x86_64 16.10:

sudo aptitude install npm ruby-sass nodejs-legacy
cd /tmp
wget "https://github.com/WhisperSystems/Signal-Desktop/archive/v0.27.0.tar.gz"
tar xvf v0.27.0.tar.gz
cd Signal-Desktop-0.27.0
npm install
node_modules/grunt-cli/bin/grunt
cd /tmp 
wget "https://dl.nwjs.io/v0.19.3/nwjs-v0.19.3-linux-x64.tar.gz"
tar xvf nwjs-v0.19.3-linux-x64.tar.gz
nwjs-v0.19.3-linux-x64/nw Signal-Desktop-0.27.0/dist

You have to run the dist folder with nwjs, not the Signal source folder!

Now this issue is also reproducable with Ubuntu. Here's the screenshot: bildschirmfoto von 2016-12-28 12-39-21 The error Aborted due to warnings. in grunt can be ignored and is probably not related.

xzhan96 commented 7 years ago

@onny is this means the Signal works well? screenshot from 2016-12-29 10 49 15

You can see I am using the same nwjs version with you.

onny commented 7 years ago

No unfortunately you have to sign in into Signal. It is the main chat window which doesn't get rendered, see https://github.com/nwjs/nw.js/issues/5528#issuecomment-265730688

xzhan96 commented 7 years ago

Sorry, I was on holiday leave in the past three days. But I can't connect the server...

screenshot from 2017-01-03 09 52 46

onny commented 7 years ago

Ups, maybe you live in a country where it is censored? Then you might be relay on using a VPN connection?

xzhan96 commented 7 years ago

yes, but I already have proxy and can access google, youtube, wiki, etc.

rogerwang commented 7 years ago

@xzhan96 are you able to access the same URL used by the app (use --v=1 to see the URL in log). Some sites here are blocked by DNS poisoning (e.g. twitter) so it might be different with google, youtube and wikipedia.

xzhan96 commented 7 years ago

@rogerwang is this right? I can't get any log.. ./nwjs-v0.19.3-linux-x64/nw --v=1 Signal-Desktop-0.27.0/dist/

rogerwang commented 7 years ago

@xzhan96 http://docs.nwjs.io/en/latest/For%20Users/FAQ/#consolelog-doesnt-output-to-linux-terminal

xzhan96 commented 7 years ago

got the error message:

[15044:15044:0104/140246:INFO:CONSOLE(37881)] "WebSocket connection to 'wss://textsecure-service-ca.whispersystems.org:80/v1/websocket/provisioning/?agent=OWD' failed: WebSocket opening handshake timed out", source: chrome-extension://hcbcgommcbcbahdndhccilpnghopdoic/js/libtextsecure.js (37881) [15044:15044:0104/140246:INFO:CONSOLE(49)] "websocket closed", source: chrome-extension://hcbcgommcbcbahdndhccilpnghopdoic/js/debugLog.js (49) [15044:15044:0104/140256:INFO:CONSOLE(49)] "opening provisioning socket", source: chrome-extension://hcbcgommcbcbahdndhccilpnghopdoic/js/debugLog.js (49)

rogerwang commented 7 years ago

It looks more likely a network issue on your side @xzhan96 . Please see it to reproduce OP's issue.

xzhan96 commented 7 years ago

thanks a lot @rogerwang, I can reproduce now

xzhan96 commented 7 years ago

error message:

[26069:26069:0109/135645:VERBOSE1:dispatcher.cc(442)] Num tracked contexts: 2 [26036:26036:0109/135645:INFO:CONSOLE(753)] "Uncaught TypeError: Cannot read property 'Window' of undefined", source: extensions::nw.Window (753) [26036:26036:0109/135645:INFO:CONSOLE(49)] "open inbox", source: chrome-extension://hcbcgommcbcbahdndhccilpnghopdoic/js/debugLog.js (49) [26036:26036:0109/135645:INFO:CONSOLE(49)] "TypeError: Cannot read property 'Window' of undefined", source: chrome-extension://hcbcgommcbcbahdndhccilpnghopdoic/js/debugLog.js (49) [26036:26036:0109/135645:INFO:CONSOLE(206)] "Uncaught TypeError: Cannot read property 'Window' of undefined", source: extensions::app.window (206)

xzhan96 commented 7 years ago

it's related with #5294

onny commented 7 years ago

But this bug doesn't seem to be fixed yet?

xzhan96 commented 7 years ago

yes, knows the reason, working on how to fix..

onny commented 7 years ago

Bug still present in signal 0.28 and nwjs 0.20!

GnorTech commented 7 years ago

@onny will see to fix it in 0.20.2. Thanks for your patience. (we just tagged the 0.20.1 release for chromium 56.0.2924.87 update).

GnorTech commented 7 years ago

@xzhan96 since this bug is impacting users and need to be fixed soon. I'll follow up with your work. Thanks.

GnorTech commented 7 years ago

@onny the issue is fixed in git and can be downloaded via http://dl.nwjs.io/live-build/02-06-2017/nw20-3567769-e9d818b-a2ef613-1f1f729/v0.20.2/

Sorry for the delay due to the holiday here.

onny commented 7 years ago

Unfortunately this issue still appears on other platforms. One person reported to me that this bug still occours on KDE Linux desktop and I was able to reproduce it on Windows 7 (x64). Here's how to setup nwjs and Signal on Windows:

After starting Signal app with nwjs, it looks like this: signal_bugreport

rogerwang commented 7 years ago

@Christywl please verify this first.

Christywl commented 7 years ago

npm install fails on my Windows, so I try the precompiled package https://nextcloud.project-insanity.org/index.php/s/2HEUJ4MyxUpN9di, Signal app with a white screen opens and some errors are in the devtools console: 5528-1

Windows 10/nwjs-sdk-v0.21.3

onny commented 7 years ago

Bug is still present in:

I managed to "compile" the signal app on windows. I guess the problem here was that WinRAR couldn't extract the signal archive completely because it contained symlinks. I had to run WinRAR as administrator to extract everything. signal_bugreport Even though there's still an error at the end, signal app should run fine with nwjs :(

Christywl commented 6 years ago

@onny, does this issue still reproduce in your device? I still can't make it work on my device. Some errors occur when running 'grunt -f'.

Running "concat:components" (concat) task
File js/components.js created.

Running "concat:libtextsecurecomponents" (concat) task
File libtextsecure/components.js created.

Running "concat:test" (concat) task
File test/test.js created.

Running "concat:libtextsecure" (concat) task
File js/libtextsecure.js created.

Running "concat:libtextsecuretest" (concat) task
File libtextsecure/test/test.js created.

Running "sass:stylesheets" (sass) task
Error: Invalid CSS after "...ntlTelInput.css": expected "{", was ""
        on line 1 of stylesheets/_intlTelInput.scss
        from line 2 of stylesheets/options.scss
  Use --trace for backtrace.
Warning: Exited with error code 13 Used --force, continuing.
Error: Invalid CSS after ".../demo/emoji.css": expected "{", was ""
        on line 1 of stylesheets/_emoji.scss
        from line 13 of stylesheets/manifest.scss
  Use --trace for backtrace.
Warning: Exited with error code 13 Used --force, continuing.

Use your precompiled package, it displays a white screen as my previous comment said.

onny commented 6 years ago

Sorry @Christywl, I'm not using the app anymore, can't test it :(