nw.js icon indicating copy to clipboard operation
nw.js copied to clipboard

Non-SDK nw.js fails on `showDevTools`

Open AlttiRi opened this issue 2 years ago • 5 comments

I use the follow code

nw.Window.get().showDevTools();

it works fine with SDK version of nw.js, but if I open the project with non-SDK one, the window will close immediately and the nwjs process with run in the background. I need to terminate it manually with Task Manager.


  • Win 10
  • nwjs-v0.71.1-win-x64

AlttiRi avatar Dec 27 '22 13:12 AlttiRi

The non-SDK version does not have DevTools which is why the app is crashing. Here's a link to the docs: https://nwjs.readthedocs.io/en/latest/For%20Users/Debugging%20with%20DevTools/

ayushmanchhabra avatar Dec 28 '22 09:12 ayushmanchhabra

I have seen messages about it. I think it should not crash the application. Just throws an error in showDevTools function. Or just do nothing.

AlttiRi avatar Dec 28 '22 10:12 AlttiRi

Good idea!

@rogerwang is there a way to call process.versions['nw-flavor'] inside this function?

ayushmanchhabra avatar Dec 28 '22 19:12 ayushmanchhabra

Hi all!

@rogerwang , any thoughts on this thread? Currently, prominent sites like ChatGPT are using Cloudflare's CAPTCHA challenge and it fails getting stuck in a loop. Since the site is a hot potato right now, it's creating a lot of noise out there. Any chance you can help us here?

Thanks!

nicolasgarfinkiel avatar Jul 13 '23 15:07 nicolasgarfinkiel

Dev Tools only works on SDK version

npm install -g nw@sdk

JTorresConsulta avatar Jan 09 '24 22:01 JTorresConsulta