Skip to content
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

Cannot login when using GitHub with MFA #925

Open
k86td opened this issue Mar 5, 2024 · 8 comments
Open

Cannot login when using GitHub with MFA #925

k86td opened this issue Mar 5, 2024 · 8 comments

Comments

@k86td
Copy link

k86td commented Mar 5, 2024

🐛 Bug Report

The login fails saying I need to enter my correct credentials:

pass: [ERROR] Login failed. Please make sure the credential is correct.

My credentials are alright, I'm receiving sudo request on Git Mobile.

To Reproduce

Enable 2 factor methods on GitHub (currently I'm using GitHub mobile), then try to login inside VSCode extension.

Expected behavior

The extension should detect usage of MFA on GitHub and give a number to enter inside Git mobile to allow sudo request.

Extension Output

Extension output:

 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:22676) 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:22104) 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:21912) 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.
login: (node:7028) 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.
login: (node:15356) 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.
login: (node:20040) 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: Windows 11
  • extension settings:
{
    "leetcode.defaultLanguage": "python3",
    "leetcode.nodePath": "C:\\Users\\user\\AppData\\Local\\NodeJs\\node.exe",
}
  • nodejs version: v20.11.1
  • vscode version: 1.84.2
  • extension version: v0.18.1
@TangyrenMidKing
Copy link

TangyrenMidKing commented Mar 6, 2024

facing the same issue. Cannot log in even change the auth type to leetcode login.
login: (node:18524) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ...to show where the warning was created) pass: - Signing in leetcode.com [ERROR] session expired, please login again [code=-1]

@snowproud
Copy link

the same issue. I have tried all login method(leetcode account, third-party account, cookie), and all failed.

@Matthewow
Copy link

Same here

@fLexsooP
Copy link

fLexsooP commented Mar 8, 2024

same issue here

@Lakhwinderr
Copy link

same isssue:
TypeError: Cannot read properties of undefined (reading 'toString')
at c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\log.js:55:31
at Array.map ()
at Object.log. [as info] (c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\log.js:55:20)
at c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\commands\user.js:121:13
at c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:523:14
at Request._callback (c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:422:19)
at Request.self.callback (c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\request\request.js:185:22)
at Request.emit (node:events:390:28)
at Request. (c:\Users\LAKHWINDERSINGH.vscode\extensions\leetcode.vscode-leetcode-0.18.1\node_modules\request\request.js:1161:10)
at Request.emit (node:events:390:28)
login: (node:21528) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
pass: - Signing in leetcode.com

ChatGPT says:
It appears that you're encountering an error related to session expiration while using the LeetCode extension for Visual Studio Code. This error indicates that your session with LeetCode has expired, and you need to log in again.

To resolve this issue, you should follow these steps:

  1. Log in Again: Follow the instructions provided by the extension to log in again to your LeetCode account. This typically involves navigating to the login page and entering your credentials.

  2. Check Session Duration: Take note of the session duration for LeetCode. If the session duration is short, you may want to check if there's an option to extend the session duration or keep the session alive while you're actively using the extension.

  3. Verify Account: Ensure that your LeetCode account is in good standing and that there are no issues with your account that could be causing the session expiration.

  4. Update Extension: Check if there are any updates available for the LeetCode extension in Visual Studio Code. Updating to the latest version of the extension may address any bugs or issues related to session management.

  5. Contact Support: If you continue to experience issues with session expirations, consider reaching out to the support team for the LeetCode extension or LeetCode platform. They may be able to provide further assistance or insights into the problem.

By following these steps, you should be able to log in again to your LeetCode account and continue using the extension without encountering session expiration errors.

@wytsai7660
Copy link

Any update? I don't think it would be a good idea to turn off 2FA just for that 😐

@leni8ec
Copy link

leni8ec commented Mar 22, 2024

same here(

@k86td
Copy link
Author

k86td commented Apr 3, 2024

I'll take a look at it. First, I've never touched extension dev. And seeing the activity of this repo, I'm not sure a pull request can even get through.

Might be better to just use the fork on the marketplace, but I don't know how it's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants