TypeError: cb is not a function
See original GitHub issue🐛 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
login: cookie: /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:555
return cb('invalid cookie?');
^
TypeError: cb is not a function
at parseCookie (/Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:555:12)
at Plugin.plugin.cookieLogin (/Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/vsc-leetcode-cli/lib/plugins/leetcode.js:578:22)
at /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/vsc-leetcode-cli/lib/commands/user.js:119:12
at /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/prompt/lib/prompt.js:336:32
at /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/utile/node_modules/async/lib/async.js:154:25
at assembler (/Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/prompt/lib/prompt.js:333:9)
at /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/prompt/lib/prompt.js:342:32
at /Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/prompt/lib/prompt.js:625:5
at Interface.onLine (/Users/otis.z/.vscode/extensions/shengchen.vscode-leetcode-0.16.1/node_modules/read/lib/read.js:111:5)
at Interface.emit (events.js:198:13)
Guidance: Press Ctrl+Shift+U
, and toggle the channel to LeetCode
.
Your Environment
- os: MacOS 10.15
- extension settings:
- “leetcode.nodePath”: “/usr/local/bin/node”
- “leetcode.endpoint”: “leetcode-cn”
- “leetcode.defaultLanguage”: “java”
- nodejs version: v10.16.0
- vscode version: 1.42
- extension version: 0.16.1
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
TypeError: cb is not a function - javascript - Stack Overflow
1. You aren't passing any cb s to any of the three functions that require a callback as a second parameter. – CertainPerformance...
Read more >TypeError: cb is not a function #917 - tediousjs/tedious - GitHub
Hi @Steexyz, for the 'cb' function issue, there is a change under PR #845 that has been recently merged into master which introduce...
Read more >How I fixed a "cb.apply is not a function" error ... - Flavio Copes
I regularly use Gitbook, a little Node.js software used to generate an ebook from a set of markdown files. I use it for...
Read more >Android : TypeError: cb.apply is not a function - YouTube
https://www.hows.tech/p/recommended.html ] Android : TypeError : cb.apply is not a function Note: The information provided in this video is as it ...
Read more >npm ERR! cb.apply is not a function SOLVED - YouTube
How to solve npm ERR! cb.apply is not a function is shown. ... npm ERR! cb.apply is not a function SOLVED | node...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
for anyone having this problem, until it fixed, here is a workaround…
Terminal:
user.json
:Restart vscode, and you should be logged in.
sessionId is
cookie.LEETCODE_SESSION
in devtools application panel. sessionCSRF iscookie.csrftoken
in devtools application panel.find line 541, follow above step. Restart, login success!