-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Node http request to API Server fails with TLS Error - No Renegotiation #18380
Comments
How to catch this Error? This stack trace is not frieldly at all. I don't want this error pop up. Is there an option to stop electron from poping up these error windows? |
I don't have much experience with Electron, but in the code i've illustrated this issue in, i am just re-throwing the error that i receive when executing the request, i think this is showing the popup because the error the code is throwing is not caught. Comment out the Unfortunately, i don't know how to reach to and log the deep nested error i show in the issue. I just got it as a popup. Maybe reproducing the request with a more low-level HTTP api as opposed to requests library would help. |
Possibly related: #18557 |
@nornagon Requests on the main process are failing with However, the same requests work in SSL_set_renegotiate_mode(ssl_.get(), ssl_renegotiate_freely); You can test this behavior using my demo setup: https://github.com/codenirvana/electron-tls-renegotiation#electron-tls-renegotiation Please let me know if there's any workaround to enable TLS renegotiation or any plan to fix this and backport in 4.x? |
I believe @numaanashraf is working on enabling renegotiation in the Node net stack. As a workaround, you could try using Electron's |
Thank you for taking the time to report this issue and helping to make Electron better. The version of Electron you reported this on has been superseded by newer releases. If you're still experiencing this issue in Electron 6.x.y or later, please add a comment specifying the version you're testing with and any other new information that a maintainer trying to reproduce the issue should know. I'm setting the Thanks in advance! Your help is appreciated. |
The newer versions of Electron would also be impacted by this. |
Labelling with 10.x because this still hasn't been fixed. |
Issue Details
Expected Behavior
I expect to receive a response, In this case it would be an unauthorized response.
Actual Behavior
I am receiving the following error:
To Reproduce
I was able to reproduce this by taking the quickstart (https://github.com/electron/electron-quick-start) and adding code to make the request in the main.js file using the node request library
Here is a link to the branch i created
Link To Branch
By some experimentation i was able to get to an error which said the following:
The reason i am using request is that the API i am trying to access blocks the normal XHR requests due to CORS and even if i disable webSecurity in electron i still am unable to pass the authentication and get redirected to a login page, i am guessing there is some kind of redirect if it detects a request coming from a browser.
I also tried to execute the exact same code to make a request by writing a separate script and running it using the command node script.js. This worked without any issues.
From what i've read Electron is using the Boringssl implementation which doesn't support this. Is there some kind of a way to skip the renegotiation or bypass it?
The text was updated successfully, but these errors were encountered: