feedback icon indicating copy to clipboard operation
feedback copied to clipboard

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

Open MarcoMuellner opened this issue 1 year ago • 3 comments

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.

MarcoMuellner avatar Sep 24 '24 14:09 MarcoMuellner

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

drazisil-codecov avatar Sep 24 '24 16:09 drazisil-codecov

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

nikosatwork avatar Oct 11 '24 09:10 nikosatwork

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

drazisil-codecov avatar Oct 11 '24 13:10 drazisil-codecov

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

covecod[bot] avatar Nov 02 '24 07:11 covecod[bot]