React native - potential JS Thread restart on iOS

25 Views Asked by At

The app I'm currently working on allows users to upload some data to a server. Due to some problems on the server side, this upload request can take up to 30 minutes to resolve, at which point it times out. When the upload fails, the logs are sent to Sentry. I'm having a very unusual case with one of the users, on an iOS production build:

  1. The user starts the upload request
  2. After a few minutes, the app prints 'Running "MyApp', implying that it restarted
  3. The user thinks the upload failed, so he starts uploading again
  4. The app prints 'Running "MyApp' again
  5. I get a timeout error from the first upload attempt, after 30 minutes, which makes the app send the logs to Sentry

This scenario doesn't make much sense. If the user restarted the app manually, the logs shouldn't include lines from the previous process. Also, I shouldn't get a timeout error from a request executed before restarting the app. This makes me think that maybe the app didn't restart, but the JS thread did. However, I have no idea what could be causing this. It only happens while the request is waiting for a response, and during this time the user doesn't do anything. It also happens very rarely, we couldn't reproduce it in our local environments, so I can't provide a repo either.

It's worth noting that we're using react-navigation and react-native-screens.

Do anyone know if there's any known case where the JS thread could restart and cause this?

0

There are 0 best solutions below