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

Broken API with command-not-found.com #13

Open
geekorous opened this issue Nov 6, 2022 · 2 comments
Open

Broken API with command-not-found.com #13

geekorous opened this issue Nov 6, 2022 · 2 comments

Comments

@geekorous
Copy link

Recently I have noticed some queries to cmd.cat does not work as expected. After evaluating the error and digging into the design, I figured out the install.sh script in the images is not working properly. Going further, I noticed it is because queries of the form curl -sSfL "https://command-not-found.com/-/api/package/alpine/$COMMAND" do not return a string anymore, but a full web-page that makes the whole code broken. I could not find the public API of the website to come up with a fix by myself, but I'd like to ask you to fix the command-not-found.com API back to its previous stage, so cmd.cat becomes operational again. Thanks for your amazing code.

@Matir
Copy link

Matir commented Jan 9, 2023

Obviously I'm not testing from the same endpoint as cmd.cat uses, but it seems to be resulting in some kind of cloudflare error/captcha page. I suggest allowlisting the source IP for cmd.cat to command-not-found.com.

@bugreportsonly
Copy link

As stated in the original post, the single API endpoint on https://command-not-found.com (as per #3 (comment)) is no longer returning simple content. If viewed in a browser it looks fine, but if you check the source the issue is apparent. It doesn't look like captcha or errors to me (but some of it does look to be Ad and Tracking JavaScript). The end result is that no packages are ever added by install.sh and those layers are empty in the served Docker image.

@lukaszlach It is impossible to use this tool as-is without that endpoint working, even if running the project locally.
This was a great tool and it'll be a shame if it lost due to invisible markup on an API endpoint.

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

No branches or pull requests

3 participants