vscode-leetcode
vscode-leetcode copied to clipboard
Not signing in
🐛 Bug Report
A clear and concise description of what the bug is. Its not signing in through the cookie option
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Extension Output
Paste here the LeetCode extension log from output channel.
Guidance: Press Ctrl+Shift+U
, and toggle the channel to LeetCode
.
Your Environment
- os:
- extension settings:
- nodejs version:
- vscode version:
- extension version:
Its not signing through the cookie option
+1
Not able to sign in using the cookie today. I was able to do this a couple of weeks before.
Here's what's in the output:
Node.js v17.0.1
login: (node:14303) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
cookie: - Retrieving user favorites
[WARN] Failed to retrieve user favorites: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Cookie"]
- Retrieving user profile
/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/log.js:55
let s = args.map(x => x.toString()).join(' ');
^
TypeError: Cannot read properties of undefined (reading 'toString')
at /Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/log.js:55:31
at Array.map (<anonymous>)
at Object.log.<computed> [as info] (/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/log.js:55:20)
at /Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/commands/user.js:121:13
at /Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:523:14
at Request._callback (/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:422:19)
at self.callback (/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/request/request.js:185:22)
at Request.emit (node:events:390:28)
at Request.start (/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/request/request.js:753:10)
at Request.write (/Users/tshan/.vscode/extensions/leetcode.vscode-leetcode-0.18.0/node_modules/request/request.js:1497:10)
I have removed ~/.lc
and ~/.vscode/extensions/leetcode.vscode-leetcode-x.xx.x
Then relaunch visual studio, install leetcode and perform login again. This time I no longer have issues I had above.
Also I have noticed that I was using Firefox to grab the token but this time I used Chrome. The token I get from Chrome seems to be different from what I got from Firefox. This might be the reason I am able to login again.
Also I have noticed that I was using Firefox to grab the token but this time I used Chrome. The token I get from Chrome seems to be different from what I got from Firefox. This might be the reason I am able to login again.
I agree. I used firefox before and got the exactly same issue. But then using edge solved the issue
Same here. Firefox's cookie is different. I've used chrome and I was able to login