blitz icon indicating copy to clipboard operation
blitz copied to clipboard

Starting inspector on 127.0.0.1:9229 failed: address already in use

Open reiwa opened this issue 2 years ago • 1 comments

What is the problem?

I read this document (https://blitzjs.com/docs/troubleshooting#chrome-devtools-server) and try to debug blitz app with DevTool, but this looks like it is not working correctly.

Starting inspector on 127.0.0.1:9229 failed: address already in use

Paste all your error logs here:

NODE_OPTIONS='--inspect' blitz dev
Debugger listening on ws://127.0.0.1:9229/5249c909-2ea6-432f-aa49-c0bf97f13e63
For help, see: https://nodejs.org/en/docs/inspector
Starting inspector on 127.0.0.1:9229 failed: address already in use

Paste all relevant code snippets here:

NODE_OPTIONS='--inspect' blitz dev

What are detailed steps to reproduce this?

  1. open termial
  2. run : NODE_OPTIONS='--inspect' blitz dev

Run blitz -v and paste the output here:

% blitz -v
macOS Monterey | darwin-arm64 | Node: v16.10.0

blitz: 0.42.0 (global)
blitz: 0.43.0 (local)

  Package manager: yarn 
  System:
    OS: macOS 12.0.1
    CPU: (8) arm64 Apple M1
    Memory: 308.72 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.10.0 - /opt/homebrew/bin/node
    Yarn: 1.22.10 - /opt/homebrew/bin/yarn
    npm: 7.24.0 - /opt/homebrew/bin/npm
    Watchman: Not Found
  npmPackages:
    @prisma/client: 3.3.0 => 3.3.0 
    blitz: 0.43.0 => 0.43.0 
    prisma: 3.3.0 => 3.3.0 
    react: alpha => 18.0.0-alpha-6c3dcc7a4-20211027 
    react-dom: alpha => 18.0.0-alpha-6c3dcc7a4-20211027 
    typescript: 4.4.4 => 4.4.4

Please include below any other applicable logs and screenshots that show your problem:

No console on DevTool:

Screen Shot 2021-11-18 at 7 21 49

Blitz.js in Thread section:

Screen Shot 2021-11-18 at 7 22 00

No Blitz application inside the Remote Target section:

Screen Shot 2021-11-18 at 7 21 01

reiwa avatar Nov 17 '21 22:11 reiwa

Thanks for reporting. It looks like this issue might be related: https://github.com/vercel/next.js/issues/11030, and we also pass the node_options to subprocesses (when I tried to run next binary with `NODE_OPTIONS='--inspect', the inspector started properly).

I guess that will be solved when we migrate out CLI package to nextjs fork: https://github.com/blitz-js/legacy-framework/issues/391.

beerose avatar Nov 19 '21 10:11 beerose

should be resolved with blitz 2.0

flybayer avatar Aug 29 '22 13:08 flybayer