Skip to content

[🐛] 🔥 App slow to start with very poor connection (100% packet loss) #5658

Closed
@scottmas

Description

@scottmas

Issue

When I start my app with the network link conditioner turned on to 100% packet loss, my app takes roughly 30 seconds to start. Then eventually it starts after the native logs blow up with a rather opaque native error.

2021-08-27 13:56:53.798037-0600 ollieapp[9171:2245471] [connection] nw_socket_handle_socket_event [C1.1:3] Socket SO_ERROR [60: Operation timed out]
2021-08-27 13:56:53.807151-0600 ollieapp[9171:2245471] Connection 1: received failure notification
2021-08-27 13:56:53.807363-0600 ollieapp[9171:2245471] Connection 1: failed to connect 1:60, reason -1
2021-08-27 13:56:53.808126-0600 ollieapp[9171:2245471] Connection 1: encountered error(1:60)
2021-08-27 13:56:53.817518-0600 ollieapp[9171:2245471] Task <62F7AEA8-BBAD-4F78-9802-1851ED7DC666>.<1> HTTP load failed, 0/0 bytes (error code: -1001 [1:60])
2021-08-27 13:56:53.825673-0600 ollieapp[9171:2245468] Task <62F7AEA8-BBAD-4F78-9802-1851ED7DC666>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=60, NSUnderlyingError=0x280afc060 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=60, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <62F7AEA8-BBAD-4F78-9802-1851ED7DC666>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalUploadTask <62F7AEA8-BBAD-4F78-9802-1851ED7DC666>.<1>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog, NSErrorFailingURLKey=https://firebaselogging-pa.googleapis.com/v1/firelog/legacy/batchlog, _kCFStreamErrorDomainKey=1}
2021-08-27 13:57:22.940870-0600 ollieapp[9171:2245473] Task <E6575817-DE70-4D96-B9C5-793F721194D3>.<1> finished with error [-1001] Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x280afc270 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <E6575817-DE70-4D96-B9C5-793F721194D3>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <E6575817-DE70-4D96-B9C5-793F721194D3>.<1>"
), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=http://192.168.1.21:8081/status, NSErrorFailingURLKey=http://192.168.1.21:8081/status, _kCFStreamErrorDomainKey=4}
2021-08-27 13:57:23.044375-0600 ollieapp[9171:2245468] [connection] nw_socket_handle_socket_event [C3.1:1] Socket SO_ERROR [61: Connection refused]

I think the Firebase SDK is trying to phone home for some configuration data and doesn't realize that the connection is nonexistent (since I'm inducing 100% packet loss).

Project Files

We are a couple versions behind but we've had this exact same behavior for several versions we've used. I'm only now getting around to posting the bug.

react-native info output:

System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 35.28 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.1, 29.0.2
      System Images: android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5692245
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_152-release - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions