skygragon / leetcode-cli

A cli tool to enjoy leetcode!
MIT License
3.65k stars 457 forks source link

Cannot login at all: not only with premium account but also none premium account. #195

Open kgfly opened 5 years ago

kgfly commented 5 years ago

Problem Summary

Cannot login. Tried premium and none premium account. Neither can login.

How to reproduce

log out / log in.

Environment

cheung-chifung commented 5 years ago

Same problem.

version: 2.6.2 Premium Account.

dinglioutlook commented 5 years ago

Same problem. test on all accounts, even the new created one.

justincui commented 5 years ago

Same problem, non-premium account: OS: win 10 node: V12.13.0 npm: 6.12.0 leetcode-cli: 2.6.2

flyingosprey commented 5 years ago

@skygragon / @jdneo . Sorry for bothering. We're totally stuck because we cannot login. Could you please help us out?

GaoangLiu commented 5 years ago

Same problem. OS: MacOS 10.13 Version: 2.6.2

ffk0716 commented 4 years ago

Same problem. OS: MacOS 10.15.1 Version: 2.6.2 Node.js version: v13.2.0

h13o commented 4 years ago

I'm a newbie here and cannot login ><...

nettee commented 4 years ago

Same problem. OS: macOS 10.14.6 Version: 2.6.2

xiaoheiAh commented 4 years ago

196

htang2023 commented 4 years ago

the plugin is now blocked by leetcode, i guess

minna-ust commented 4 years ago

Same problem. OS: ubuntu 16.04 Version: 2.6.2

nicoflojo commented 4 years ago

Could be an issue with LC adding another level of authentication through captcha.

leonyzhe commented 4 years ago

My dev env is mac, it works for me below. Edit ~./lc/plugin.json, set the cookie.chrome value is true, open the chrome and login in leetcode accout. Next login will success.

shuuji3 commented 4 years ago

Thank you @leonyzhe! I can log in successfully by editing ~/.lc/plugin.json as @leonyzhe shows. My plugin.json has the following content now:

{"cache":true,"retry":true,"leetcode":true,"cookie.chrome":true}

I appended "cookie.chrome":true.

lang010 commented 4 years ago

After leetcode plugin -i cookie.chrome, it works! Thanks!

mmahmad commented 4 years ago

@lang010 did you have to log in through the browser before cli? I don’t have access to a browser (VPS through SSH), so even when I edit the plugins.json, I get the error:

[ERROR] Failed to copy cookies from profile "Default"
[ERROR] Error: SQLITE_CANTOPEN: unable to open database file
[ERROR] invalid password?

UPDATE: This helped me fix it.

pkm2019 commented 4 years ago

I am having the same problem. My dev environment is Mac. I tried setting "leetcode plugin -i cookie.chrome" and login using Chrome but that did not work for me.

WHen I login, i get the following:

[ERROR] Failed to copy cookies from profile "Default" [ERROR] Not found cookie: LEETCODE_SESSION [ERROR] invalid password?

Can you please look into this? This is blocking us. Thanks in advance!

hardboydu commented 4 years ago

vsc-leetcode-cli https://www.npmjs.com/package/vsc-leetcode-cli

pkm2019 commented 4 years ago

vsc-leetcode-cli https://www.npmjs.com/package/vsc-leetcode-cli

Thank you @hardboydu for the link! Appreciate that.

Btw, I tried installing vsc-leetcode-cli which went fine. But, I am still not able to get leetcode executable.. Am I missing something? Is it just for Visual Studio Code?

$ sudo npm i vsc-leetcode-cli

$ leetcode -bash: leetcode: command not found $

Thanks in advance!!

pkm2019 commented 4 years ago

Thank you @hardboydu ! I was able to make it work.

xavier90 commented 4 years ago

Thank you @hardboydu ! I was able to make it work.

Can you share your way to make it work? Thanks

abhijeeg commented 4 years ago

@lang010 did you have to log in through the browser before cli? I don’t have access to a browser (VPS through SSH), so even when I edit the plugins.json, I get the error:

[ERROR] Failed to copy cookies from profile "Default"
[ERROR] Error: SQLITE_CANTOPEN: unable to open database file
[ERROR] invalid password?

UPDATE: This helped me fix it.

Same issue. Did you move to using VSCode Leetocode ?

haotian-wang commented 4 years ago

vsc-leetcode-cli https://www.npmjs.com/package/vsc-leetcode-cli

Thank you @hardboydu for the link! Appreciate that.

Btw, I tried installing vsc-leetcode-cli which went fine. But, I am still not able to get leetcode executable.. Am I missing something? Is it just for Visual Studio Code?

$ sudo npm i vsc-leetcode-cli

  • vsc-leetcode-cli@2.6.19 updated 1 package and audited 465 packages in 4.125s found 0 vulnerabilities

$ leetcode -bash: leetcode: command not found $

Thanks in advance!!

npm install -g vsc-leetcode-cli
leetcode user -l

Paste your user name and cookies here.

AlessandroSteri commented 4 years ago

@lang010 did you have to log in through the browser before cli? I don’t have access to a browser (VPS through SSH), so even when I edit the plugins.json, I get the error:

[ERROR] Failed to copy cookies from profile "Default"
[ERROR] Error: SQLITE_CANTOPEN: unable to open database file
[ERROR] invalid password?

UPDATE: This helped me fix it.

Same issue. Did you move to using VSCode Leetocode ?

eventually it worked to me just doing leetcode user -lc then insert username and password and it worked. I had a leetcode session legged in on chrome but I don't think it counts in any way

zzj0402 commented 4 years ago
Error: Cannot find module 'C:\Users\z\AppData\Roaming\npm\node_modules\leetcode-cli\node_modules\sqlite3\lib\binding\node-v72-win32-x64\node_sqlite3.node'