Skip to content
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

Fix 404 error when attempting to download OpenVSX extensions #762

Merged
merged 1 commit into from Nov 10, 2023
Merged

Fix 404 error when attempting to download OpenVSX extensions #762

merged 1 commit into from Nov 10, 2023

Conversation

sethidden
Copy link
Contributor

@sethidden sethidden commented Nov 9, 2023

This change fixes this error when running (dap-node-setup): url-insert-file-contents: https://open-vsx.org/api/ms-vscode/node-debug2/latest/: Not found

The problem was that the OpenVSX URL template string had a trailing slash, which is not handled by OpenVSX's Registry API Controller: https://github.com/eclipse/openvsx/blob/master/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java#L348

I can't really find a blame in the OpenVSX repo which could've caused the extraneous trailing slash to stop working. Maybe the update to Java 17?

As you can see, there's no trailing slash at the end, so the route doesn't get mached in the controller and causes a 404 Not Found.

Just removing the slash does the job and (dap-node-setup) runs successfully.

References:

You can also try it yourself:

This change fixes this error when running `(dap-node-setup)`:
`url-insert-file-contents: https://open-vsx.org/api/ms-vscode/node-debug2/latest/: Not found`

The problem was that the OpenVSX URL template string had a trailing
slash, which is not handled by OpenVSX's Registry API Controller:
https://github.com/eclipse/openvsx/blob/master/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java#L348

I can't really find a blame in the OpenVSX repo which could've caused
the extraneous trailing slash. Maybe the update to Java 17?

As you can see, there's no trailing slash at the end, so the route
doesn't get mached in the controller and causes a 404 Not Found.

Just removing the slash does the job and `(dap-node-setup)` runs successfully.

References:
- #554 (comment)
- #700
@sethidden
Copy link
Contributor Author

Until the PR is merged you can just set the value of the custom variable in your local emacs config - M-x customize. Just set it to the URL without the slash like here.
image

@yyoncho yyoncho merged commit f6706fa into emacs-lsp:master Nov 10, 2023
5 checks passed
@yyoncho
Copy link
Member

yyoncho commented Nov 10, 2023

Thank you for contributing to dap-mode!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants