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.31k stars 3.88k forks source link

binary protected js doesn't work when back or reload the page #5225

Open aarondiazr opened 8 years ago

aarondiazr commented 8 years ago

Hi everyone!

I have a problem with nw.Window.get().evalNWBin function, when the page loads for first time, my code works well, but when use window.history.back() or return to previous page, doesn't load again the protected binary....anyone can help me?

Thnx!!

ghostoy commented 8 years ago

I can confirm this issue.

XiaohuChen commented 7 years ago

this problem happens in LTS v0.14.7 too, nwjs-sdk-v0.14.7-win-ia32

XiaohuChen commented 7 years ago

when I rebuild the snapshot, it works well for one or two times when I reload the page, and the problem happens again

Asp3ctus commented 7 years ago

for me it also sometimes works some times not, like a lotery - the same snapshot, just restart the app, some times works sometime not

malacca commented 6 years ago

Has there been any movement on this? I can reproduce this issue

window v0.26.0 32bit and 64bit

refresh or history.back() , doesn't load again the protected binary

Asp3ctus commented 6 years ago

i had figured out that it doesn't work then dev tools are open - once you close them - it works again

TxAg12 commented 6 years ago

@Asp3ctus THANK YOU!

I spent hours. Probably 5 or so. Debugging this. I closed Dev Tools. Reload app. SUCCESS!!!!

Crazy. This should be in <h1 at the top of the protect code documentation.

danschumann commented 6 years ago

I spent hours too. This is ridiculous. There is nothing more frustrating than poking around in the dark. Distilling an app down to the most simple <html></html>, and having the most simple index.js of console.log('asdf'); document.write('plz'), and opening dev tools, running nw.Window.get().evalNWBin( null, 'bins/index1234.bin' ), and if you change the file name, it fails, so you know it's opening hte bin, BUT NOTHING HAPPENS.

Put a comment saying DEV TOOLS CANNOT BE OPEN, seriously.

sebadorn commented 5 years ago

The issue with the open DevTools seems to be fixed. I tried it with NW.js 0.34.5 and 0.35.2 on macOS and it worked.