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

[Self hosted] Getting a 405 not allowed error on upload #524

Open
MarcoMuellner opened this issue Sep 24, 2024 · 3 comments
Open

[Self hosted] Getting a 405 not allowed error on upload #524

MarcoMuellner opened this issue Sep 24, 2024 · 3 comments

Comments

@MarcoMuellner
Copy link

Describe the bug
During our upload from the workflow we get a 405 method not allowed error. Here is the response (with verbose enabled)

info - 2024-09-24 14:24:06,671 -- Found 2 coverage files to report
info - 2024-09-24 14:24:06,671 -- > /home/runner/work/ae-platform-shell/ae-platform-shell/coverage/clover.xml
info - 2024-09-24 14:24:06,671 -- > /home/runner/work/ae-platform-shell/ae-platform-shell/coverage/coverage-final.json
debug - 2024-09-24 14:24:06,678 -- Selected uploader to use: <class 'codecov_cli.services.upload.upload_sender.UploadSender'>
debug - 2024-09-24 14:24:06,725 -- Sending upload request to Codecov
info - 2024-09-24 14:24:07,086 -- Process Upload complete
debug - 2024-09-24 14:24:07,087 -- Upload result --- {"result": "RequestResult(error=RequestError(code='HTTP Error 405', params={}, description='<html>\\r\\n<head><title>405 Not Allowed</title></head>\\r\\n<body>\\r\\n<center><h1>405 Not Allowed</h1></center>\\r\\n<hr><center>nginx/1.22.1</center>\\r\\n</body>\\r\\n</html>\\r\\n'), warnings=[], status_code=405, text='<html>\\r\\n<head><title>405 Not Allowed</title></head>\\r\\n<body>\\r\\n<center><h1>405 Not Allowed</h1></center>\\r\\n<hr><center>nginx/1.22.1</center>\\r\\n</body>\\r\\n</html>\\r\\n')"}
error - 2024-09-24 14:24:07,087 -- Upload failed: <html>
error - 2024-09-24 14:24:07,087 -- <head><title>405 Not Allowed</title></head>
error - 2024-09-24 14:24:07,087 -- <body>
error - 2024-09-24 14:24:07,087 -- <center><h1>405 Not Allowed</h1></center>
error - 2024-09-24 14:24:07,087 -- <hr><center>nginx/1.22.1</center>
error - 2024-09-24 14:24:07,087 -- </body>
error - 2024-09-24 14:24:07,087 -- </html>

I would like to understand where this error is coming from and why this is - and how to fix it on our end.

Environment (please complete the following information):
Github workflows

To Reproduce

Expected behavior
I expect the upload to work

Screenshots

Additional context
The same upload works on the SaaS version, token was generated.

@drazisil-codecov
Copy link

This is coming from either the gateway pod, if you are using it, or your nginx proxy in front of Codecov.

@nikosatwork
Copy link

Are you passing the --git-service option?
Git Provider. Options: github, gitlab, bitbucket, github_enterprise, gitlab_enterprise, bitbucket_server - documentation

@drazisil-codecov
Copy link

Also, as I just learned, if you are using http (no s) as the protocol for your upload URL, your POST calls convert to GET calls. Which, would fail as a Method Not allowed.

https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Development

No branches or pull requests

3 participants