clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
592 stars 97 forks source link

Rate Limit Exceeded Error is Hidden #606

Open imdanielsp opened 3 months ago

imdanielsp commented 3 months ago

I decided to upgrade my version of Clang to 18; after removing the older version and installing the newer one, I noticed that the extension was no longer working. I immediately looked at the extension log, and nothing was being displayed, nor pop-up errors in the VSCode UI. After some digging, I decided to open the Developer Tools and found that the extension is attempting to download clangd–which is ok; I can probably provide the path to the new binary, I hope–but it was getting rate limited:

image

Extension console log empty:

image

Logs

TRACE Started polling vscode-remote://ssh-remote%2Bec2/home/ubuntu/.vscode-server/data/logs/20240322T173204/exthost4/output_logging_20240322T193411/1-clangd.log
console.ts:137 [Extension Host] https://api.github.com/repos/clangd/clangd/releases/latest 403 rate limit exceeded
log.ts:437   ERR [Extension Host] Auto-install failed:  Error: Can't fetch release: rate limit exceeded
    at Object.<anonymous> (/home/ubuntu/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.28/out/bundle.js:42:1407)
    at Generator.next (<anonymous>)
    at fulfilled (/home/ubuntu/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.28/out/bundle.js:41:29599)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
console.ts:137 [Extension Host] Auto-install failed:  Error: Can't fetch release: rate limit exceeded
    at Object.<anonymous> (/home/ubuntu/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.28/out/bundle.js:42:1407)
    at Generator.next (<anonymous>)
    at fulfilled (/home/ubuntu/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.28/out/bundle.js:41:29599)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

System information Clangd version (from the log, or clangd --version):

Ubuntu clangd version 18.1.2 (++20240317023412+edbe7fa5fef9-1~exp1~20240317023427.81)
Features: linux
Platform: x86_64-pc-linux-gnu

clangd extension version: 0.1.28 Operating system: Ubuntu 20.04

Consider making this error more explicit by either:

imdanielsp commented 3 months ago

After I finished writing this issue, I thought it might be better to label this as a Feature Request–feel free to do so if you agree.

VoodaGod commented 17 hours ago

i have been getting this error as a popup today, but what does it actually mean?

HighCommander4 commented 4 hours ago

what does it actually mean?

On a high-level, it means the vscode-clangd extension is trying to make a network request to https://api.github.com/repos/clangd/clangd/releases/latest to check for or install an updated clangd binary, and the Github server is responding with a "rate limit exceeded" error.

As for why Github responds this way, I have no idea.

HighCommander4 commented 4 hours ago

Note that the automatic update check can be disabled by setting "clangd.checkUpdates": false.

It's always possible to update the clangd server manually by downloading the desired version from https://github.com/clangd/clangd/releases (or another source of your choice, like https://apt.llvm.org/ for Debian-based Linux systems) and pointing the extension to it using "clangd.path".