XMLHttpRequest Object throws occasional "Network Error" in TestFlight Production Environment
Description
Months ago, I submitted a bug request with the amplify-js team with AWS over a very frustrating bug that has been occurring periodically in our production app. Essentially when a user is on a relatively poor network connection (10ish MB/s upload speed or slower), the XMLHttpRequest will throw a Network Error and fail the upload to S3. After a few months of tracing, the issue is stemming directly from the XMLHttpRequest object, and not from Amplify itself.
Here is a reference to the issue: https://github.com/aws-amplify/amplify-js/issues/12912
You will find the entire error trace system within this github thread and ultimately determining where it's stemming from towards the end. Because it's occurring in production environment, I have not been able to make a perfectly reproducible example.
Steps to reproduce
My beta testing team is experiencing this issue every day at random in our production environment, and will gladly work with the react-native team to provide any logs necessary. It's obviously very difficult to get an example app that is firing this error over and over again because it's happening in production.
React Native Version
0.73.6
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 14.2.1
CPU: (10) arm64 Apple M2 Pro
Memory: 87.31 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.7.0
path: /opt/homebrew/bin/node
Yarn:
version: 1.22.22
path: /opt/homebrew/bin/yarn
npm:
version: 10.1.0
path: /opt/homebrew/bin/npm
Watchman:
version: 2023.09.04.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.6
wanted: 0.73.6
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
Refer to all of this github thread for all the issue screenshots and error windows:
https://github.com/aws-amplify/amplify-js/issues/12912
Reproducer
TBD
Screenshots and Videos
Refer to https://github.com/aws-amplify/amplify-js/issues/12912
| :warning: | Newer Version of React Native is Available! |
|---|---|
| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.73.7. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
| :warning: | Missing Reproducible Example |
|---|---|
| :information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
I am on the latest version now (73.8) and still occurs. Thanks, CHris