vscode-leetcode
vscode-leetcode copied to clipboard
Error: self signed certificate in certificate chain
🐛 Bug Report
A clear and concise description of what the bug is. Not able to login to leetcode. due to certificate error
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Extension Output
Paste here the LeetCode extension log from output channel.
[ERROR] You are not login yet? login: pass: - Signing in leetcode.com [ERROR] Error: self signed certificate in certificate chain
Guidance: Press Ctrl+Shift+U
, and toggle the channel to LeetCode
.
Your Environment
- os: Windows 10
- extension settings :
- nodejs version: 12.8.1
- vscode version: 1.38.1
- extension version: 0.15.5
The output shows the error msg
[ERROR] You are not login yet? login: pass: - Signing in leetcode.com [ERROR] Error: self signed certificate in certificate chain
Im behind a firewall with self signed certs. I assume this may require https requests config change.
PS: I don't think this is duplicated as #370 . They are all certs related but root cause may different
User setting.json has been updated with "http.proxyStrictSSL": false,
Still not working
@jdneo I met the same issue. For same reason in my work, I need to set git config --global http.sslVerify false
. I am not sure if it is caused by this setting. Is there any solution now?
Here is a similar issue: Error: self signed certificate in certificate chain · Issue #695 · nodejs/node-gyp
Further investigation indicates the error msg came from Leetcode-cli Got same error msg when trying login via leetcode cli
Create ticket https://github.com/skygragon/leetcode-cli/issues/186
Hey @rickdgit,
Thank you for your effort on this issue. So far I think the author of LeetCode CLI has no time to maintain this project (See:https://github.com/skygragon/leetcode-cli/issues/181).
It would be great if you can dig deeper into this and send out a fix. 😄
Hi @jdneo
I can take a look later and so sad the skygragon suffered from 996... Are you taking the ownership for leetcode-cli ?
I'm not the owener of the leetcode cli. So far I just fork it to unblock the vscode extension. But that is not a way which I preferred to do so.
Before skygragon came back or find a new guy to take care of the cli. You can first send pull request to https://github.com/leetcode-tools/leetcode-cli. And thank you for your enthusiasm to this project.
I have some question of this. I do not know why occur the question, If you have solve it, please tell me. Thanks.
For Windows users, you may try to add process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
at the beginning of the following files
C:\Users\YourUserName\.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.cn.js
and
C:\Users\YourUserName\.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js
For other users, there may be similar files where you can add.
For Windows users, you may try to add
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
at the beginning of the following filesC:\Users\YourUserName\.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.cn.js
andC:\Users\YourUserName\.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js
For other users, there may be similar files where you can add.
Facing the same issue, I'm using Linux for remote development, after adding process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0
to the beginning of leetcode.js
, another error occurs.