LeetCode-OpenSource / vscode-leetcode

Solve LeetCode problems in VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-leetcode
MIT License
8.16k stars 644 forks source link

Login option not working #916

Open Miclemattiol opened 8 months ago

Miclemattiol commented 8 months ago

🐛 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

Rong-Tao commented 8 months ago

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

chasezcz commented 8 months ago

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

jaroslaw-weber commented 8 months ago

same issue here, was fine few days ago.

fakhriaunur commented 8 months ago

same issue here, was fine few days ago.

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

jaroslaw-weber commented 8 months ago

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"]
yogendramaarisetty commented 8 months ago

I am also facing the same problem

jesee030 commented 7 months ago

same

YuFengDing commented 7 months ago

same

remia-dev commented 7 months ago

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

seems to work for me

simon-sou commented 5 months ago

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

tamy-le commented 5 months ago

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

allomy commented 3 months ago

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

seems to work for me

This works for me. Appreciate!