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

evalNWBin failed only with NW2 (with my app) [demo video included] #7547

Open josh83abc opened 4 years ago

josh83abc commented 4 years ago

Hello Roger!

Following this issue that you closed (https://github.com/nwjs/nw.js/issues/7331), I bring more info now.

I have updated my app recently with the latest NWJS (47.2) and I saw that I still get an error while loading my V8 snapshot with NW2! It only works with NW1 but since you plan to remove it, I have a problem :D

Error handling response: TypeError: Cannot read property 'createElement' of undefined at anonymous() at anonymous() at anonymous() at anonymous() at anonymous() at NWWindow.evalNWBinInternal (extensions::nw.Window:472:20) at NWWindow.evalNWBin (extensions::nw.Window:453:8) at chrome-extension://jklhobfmppcchocjfekhndilpodhlnob/release/background.js:4:6 at extensions::nw.Window:799:13

I made a video to show the problem here : https://you.dj/evalbin_nw2_bug.mp4

Also here is the test project used in the video : https://you.dj/evalbin_nw2_bug.zip

Image of the error : https://you.dj/evalbin_nw2_bug.png

As I said in the video, I tried to do a simple code snippet but I didn't get this error. The error is only with with my app. Since my app code is quite large, it is hard to identify the line of code which triggers the evalnwbin error, but I assume you can debug better than me.

Thanks a lot!

josh83abc commented 4 years ago

Pin to Remove NW1 mode #7230

rogerwang commented 4 years ago

I'm trying to reproduce this with your sample. How did you got myscript.bin? Can you provide the source code of it?

rogerwang commented 4 years ago

close until more information is available.

josh83abc commented 4 years ago

Hello Roger! sorry I didn't see your question in time, please don't close my point for the second time haha :)

Have you been able to reproduce the problem? What does the crash trace says?

myscript.bin is... well my app javascript code that I compiled with NWJC. Here is the code of the app : https://you.dj/myscript.js, which is also a webapp that you can have access here : https://you.dj

It is plain vanilla javascript, no asm.js or wasm but I am using web workers. Also it is pretty small (600kB)

ps : all names of the variables/functions are obfucated because it is not an "open source" app my personal email : erik@you.dj

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.