Debugger Not Working

Chrome is the latest version 65.0.3325.181

I’m still getting the same error when I try to open the debugging link:
Capture

with this being logged:

/etc/debugger/node_modules/.registry.npmjs.org/http-proxy/1.16.2/node_modules/http-proxy/lib/http-proxy/index.js:119
    throw err;
    ^

Error: socket hang up
    at createHangUpError (_http_client.js:331:15)
    at Socket.socketOnEnd (_http_client.js:423:23)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Is the intended action from the user to click Copy Debugger URL and paste it directly into that same tab’s address bar?

I don’t get this error, it’s very strange… can you send me the URL you are pasting as a PM? Not here, it has your token.

@etamponi I’m having a similar problem: Debugging connection was closed. Reason: WebSocket disconnected

image

This is what I did:

  • Start a new node/express project
  • Open the console to confirm pgrep -U app -c node outputs 1 (it does)
  • Open the debugger popup
  • Check pgrep -U app -c node again - now it outputs 2
  • Go to the chrome-devtools url in the debugger popup
  • Recieve Debugging connection was closed message

Ubuntu 16.04
Chrome Version 67.0.3396.99 (Official Build) (64-bit)

Logs:

⚡️🍫 Your app is listening on port 3000
node v8.11.3, with pnpm
Installing...
Resolving: total 49, reused 44, downloaded 0
Resolving: total 49, reused 49, downloaded 0, done
Total install time: 3975ms
🚝🕶 Your app is listening on port 1988
🐞 Debugger ready (https://glitch.com/faq#debugger). If the debugger does not open, check your pop-up blocker.

Any ideas? Running pgrep -U <user> -c node on my own machine gives me 0, in case that matters.

The output of 2 suggests you have more than one process running in parallel. We can only debug a single process. See here for the requirements: https://glitch.com/help/debugreq/

Thanks for your reply. Why would that be the case if I just created a brand new “hello world” project and tried to debug it? If it is possible, then I’m not 100% sure what you mean by running 2 processes in parallel. What could be causing that?

Thanks!

Ah, sorry I misread the stage at which the 2 response was received. However, I can’t reproduce the issue using a new hello-express app. Which ‘hello world’ project option did you select?

No worries! I selected node-app:

image

If you can’t reproduce it then perhaps I need to restart my machine. I would have done it already as a part of my standard “I have no idea what I’m doing” debug process, but I can’t do it right now because I’ve got a lot of thing open that I need to sort out.

FWIW, ultimately my issue was that uBlock Origin was interfering with the networking required to start the debugging session. Once I figured out which requests to whitelist, it started working again.

Thanks @noelleleigh! That fixed it for me (I’m also using uBlock Origin). @Gareth, I wonder if you could add a little “adblock detector” script and then show a warning on the page where the user copies the debugger url?

Thanks, we’ll look into that - in the mean time I’ve added it our list of problematic plugins: https://glitch.com/help/plugins/

Cheers. In the interests of helping users solve their problem themselves in the mean time, and for “searchability” it might be worth putting a note in the debugger help section too.

I’m also unable to start the debugger - my project’s outstanding-clam (a remix of the #Remix4Change template). The error I get is

Starting inspector on localhost:9200 failed: address not available

I did pgrep -U app -c node and it reports 2 processes. Which based on the discussion here seems like it’s a problem but I’m not sure what to do about it.

The recommendation is https://glitch.com/help/debugerror1/, but given the use of create-react-app I think you’d probably have to do more work than it’s worth. What’s the issue you’re having with the project?

Thanks, Gareth. The problem I was trying to debug is that it hangs with “loading …” - I couldn’t see any relevant messages in the logs. [There are a handful of lint warnings.]

Have you added your own credentials for the various APIs it uses yet?

Yes I have. That didn’t change the behavior.

Should we move this to another thread? It’s now about the app more than the debugger so might be confusing here.

1 Like

OK, here’s the new thread. From a debugger perspective, my takeaway is not to be optimistic about running the debugger on projects created with create-react-app :slight_smile:

Just a heads up that I’ve been getting this bug again for some projects:

/opt/debugger/node_modules/.registry.npmjs.org/http-proxy/1.16.2/node_modules/http-proxy/lib/http-proxy/index.js:119
throw err;
^
Error: socket hang up
at createHangUpError (_http_client.js:335:17)
at Socket.socketCloseListener (_http_client.js:376:25)
at Socket.emit (events.js:201:15)
at TCP.<anonymous> (net.js:586:12)

Not using an adblocker. Strange that it only happens for some projects.

Hey @joe would you be willing to share a project name (or a few) where you see this problem? I’d like to take a closer look in a Remix.

Hey!
I am getting the same error when trying to establish a socket connection using socket.io.

 New client: qa-HaytT16gIoPDxAAAA
    /opt/debugger/node_modules/.registry.npmjs.org/http-proxy/1.16.2/node_modules/http-proxy/lib/http-proxy/index.js:119
        throw err;
        ^
    Error: socket hang up
        at createHangUpError (_http_client.js:335:17)
        at Socket.socketCloseListener (_http_client.js:376:25)
        at Socket.emit (events.js:201:15)
        at TCP.<anonymous> (net.js:586:12)

Does anybody has a solution ? :smiling_face_with_three_hearts: