bugsnag / bugsnag-react-native

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
https://docs.bugsnag.com/platforms/react-native
MIT License
370 stars 121 forks source link

502 Server Error when uploading bundle #446

Closed joebernard closed 4 years ago

joebernard commented 4 years ago

Description

I'm trying to upload my React Native (iOS) source maps to bugsnag.

Issue

The upload will return a 502 server error. Here is the exact response. I've retried several times and cannot get past it. It will wait for several minutes before it fails. Eventually it will accept the file, but only after multiple attempts.

<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>

Environment

Library versions:

├─ bugsnag-react-native@2.23.6
└─ react-native@0.61.5

Example command

npx react-native bundle --platform ios --dev false --entry-file index.js --bundle-output ios-release.bundle --sourcemap-output ios-release.bundle.map && curl https://upload.bugsnag.com/react-native-source-map -F apiKey=xxREMOVEDxx -F appVersion=0.0.2 -F dev=false -F platform=ios -F sourceMap=@ios-release.bundle.map -F bundle=@ios-release.bundle -F projectRoot=/opt/projects/myProject
snmaynard commented 4 years ago

Can you try adding a --http1.1 to your curl arguments? We have seen some issues with certain versions of curl and our load balancers using http2.

joebernard commented 4 years ago

This seems to have resolved it.