warn (proxy): Proxy Request failed - Error: socket hang up
See original GitHub issueI see the following when running angular scenario tests:
info (Chrome 22.0): Connected on socket id d3eUh0FBtoVaT-CdRlHB
Chrome 22.0: Executed 2 of 7
Chrome 22.0: Executed 3 of 7
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
Chrome 22.0: Executed 5 of 7
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
warn (proxy): Proxy Request failed - Error: socket hang up
Chrome 22.0: Executed 7 of 7 SUCCESS (1.134 secs / 0.988 secs)
You can use angular-phonecat to repro the issue.
I think that the issue is that the app initiates multiple requests per test that are proxied via the built in proxy. Most of the requests are for asset files (images) and some of these get handled by the proxy only after the test is done. At this point, the browser navigates (within the iframe) to a new page and cancels all the pending requests. Proxy then freaks out because it has all these requests mid-flight and issues a warning log.
Since this particular scenario is harmless, I would reclassify the log as debug
instead of warn
Issue Analytics
- State:
- Created 11 years ago
- Comments:5
Top 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 >NodeJS - What does socket hang up actually mean - Edureka
When you're a customer, When you send a request to a distant server as a client and don't get a response in 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 ...
Read more >How to handle a socket hang up error in Node.js usually - Quora
Socket hang up error is thrown in two cases. When you are a client & When you are a server/proxy When you, as...
Read more >UniversalPackages task fails with socket hang up error behind ...
ProxyUsername =undefined 2020-03-26T22:19:28.9720166Z ##[debug]Agent. ... cause=socket hang up 2020-03-26T22:21:14.2279347Z ##[debug]Error: tunneling socket ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just figured it out:
the
/base/
at the begging of the proxie values was what was missing for meI tried to be clever and map proxies to the regular node-paths conventions, but
./dir
caused the issue and/dir
without the dot fixed it for me.So I replaced:
to:
and Ta-Dah! the annoying message is gone.