-
Notifications
You must be signed in to change notification settings - Fork 664
TypeError: cb is not a function #522
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
Comments
for anyone having this problem, until it fixed, here is a workaround... Terminal: # Get leetcode CLI tools
npm install -g skygragon/leetcode-cli
# Create and open user.json file
cd ~/.lc/leetcode/user.json && code user.json
// Enter login credentials to user.json
// From browser, login to leetcode, then Dev tools -> Application -> Cookies
// You would need LEETCODE_SESSION and csrftoken
{
"login": "", //username
"sessionCSRF": "", //paste "csrftoken"
"sessionId": "", //paste "LEETCODE_SESSION"
} Restart vscode, and you should be logged in. |
I tried but it didn't work for me |
Work for me, thanks! |
Thanks! It work. |
thanks |
@BatuhanKorur Thanks a lot! |
c:\Users\lxcx.vscode\extensions\leetcode.vscode-leetcode-0.17.0\node_modules\vsc-leetcode-cli\lib\commands\user.js:146 SyntaxError: Unexpected token ':' I can't understand this question...:( |
code ~/.vscode/extensions/leetcode.vscode-leetcode-0.18.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js sessionId is find line 541, follow above step. Restart, login success! |
it works, obviously. but it feels too weird to have to resort to such measures... |
It works, Thank you! |
The actual reason is that leetcode is not sending LEETCODE_SESSION and sessionCSRF in all the HTTP requests. It is only included in the graphql requests. Using the cookie from |
Using the cookie from |
🐛 Bug Report
login by username and cookie
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Extension Output
Guidance: Press
Ctrl+Shift+U
, and toggle the channel toLeetCode
.Your Environment
The text was updated successfully, but these errors were encountered: