james-proxy / james

Web Debugging Proxy Application
1.42k stars 125 forks source link

Use patched version of hoxy #407

Closed jamezrin closed 5 years ago

jamezrin commented 5 years ago

The patched version propagates exceptions created by the sockets to the main event emitter, check https://github.com/greim/hoxy/pull/110

The force push is because I accidentally reverted https://github.com/james-proxy/james/pull/406/commits/97993f47d011cf6a89d56dad91c3b1630d1c5735 which would remove the changelog entry for the previous release, so I deleted the handler myself

It works locally, but I think the way I have done this makes no sense (the submodules) so sorry for this, I wanted the commits I created to be visible, but I could've just set my repository on the package.json, but for some reason that wasn't working well when npm installing.

I don't think the PR to hoxy will get merged, it is not maintainted. So maybe the james-proxy can fork it with that fix in it?

mitchhentges commented 5 years ago

@jamezrin thanks for the PR! I'm looking forward to having that hoxy fix be merged. Unfortunately, though that does make hoxy behave more correctly, it doesn't seem to be the cause of this crash - if it was, then this commit should've fixed it.

I checked out your branch locally, but I was still able to reproduce the bug:

  1. Check out your branch, git submodule init && git submodule update etc etc
  2. npm run clean
  3. npm run release
  4. I'm on Linux, so I invoke the AppImage created in binaries - looks like you're on Linux too, based on your screenshot
  5. Set up HTTPs proxying. This seems to be related (?)
  6. Launch Chrome (Our Firefox SSL-proxying config is incorrect I think, so it won't reproduce the bug)
  7. This is inconsistent, but I usually continuously open new tabs, go to google.com, wait for it to load, and repeat
  8. Within ~30s, james will crash

If you invoke the AppImage from the terminal, you can see the logs. On my machine in my most-recent test, it crashed with:

Error: write EPIPE
    at WriteWrap.afterWrite (net.js:833:14)

I don't recall James failing like this in the past, so I'm not sure if this is caused by:

Let me know if you can reproduce the problem, and thanks again for digging into this!