question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not login with both 'leetcode user -l' and 'leetcode user -c'

See original GitHub issue

I’ve tried the suggestion to re-login again, it failed again.

  1. login again:
[root@localhost leetcode-cli]# leetcode user -l
login: myAccount
pass:
[ERROR] invalid password?
  1. run the latest code:
cd <your local repo>
git pull --rebase origin master
./bin/install	// install globally, OR
./bin/leetcode <command>	// run the command locally

–>

Problem Summary

Could not successfully login leetcode with both leetcode user -l and leetcode user -c

How to reproduce

  1. I tried both leetcode user -l and leetcode user -c both do not work
  2. It is expected to login successfully, but I got [ERROR] invalid password? for leetcode user -l and [ERROR] You are not login yet? for leetcode user -c
  3. The output with “-vv” as below:
[root@localhost leetcode-cli]# leetcode user -l -vv
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] found plugin: leetcode=default
[TRACE] found plugin: retry=default
[TRACE] inited plugin: leetcode
[TRACE] inited plugin: retry
[TRACE] inited plugin: cache
login: myAccount
pass:
[DEBUG] running leetcode.login
[DEBUG] running leetcode.signin
⠋ Signing in leetcode.com[TRACE] REQUEST %s { uri: 'https://leetcode.com/accounts/login/',
  callback: [Function] }
[TRACE] REQUEST %s make request https://leetcode.com/accounts/login/
⠋ Signing in leetcode.com[TRACE] REQUEST %s onRequestResponse https://leetcode.com/accounts/login/ 200 { date: 'Tue, 29 Sep 2020 23:41:49 GMT',
  'content-type': 'text/html; charset=utf-8',
  'transfer-encoding': 'chunked',
  connection: 'close',
  'set-cookie':
   [ '__cfduid=xxxx' ],
  vary: 'Accept-Encoding, Cookie',
  'x-frame-options': 'SAMEORIGIN',
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'cf-cache-status': 'DYNAMIC',
  'cf-request-id': '057dd778840000ebc97eba9200000001',
  'expect-ct':
   'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  'report-to':
   '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?lkg-colo=12&lkg-time=1601422910"}],"group":"cf-nel","max_age":604800}',
  nel: '{"report_to":"cf-nel","max_age":604800}',
  'x-content-type-options': 'nosniff',
  server: 'cloudflare',
  'cf-ray': '5da98ea0df9bebc9-LAX' }
[TRACE] REQUEST %s reading response's body
[TRACE] REQUEST %s finish init function https://leetcode.com/accounts/login/
[TRACE] REQUEST %s response end https://leetcode.com/accounts/login/ 200 { date: 'Tue, 29 Sep 2020 23:41:49 GMT',
  'content-type': 'text/html; charset=utf-8',
  'transfer-encoding': 'chunked',
  connection: 'close',
  'set-cookie':
   [ '__cfduid=xxxx' ],
  vary: 'Accept-Encoding, Cookie',
  'x-frame-options': 'SAMEORIGIN',
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'cf-cache-status': 'DYNAMIC',
  'cf-request-id': '057dd778840000ebc97eba9200000001',
  'expect-ct':
   'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  'report-to':
   '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?lkg-colo=12&lkg-time=1601422910"}],"group":"cf-nel","max_age":604800}',
  nel: '{"report_to":"cf-nel","max_age":604800}',
  'x-content-type-options': 'nosniff',
  server: 'cloudflare',
  'cf-ray': '5da98ea0df9bebc9-LAX' }
[TRACE] REQUEST %s end event https://leetcode.com/accounts/login/
[TRACE] REQUEST %s has body https://leetcode.com/accounts/login/ 39167
[TRACE] REQUEST %s emitting complete https://leetcode.com/accounts/login/
[TRACE] REQUEST %s { url: 'https://leetcode.com/accounts/login/',
  headers:
   { Origin: 'https://leetcode.com',
     Referer: 'https://leetcode.com/accounts/login/',
     Cookie:
      <hidden> },
  form:
   { csrfmiddlewaretoken:
      'zlPhIZk9zVL7eWY071cmKycEcajyaOkSVSXRSsZxsiSUlkSu38C96caa4uJhR3yd',
     login: 'myAccount',
     password: 'xxxx' },
  callback: [Function],
  method: 'POST' }
[TRACE] REQUEST %s make request https://leetcode.com/accounts/login/
[TRACE] REQUEST %s onRequestResponse https://leetcode.com/accounts/login/ 403 { date: 'Tue, 29 Sep 2020 23:41:50 GMT',
  'content-type': 'application/json',
  'content-length': '105',
  connection: 'close',
  'set-cookie':
   [ '__cfduid=xxxx' ],
  vary: 'Cookie',
  'x-frame-options': 'SAMEORIGIN',
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'cf-cache-status': 'DYNAMIC',
  'cf-request-id': '057dd77ae20000eef6ffa2d200000001',
  'expect-ct':
   'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  'report-to':
   '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?lkg-colo=12&lkg-time=1601422910"}],"group":"cf-nel","max_age":604800}',
  nel: '{"report_to":"cf-nel","max_age":604800}',
  'x-content-type-options': 'nosniff',
  server: 'cloudflare',
  'cf-ray': '5da98ea49808eef6-LAX' }
[TRACE] REQUEST %s reading response's body
[TRACE] REQUEST %s finish init function https://leetcode.com/accounts/login/
[TRACE] REQUEST %s response end https://leetcode.com/accounts/login/ 403 { date: 'Tue, 29 Sep 2020 23:41:50 GMT',
  'content-type': 'application/json',
  'content-length': '105',
  connection: 'close',
  'set-cookie':
   [ '__cfduid=xxxx' ],
  vary: 'Cookie',
  'x-frame-options': 'SAMEORIGIN',
  'strict-transport-security': 'max-age=31536000; includeSubDomains; preload',
  'cf-cache-status': 'DYNAMIC',
  'cf-request-id': '057dd77ae20000eef6ffa2d200000001',
  'expect-ct':
   'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
  'report-to':
   '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report?lkg-colo=12&lkg-time=1601422910"}],"group":"cf-nel","max_age":604800}',
  nel: '{"report_to":"cf-nel","max_age":604800}',
  'x-content-type-options': 'nosniff',
  server: 'cloudflare',
  'cf-ray': '5da98ea49808eef6-LAX' }
[TRACE] REQUEST %s end event https://leetcode.com/accounts/login/
[TRACE] REQUEST %s has body https://leetcode.com/accounts/login/ 105
[TRACE] REQUEST %s emitting complete https://leetcode.com/accounts/login/
[ERROR] invalid password?

The output of leetcode user -c

[root@localhost leetcode-cli]# leetcode user -c -vv
[TRACE] initializing all plugins
[TRACE] found plugin: cache=default
[TRACE] found plugin: leetcode=default
[TRACE] found plugin: retry=default
[TRACE] inited plugin: leetcode
[TRACE] inited plugin: retry
[TRACE] inited plugin: cache

Environment

  • leetcode-cli version: 2.6.2
  • OS version: [root@localhost leetcode-cli]# lsb_release LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch [root@localhost leetcode-cli]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core)

  • Node version: v10.19.0

  • Npm version: 6.13.4 [root@localhost leetcode-cli]# npm -v 6.13.4

[root@localhost leetcode-cli]# leetcode version -v
 _           _                  _
| |         | |                | |
| | ___  ___| |_  ___  ___   __| | ___
| |/ _ \/ _ \ __|/ __|/ _ \ / _` |/ _ \
| |  __/  __/ |_  (__| (_) | (_| |  __/
|_|\___|\___|\__|\___|\___/ \__,_|\___|  CLI v2.6.2

[Environment]
Node                 v10.19.0
OS                   linux 3.10.0-1062.18.1.el7.x86_64
Cache                /root/.lc/leetcode/cache
Config               /root/.lc/config.json

[Configuration]
autologin            {"enable":false,"retry":2}
code                 {"editor":"vim","lang":"cpp"}
file                 {"show":"${fid}.${slug}","submission":"${fid}.${slug}.${sid}.${ac}"}
color                {"enable":true,"theme":"default"}
icon                 {"theme":""}
network              {"concurrency":10,"delay":1}
app                  "leetcode"

[Themes]
Colors               blue,dark,default,molokai,orange,pink,solarized,solarized.light
Icons                ascii,default,win7

[Plugins]
cache                default
retry                default
leetcode             default

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:8

github_iconTop GitHub Comments

11reactions
yaroslavyacommented, Nov 20, 2020

Is there any update on this one? Same issue, cant login via cli, while browser login works, so the credentials are correct.

9reactions
lyctwcommented, Jan 2, 2022

Same issue, any update? My OS is: linux 5.10.79-1-MANJARO

Come across this warning

login: (node:6951) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Read more comments on GitHub >

github_iconTop Results From Across the Web

OA - SDE Intern | Amazon Sign In pages (register, login, logout)
Initialy, there are no users registered; If a user is already logged in and makes a login request, the new request is unsuccessful,...
Read more >
No one can see my leetcode profile page (:-p)
got it - create a username with the suffix of any valid leetcode url. So, if https://www.leetcode.com/xyz is a valid url, then nobody...
Read more >
Interview question asked in Google - LeetCode Discuss
Choose four numbers from array such that sum of both two numbers are equal and return indices ie. a+b=c+d and all a,b,c,d is...
Read more >
DE Shaw | OA | Intern - LeetCode Discuss
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for...
Read more >
Need Help to solve this Problem : Character Reprogramming
use queue. 1: delete one character at a time and put the string back on the que 2: deque from que and check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found