Skip to content

login issue #44

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

Closed
zfu1316 opened this issue Jun 30, 2018 · 9 comments
Closed

login issue #44

zfu1316 opened this issue Jun 30, 2018 · 9 comments
Labels
need more info Further information is requested

Comments

@zfu1316
Copy link

zfu1316 commented Jun 30, 2018

I got the issue blow.
SyntaxError: Unexpected end of input
at Object.parse (native)
at Object.cache.get (C:\Users\afu.vscode\extensions\shengchen.vscode-leetcode-0.6.1\node_modules\leetcode-cli\lib\cache.js:17:15)
at Function.__dirname.Plugin.deps.deps.Plugin.init.plugins [as init] (C:\Users\afu.vscode\extensions\shengchen.vscode-leetcode-0.6.1\node_modules\leetcode-cli\lib\plugin.js:131:22)
at Object.cli.run (C:\Users\afu.vscode\extensions\shengchen.vscode-leetcode-0.6.1\node_modules\leetcode-cli\lib\cli.js:82:14)
at Object. (C:\Users\afu.vscode\extensions\shengchen.vscode-leetcode-0.6.1\node_modules\leetcode-cli\bin\leetcode:3:23)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:429:10)
[ERROR] You are not login yet? [0]
login: login: pass: login: pass:

@jdneo
Copy link
Member

jdneo commented Jul 2, 2018

Hi @Allen-Zfu,

Thank you for your feedback. Could this problem be stable reproduced? If yes, could you please tell me the reproduce steps?

@zfu1316
Copy link
Author

zfu1316 commented Jul 2, 2018 via email

@jdneo
Copy link
Member

jdneo commented Jul 2, 2018

I see. the plugin is using leetcode-cli as the back-end. If you cannot login through the plugin, could you please try login with leetcode-cli directly? The steps are:

  1. Install leetcode cli: npm install -g leetcode-cli
  2. leetcode user -l

@jdneo
Copy link
Member

jdneo commented Jul 12, 2018

Hi @Allen-Zfu. Does this issue still occur?

@jdneo jdneo added the need more info Further information is requested label Jul 24, 2018
@ningw42
Copy link

ningw42 commented Sep 28, 2018

@jdneo
I ran into login issue too.

By inspecting the request this extension made, I found that the endpoint is "leetcode-cn.com" instead of "leetcode.com" while I leaved the "Switch endpoint" unchanged at "Off". By the way, I tried the leetcode-cli you mentioned, and I found the exact same behavior with its default settings.

My solution is to "Switch endpoint" back and forth, and it just worked.

error message and stack:

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.cache.get (/Users/{MY_USERNAME}/.vscode/extensions/shengchen.vscode-leetcode-0.8.0/node_modules/leetcode-cli/lib/cache.js:17:15)
    at Plugin.save (/Users/{MY_USERNAME}/.vscode/extensions/shengchen.vscode-leetcode-0.8.0/node_modules/leetcode-cli/lib/plugin.js:71:22)
    at Function.Plugin.save (/Users/{MY_USERNAME}/.vscode/extensions/shengchen.vscode-leetcode-0.8.0/node_modules/leetcode-cli/lib/plugin.js:206:33)
    at Object.cli.run (/Users/{MY_USERNAME}/.vscode/extensions/shengchen.vscode-leetcode-0.8.0/node_modules/leetcode-cli/lib/cli.js:83:12)
    at Object.<anonymous> (/Users/{MY_USERNAME}/.vscode/extensions/shengchen.vscode-leetcode-0.8.0/node_modules/leetcode-cli/bin/leetcode:3:23)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[ERROR] You are not login yet? [0]
login: pass: [ERROR] invalid password? [0]

@jdneo
Copy link
Member

jdneo commented Sep 29, 2018

@unidentifiedme

Yes, I found several users encountered this same issue. Not sure who to blame now. 😞

@jdneo
Copy link
Member

jdneo commented Oct 10, 2018

Closing since no more reply from the issue creator for a long time.

@jdneo jdneo closed this as completed Oct 10, 2018
@leeguooooo
Copy link

Note: It should be the password of http://leetcode.com, not the password of https://leetcode-cn.com.

@MisterChegy
Copy link

Note: It should be the password of http://leetcode.com, not the password of https://leetcode-cn.com.

Thanks,I've mixed up them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants