Skip to content

leetcode.cn login error #798

Closed
Closed
@wangp-blog

Description

@wangp-blog

🐛 Bug Report

  • try to login by password:
    pass: - Signing in leetcode-cn.com
    [ERROR] invalid password?
  • try to login by github
    c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\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 (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:577:36)
at self.callback (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\request\request.js:185:22)
at Request.emit (node:events:526:28)
at Request.onRequestError (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\request\request.js:881:8)
at ClientRequest.emit (node:events:526:28)
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:526:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

  • try to login by cookie
    success!
    invalid cookie

To Reproduce

  • leetcode.cn

Expected behavior

login !

Extension Output

Guidance: Press Ctrl+Shift+U, and toggle the channel to LeetCode.
pass: - Signing in leetcode-cn.com
[ERROR] invalid password?
login: (node:28504) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
pass: c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\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 (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\vsc-leetcode-cli\lib\plugins\leetcode.js:577:36)
at self.callback (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\request\request.js:185:22)
at Request.emit (node:events:526:28)
at Request.onRequestError (c:\Users\HP.vscode\extensions\leetcode.vscode-leetcode-0.18.0\node_modules\request\request.js:881:8)
at ClientRequest.emit (node:events:526:28)
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:526:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Your Environment

  • os: windows 10
  • extension settings: default
  • nodejs version:16.14.2
  • vscode version:1.67.0
  • extension version:0.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions