electron icon indicating copy to clipboard operation
electron copied to clipboard

`setCertificateVerifyProc` result is considered rejected forever when request failed by timeout

Open ShGKme opened this issue 6 months ago • 3 comments

Preflight Checklist

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 setCertificateVerifyProc result as rejected, even the callback was called with 0 accepting 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

ShGKme avatar May 26 '25 10:05 ShGKme

  • Can also be fixed via https://github.com/electron/electron/issues/41448

ShGKme avatar May 26 '25 10:05 ShGKme

@nikwen I’m happy to work on this issue. Could you please assign it to me?

Satish-Medar avatar Aug 24 '25 12:08 Satish-Medar

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!