--remote-debugging-port=9222 fails
pragma-git opened this issue · 6 comments
Bug
-
Bug Report
-
Feature Request
-
Successfully reproduced against the latest version of NW.js?
Current/Missing Behavior
Running nwjs sdk with --remote-debugging-port
fails to show up in Chrome url = http://localhost:9222/
The possibility to connect with Chrome is greatly missed, since this was my go-to way if the GUI failed to load.
Expected/Proposed Behavior
Opening in Chrome with http://localhost:9222/
used to work (see test with 0.49 below).
Additional Info
- Operating System:
MacOS - NW.js Version:
0.88.0, 0.85.0, 0.70 (but works in 0.49.0) - Repro Link:
- Code snippet:
- Works:
/Users/jan/Downloads/nwjs-sdk-v0.49.0-osx-x64/nwjs.app/Contents/MacOS/nwjs --remote-debugging-port=9222
- Fails:
/Users/jan/Downloads/nwjs-sdk-v0.85.0-osx-arm64/nwjs.app/Contents/MacOS/nwjs --remote-debugging-port=9222
- Fails:
/Users/jan/Downloads/nwjs-sdk-v0.85.0-osx-x64/nwjs.app/Contents/MacOS/nwjs --remote-debugging-port=9222
- Fails:
/Applications/nwjs-0.70.0.app/Contents/MacOS/nwjs --remote-debugging-port=9222
- Works:
- Crash report:
nwjs app runs nicely.
Later OSX arm64 versions have lot of log output with Rosetta but runs. The bug existed earlier 0.70 where it runs Rosetta nicely. So the issue is not related to that
We experience the same issue
We have the same issue with 0.88 and 0.87 on ubuntu22.04
I have to mention. We have experienced the same issue on 88, 87, 86. but not on 85.
We are running nwjs on linux
Steps to reproduce:
- Run nw with manifest configured as below (add the
--user-data-dir
flag after reading this article)
{
"name": "<any name>",
"main": "<any html or js file",
"chromium-args": " --user-data-dir=/home/<user>/testing --remote-debugging-port=http://localhost:9222/"
}
-
Open Chrome and navigate to
http://localhost:9222
. -
Observe message which says
Site can't be reached
andlocalhost refused to connect
.
I got it to work on MacOS nwjs SDK versions v85 and v89, following above comments and mentioned links.
AS BEFORE:
- Start as before (in this example, I stand in the folder containing package.json):
/Applications/nwjs.app/Contents/MacOS/nwjs --remote-debugging-port=9222 .
NEW:
-
Open Chrome browser, and type address
chrome://inspect/
-
Click the top-most
inspect
link on the screen shot. You may have to resize panes to get it looking as before
SUGGESTION:
May I suggest to add a helpful hint on how to connect with chrome, in the documentation https://docs.nwjs.io/en/latest/For%20Users/Debugging%20with%20DevTools/ ?
https://developer.chrome.com/docs/devtools/remote-debugging/local-server/
Article detailing port forwarding