-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: socket hang up #369
Comments
Hey, thanks for the bug report - I think that's the same one as we're seeing internally. Two questions:
|
Hi there,
Kind Regards |
Oh jeez, it crashed? Sounds pretty serious. I'll take a look when I've got some free time |
Hey @torfeld6 and @mitchhentges , I just wanted to hop on and report that this exact same issue is happening on a Fedora 27 system too.
Thanks! |
Looking into this further, it seems like there's a very quick performance hit/leak once you visit more than a couple sites. My guess is that once the app hangs for long enough, whatever connection it was proxying gives up (and hangs up), and around that time the app crashes, too. Ideally, by addressing the performance issues, this might be solved in the process |
Also looked into this a bit and I found a fairly easy way to reproduce this:
Pro Tip™: You can select multiple chrome tabs at once by pressing shift and reload all of them via context menu Performance is really bad so I decided to basically disable everything that's going on in james except for the actual request interception by commenting out these lines: https://github.com/james-proxy/james/blob/master/src/main/proxy.js#L127-L129 The stacktrace suggests that this error happens when hoxy sends out the request. As it turns out hoxy does not properly handle errors. My conclusion:
|
Update: https://github.com/james-proxy/hoxy/pull/1/files seems to fix the crash. I changed 3 things:
Edit:
|
I'd like to test it, but I have no idea how to build James with the updated hoxy library. @nerdbeere is it possible to provide a macOS build? |
@torfeld6 Here's a short how-to:
Assuming that you also cloned the james repo and starting it with
Explanation: |
@mitchhentges assuming my fixes work, what do you think would be the best course of action? Should we try to get the fixes into hoxy or start using our own fork? |
@nerdbeere you're on fire 💯 |
We're all using macOS in my company and after three to five minutes of using james-proxy with https the following error occurs:
Error: socket hang up
at createHangUpError (_http_client.js:302:15)
at Socket.socketOnEnd (_http_client.js:394:23)
at emitNone (events.js:91:20)
at Socket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
Kind Regards
Joshua
The text was updated successfully, but these errors were encountered: