-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when showing an alert #5282
Comments
After getting |
I have now tested with several more older versions:
|
@kohenkatz I can decode the dump file and locate the crash point. However I can't reproduce it. Could you post a sample app to reproduce the crash? If it's public website, a URL is sufficient. |
@ghostoy It's not a public site, but if you email me I'll give you access to it. (easiest way to prevent spam) |
@kohenkatz The mail to your address above was rejected by GMail because of domain name not found. Please simply send me a private mail of how to access your website (cong.liux at gmail.com). |
@ghostoy I sent you an email. |
@rogerwang The root cause is that background page was destroyed after a while when showing only remote page. The simplest way to trigger the crash is using following {
"name": "issue5282-remote-bg-gone",
"main": "https://jsfiddle.net/ghostoy/apsyrrxf/embedded/"
} |
@ghostoy Thank you |
@rogerwang I can confirm that it works. I'm curious if you can point to where in the code this was? |
I have tested this on Windows 10 x64 and MacOS (whatever the most recent is, I don't remember), in NW.js versions 0.17.0 and 0.14.7. All of those combinations have the following problem.
I have an application that is using NW.js to show a website to users who do not have Chrome installed on their machines. The website opens a WebSocket connection to another server. If the server closes the WebSocket, the website shows an
alert
, clears its session, and redirects the user back to the login page.When the
alert
is supposed to show, NW.js crashes with the following messages on the console:(The
range at 0xXXXX, size 0xXXX
numbers vary, but all the rest is the same.)For background, here's the (ES6 version of the) code for the WebSocket handler. The actual project uses a transpiled ES5 version because it has to run in browsers, but this should be all that is needed for illustration of the issue.
Here is the code where the crash occurs:
The crash happens just before the native WebSocketonclose
event would be fired - breakpoints in the DevTools show that the last incoming message is received and then the crash happens before the breakpoint onthis.emit('closed');
(insidethis._ws.onclose
) can be reached.The website works fine in Chrome, in all versions released in the last 8 months.
Here are some crash dumps: reports.zip
The text was updated successfully, but these errors were encountered: