Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfail to install plugin #593
Comments
I meet the similar problem yesterday, the error is 404, but I go through plugins installation, I meet 404 when list questions in leetcode-cli, it should be related to your vpn or shadowsocks, finally I didn't solve it. Now I use the leetcode extension in clion IDE, |
meh, I am not using any VPN/ssr. |
I don't know why, as I'm not familar with js, I don't know how to find reason, so other ide may be a good choice. |
@wnykuang get your point, let me have a check. |
@wnykuang did you use proxy? |
@yihong0618 nope, I didn't change any settings about the internet. Could you open the URL? https://raw.githubusercontent.com/leetcode-tools/leetcode-cli/master/lib/plugins/github.js |
No, but its not the 404 url problem, github.js is the third party plugin which would not install usually, I have tried three different environment but I didn't locate your problem yet. |
@yihong0618 Do you need any more information? |
Yes what my guess is you use vscode-leetcode or leetcode-cli before and installed these third-party plugins maybe you are not notice, am I right? |
@yihong0618 |
@wnykuang |
after Thank you! |
My thinking is that use use third-party github.js and it saves in cache, and this time need to update caused these error. |
@yihong0618 @zry656565 Seems that we need a way to make sure users are in a fresh env when they first use the extension. Like store some flags in the extension's global storage. If it's first time using the extension, clean the cache dir before activate |
My pleasure |
@jdneo @zry656565 for (const plugin of supportedPlugins) {
try { // Check plugin
await this.executeCommandEx(this.nodeExecutable, [await this.getLeetCodeBinaryPath(), "plugin", "-e", plugin]);
} catch (error) { // Download plugin and activate
// popup
await this.executeCommandEx(this.nodeExecutable, [await this.getLeetCodeBinaryPath(), "plugin", "-i", plugin]);
}
} |
This is a good way to handle the error. While we also need a way to eliminate those errors at the first stage. For example, in the |
Extension initialization failed.
To Reproduce
Expected behavior
leetcode-vscode should be ran smoothly.
Extension Output
v12.18.2
[WARN] Installing missing plugins, might take a while ...
[ERROR] HTTP Error: 404
[WARN] Installing missing plugins, might take a while ...
[ERROR] HTTP Error: 404
Error: Command "node "/Users/xxxxxxx/.vscode/extensions/leetcode.vscode-leetcode-0.17.0/node_modules/vsc-leetcode-cli/bin/leetcode",plugin,-i,company" failed with exit code "1".
Your Environment
note:
I believe the problem is caused by the 404 from
https://raw.githubusercontent.com/leetcode-tools/leetcode-cli/master/lib/plugins/github.js
I hope it helps. :D