vscode-leetcode icon indicating copy to clipboard operation
vscode-leetcode copied to clipboard

Login option not working

Open Miclemattiol opened this issue 2 years ago • 13 comments

🐛 Bug Report

When I try to login, it always asks me for username/email and password with all login methods, so it's impossible to login

To Reproduce

Press the "Sign in to LeetCode" button

Press any option

It will ask for username and password even if you login with cookie, github or linkedin

Expected behavior

Opening browser for github/linkedin login or ask for the cookie

Extension Output

v20.10.0
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:12138) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:12139) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✔     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:12141) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:12142) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[ERROR] You are not login yet?
(node:12144) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
login: (node:12155) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
pass: [ERROR] Login failed. Please make sure the credential is correct.

Your Environment

  • os: MacOs Sonoma 14.2.1
  • extension settings: Just installed it, so I think default
  • nodejs version: 20.10.0
  • vscode version: 1.86.0-insider (Universal)
  • extension version: 0.18.1

Miclemattiol avatar Dec 23 '23 15:12 Miclemattiol

Same problem here, I heard that it is somewhat a node.js version problem, I tried 10.16.0 and 20.10.0 but with no luck.

I have been working with Github login for some time now, and somehow it stopped working around 1 month ago, and Idk why, Maybe github 2FA plays a row?

v20.10.0
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:54983) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:55092) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✔     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:55104) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
 Active  Name               Version         Desc
----------------------------------------------------------------------------------------------------
   ✔     solution.discuss   2019.02.03      Plugin to fetch most voted solution in discussions.
   ✔     company            2017.12.18      Plugin to query by company for free user.
   ✔     cache              default         Plugin to provide local cache.
   ✔     retry              default         Plugin to retry last failed request if autologin.enable is on.
   ✘     leetcode.cn        2018.11.25      Plugin to talk with leetcode-cn APIs.
   ✔     leetcode           default         Plugin to talk with leetcode APIs.
(node:55116) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[ERROR] You are not login yet?
(node:55155) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
login: (node:55281) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
login: (node:55314) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
pass: /home/rong/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:577
    const authenticityToken = body.match(/name="authenticity_token" value="(.*?)"/);
                                   ^

TypeError: Cannot read properties of undefined (reading 'match')
    at Request._callback (/home/rong/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:577:36)
    at self.callback (/home/rong/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/request/request.js:185:22)
    at Request.emit (node:events:514:28)
    at Request.onRequestError (/home/rong/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/request/request.js:881:8)
    at ClientRequest.emit (node:events:514:28)
    at TLSSocket.socketOnEnd (node:_http_client:519:9)
    at TLSSocket.emit (node:events:526:35)
    at endReadableNT (node:internal/streams/readable:1589:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

OS: Ubuntu 20.04 Node.js v20.10.0

Rong-Tao avatar Dec 25 '23 11:12 Rong-Tao

I suspect that this project has been discontinued or dropped. 😅

chasezcz avatar Dec 26 '23 11:12 chasezcz

same issue here, was fine few days ago.

jaroslaw-weber avatar Dec 28 '23 01:12 jaroslaw-weber

same issue here, was fine few days ago.

Having the same difficulties, but it's working again as of right now

fakhriaunur avatar Dec 28 '23 08:12 fakhriaunur

not working for me. im using cookie login


- Downloading problems
(node:43385) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
[ERROR] TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Cookie"]

jaroslaw-weber avatar Dec 28 '23 08:12 jaroslaw-weber

I am also facing the same problem

yogendramaarisetty avatar Jan 08 '24 06:01 yogendramaarisetty

same

jesee030 avatar Jan 15 '24 07:01 jesee030

same

YuFengDing avatar Jan 16 '24 08:01 YuFengDing

I tried logging in using the cookie method. https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/478#issuecomment-564757098

seems to work for me

remia-dev avatar Feb 07 '24 13:02 remia-dev

I tried logging in using the cookie method. https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/478#issuecomment-564757098

seems to work for me

Yep. It's worked for me as well. awesome

simon-sou avatar Mar 27 '24 03:03 simon-sou

Same as above but with detailed step by step: https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/927#issuecomment-2030067837

tamy-le avatar Apr 01 '24 16:04 tamy-le

I tried logging in using the cookie method. #478 (comment)

seems to work for me

This works for me. Appreciate!

allomy avatar Jun 10 '24 12:06 allomy