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

Can not sign in leetcode-cn.com #605

Closed
Aaronself opened this issue Jul 23, 2020 · 8 comments
Closed

Can not sign in leetcode-cn.com #605

Aaronself opened this issue Jul 23, 2020 · 8 comments

Comments

@Aaronself
Copy link

Environment

  • os: Win10

when I find the plugin leetcode in vscode, i download it and find can't sigin in. I tried login with github, accounts and cookies but it dose not work.

Then I find the issue#478 and download the leetcode-cli version 2.7.0 and i tried login with github, accounts and cookies but still doesn't work.

when I login with github. it shows

[ERROR] Login failed. Please make sure the credential is correct.

and when I login with leetcode account. it shows

[ERROR] invalid password?

and I also tried login with cookie, it show something different.

[WARN] Failed to retrieve user favorites: [object Object]
C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:525
        user.paid = _user.isCurrentUserPremium;
                          ^

TypeError: Cannot read property 'isCurrentUserPremium' of null
    at C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:525:27
    at Request._callback (C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:431:12)
    at Request.self.callback (C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\node_modules\request\request.js:185:22)
    at Request.emit (events.js:315:20)
    at Request.<anonymous> (C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\node_modules\request\request.js:1161:10)
    at Request.emit (events.js:315:20)
    at IncomingMessage.<anonymous> (C:\Users\XXX\AppData\Roaming\npm\node_modules\vsc-leetcode-cli\node_modules\request\request.js:1083:12)
    at Object.onceWrapper (events.js:421:28)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1221:12)

actually, i hidden account information and use the XXX instead。

So, how can i solve this problem, thank you very much.

@yihong0618
Copy link
Contributor

Did you link your account to github?

@Aaronself
Copy link
Author

may i asked how to link to github?

@yihong0618
Copy link
Contributor

yihong0618 commented Jul 23, 2020

may i asked how to link to github?

@Aaronself
Login leetcode, in this url https://leetcode.com/profile/account/

You can click the arrow button to link GitHub or others, then try login in vscode-leetcode again.
image

@Aaronself
Copy link
Author

actually i already link the leetcode to github.

But i use the leetcode-cn.com, can it still work?

@yihong0618
Copy link
Contributor

actually i already link the leetcode to github.

But i use the leetcode-cn.com, can it still work?

@Aaronself for leetcode.cn I think the origin accout can login.

  1. please make sure your node version is more than 10+
  2. please make sure you have switched to leetcode.cn endpoint

@Aaronself
Copy link
Author

node version 12.18.2
may I ask how to change to leetcode.cn

@yihong0618
Copy link
Contributor

image

@Aaronself
Copy link
Author

ok, thank you. I find it is strange that the UI is different from yesterday. Yesterday i can only find the button sign in. And today i find other buttons and sign in successfully. thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants