Http status codes of 5xx should be counted as failed uploads
Closed this issue · 4 comments
Expected behavior
"uploaded successfully" message should be accurate
Observed behavior
"uploaded successfully" message is inaccurate because it counts http status code of 502 as a success. This is probably because curl exits with 0 since it successfully received a response from the server.
example out put
Uploading UUID: 8C347340-A95A-31CA-B9A1-AD02BC7D4895 (arm64) /a/b/appDsyms/8c347340-a95a-31ca-b9a1-ad02bc7d4895.dSYM/Contents/Resources/DWARF/abcd
<html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>502 Server Error</title> </head> <body text=#000000 bgcolor=#ffffff> <h1>Error: Server Error</h1> <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2> <h2></h2> </body></html>
Steps to reproduce
Not sure why my uploads fail but I do see the script output the html from the server that indicates a 502.
Version
bugsnag-dsym-upload 1.4.1
Additional information
Adding --fail to the curl command will probably fix this
Can't comment on Issues?
Some users have been unable to comment on Github issues when an adblocker extension is enabled.
We recommend temporarily disabling the extension, or if that fails, contacting support@bugsnag.com.
Hi @freddy1h
Thanks for the report - we will look into it and get back to you.
With regards to your 502 error, we've seen issues with uploading which appear to affect some customers with the cURL version on MacOS Catalina. Upgrading the version of cURL appears to resolve this but we've found the most straightforward workaround is to force cURL to use HTTP1.1 since the issue only appears to affect HTTP2.
We released a new version of bugsnag-dsym-upload v1.4.2 which applies the workaround for this issue.
Upgraded to 1.4.2 and I haven't seen any 502s yet. Thanks. However, the issue still stands since the script will actually incorrectly count 502 as successful upload. Unless I missed something.
@freddy1h Yes you are correct, we will look into getting this fixed.