question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect - socket hang up

See original GitHub issue

Emulator v3.5.35

I cannot connect to the emulator using localhost:3979/api/messages. My experiences are similar to #401 except the error message in my case is “POST socket hang up”. I am also behind a company firewall using a .pac file.

I have tried using 127.0.0.1:3979 which gives the same socket hang up error. Also tried https://localhost:3979/api/messages but this gives the error shown below.

Opening localhost:3979/api/messages in a browser gives me the same error as #401

<Error>
<Message>
The requested resource does not support http method 'GET'.
</Message>
</Error>

The interesting thing is that the emulator works ok on my old development PC at work. I ensured that nodejs was the latest LTS on both PCs but no joy. socket hang up error https

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
tonyanzianocommented, Apr 16, 2020

Hi @manutero ,

I’m sorry that you are not satisfied with the state of this issue.

It is very difficult for us to ensure that the Emulator works for every possible network configuration that our users may be behind especially when including unknowns like corporate firewalls and proxies.

We have logic in the Emulator that checks the HTTPS_PROXY and NO_PROXY environment variables before sending out any requests to the bot. HTTPS_PROXY dictates the proxy server that outgoing network traffic must travel through before reaching the destination, and NO_PROXY is a list of domains for which the proxy can be bypassed. Feel free to check #1950 or this source for more context.

I would recommend setting those before using the Emulator if you are behind some sort of proxy or corporate firewall.

0reactions
tonyanzianocommented, Apr 23, 2021

Hi @NereaCabiedasMoreno ,

Can you clarify a few things for me just so I understand your issue?

  1. Is your bot running locally on your machine or is it running on an exposed VM / server somewhere?
  2. You said you were able to talk to the bot from the Emulator. Was the URL you entered into the Emulator a localhost URL or some public web URL?
Read more comments on GitHub >

github_iconTop Results From Across the Web

NodeJS - What does "socket hang up" actually mean?
It means that socket does not send connection end event within the timeout period. If you are getting the request for cheerio via...
Read more >
Could not get any response socket hang up - Help - Postman
This issue primarily appears to be due to the proxy settings as the endpoint you are trying to access isn't publicly accessible. Check...
Read more >
NodeJS - What does socket hang up actually mean - Edureka
When a socket hang up is thrown, one of two things happens: When you're a customer, When you send a request to a...
Read more >
502 Bad Gateway - Socket hang up | Apigee Edge
The error code [socket hang up][ECONNRESET] indicates that the target server has closed the connection with Edge Microgateway. This can be searched in...
Read more >
How to handle a socket hang up error in Node.js usually - Quora
Socket hang up error are usually errors when requests coming to your server are more than it can handle. This might be b...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found