electron
electron copied to clipboard
`setCertificateVerifyProc` result is considered rejected forever when request failed by timeout
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
36.3.1
What operating system(s) are you using?
Windows
Operating System Version
Windows 11 (24H2)
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
- Electron always respects the result passed to
setCertificateVerifyProc's callback, even if it was called after the request has failed by timeout.
Actual Behavior
- Electron considers
setCertificateVerifyProcresult as rejected, even the callback was called with0accepting the certificate - Electron caches the result, so there is no way to accept the certificate
[net] Starting a request with 30s timeout
[setCertificateVerifyProc] Verifying slowly...
[net] Error net::ERR_TIMED_OUT
[setCertificateVerifyProc] ACCEPTED
[net] Starting a request with 30s timeout
[net] Error net::ERR_CERT_AUTHORITY_INVALID
Testcase Gist URL
https://gist.github.com/ShGKme/58f7344f48358ae71f783d4b86f5046e
Additional Information
It doesn't happen when the request is cancelled with AbortSignal
- Can also be fixed via https://github.com/electron/electron/issues/41448
@nikwen I’m happy to work on this issue. Could you please assign it to me?
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!