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

Error: self signed certificate in certificate chain #446

Open
rickdgit opened this issue Oct 4, 2019 · 10 comments
Open

Error: self signed certificate in certificate chain #446

rickdgit opened this issue Oct 4, 2019 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@rickdgit
Copy link

rickdgit commented Oct 4, 2019

🐛 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

@rickdgit
Copy link
Author

rickdgit commented Oct 4, 2019

User setting.json has been updated with
"http.proxyStrictSSL": false,

Still not working

@jdneo jdneo added the help wanted Extra attention is needed label Oct 5, 2019
@yanglr
Copy link

yanglr commented Oct 7, 2019

@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

@rickdgit
Copy link
Author

rickdgit commented Oct 7, 2019

Further investigation indicates the error msg came from Leetcode-cli
Got same error msg when trying login via leetcode cli

@rickdgit
Copy link
Author

rickdgit commented Oct 7, 2019

Create ticket skygragon/leetcode-cli#186

@jdneo
Copy link
Member

jdneo commented Oct 8, 2019

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:skygragon/leetcode-cli#181).

It would be great if you can dig deeper into this and send out a fix. 😄

@rickdgit
Copy link
Author

rickdgit commented Oct 8, 2019

Hi @jdneo

I can take a look later and so sad the skygragon suffered from 996...
Are you taking the ownership for leetcode-cli ?

@jdneo
Copy link
Member

jdneo commented Oct 9, 2019

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.

@tingfenghanlei
Copy link

I have some question of this. I do not know why occur the question, If you have solve it, please tell me. Thanks.

@WeikaiZhou
Copy link

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.

@Debonex
Copy link

Debonex commented Dec 19, 2023

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.

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.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants