Skip to content
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

[Bug]: Toolkit Crashing after several hours of intercepting #580

Open
1 task done
bytechase opened this issue Apr 16, 2024 · 3 comments
Open
1 task done

[Bug]: Toolkit Crashing after several hours of intercepting #580

bytechase opened this issue Apr 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bytechase
Copy link

Has this been reported before?

  • I have checked for existing reports of this issue

Repro steps

Have toolkit intercept requests for long period of time. Seems to be around the 10,000 requests mark where it begins to crash.

How often does this bug happen?

Every time

The desktop OS you're using

Mac 14.4.1

Details of other apps/devices

Intercepting requests via iPhone

Error screenshot

No response

Any other info?

A possible fix could be having a setting to auto delete after 1000 request made?

@bytechase bytechase added the bug Something isn't working label Apr 16, 2024
@pimterry
Copy link
Member

Thanks for reporting this. I haven't seen this myself, although I don't normally leave the app running recording large volumes of traffic like this.

Can you share your log file after this happens? That's available on Mac at /Users/<username>/Library/Logs/httptoolkit/last-run.log.

If you monitor your system stats, does the device run out memory before this happens?

Does the app still work like normal up until this point, or does it slowly break before it crashes?

It depends how much traffic you're logging really, but at the end of the day we do have to hold everything your intercept in memory, so if you intercept large volumes that is eventually going cause big problems.

I'm cautious about automatically deleting traffic like you suggest by default (very easy to unexpectedly lose recorded traffic that you are interested in) but it might make sense to explore configuration options here (e.g. stop after X MB of data, drop requests > Y MB, always store only the last 10 minutes of data, etc).

Alternatively of course, maybe this crash is due to some other bug, since 10,000 normal requests really isn't that many! So I'd definitely like to investigate what exactly is actually failing in this case.

@johnlucier1978
Copy link

I am having this issue as well.

@bytechase
Copy link
Author

bytechase commented Apr 17, 2024

webextension
INFO: API store initialized
WARN: Third-party cookie will be blocked. Learn more in the Issues tab.
INFO: Server started
httptoolkit-server: Updating CLI... fetching manifest
httptoolkit-server: Updating CLI... already on latest version: 1.14.11
INFO: Service worker loaded
INFO: Previous server version was 1.14.11
INFO: Reporting error: Error: Failed to initialize application [object Object]
INFO: Config loaded
INFO: Server started on port 8000
INFO: Proxy store initialized (server version 1.14.11)
INFO: Rules store initialized
INFO: Events store initialized
INFO: Send store initialized
Detected terminal command: /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
Most of Log is 
Unknown TLS error: Error: 4012350602000000:error:0A000102:SSL routines:tls_early_post_process_client_hello:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_srvr.c:1677:

    at initRead (node:_tls_wrap:502:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  library: 'SSL routines',
  reason: 'unsupported protocol',
  code: 'ERR_SSL_UNSUPPORTED_PROTOCOL'
}

So far at 33,000 requests and UI is still stable

A possible suggestion is maybe have a only mock mode? Where logs of intercept is disabled and is mainly just waiting for a request to come through triggering the mock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants