OTA update not updating components on iOS

Hey all,

I’m experiencing a weird issue with an OTA update. I have an app in the app stores, let’s call it version 1.0.0. I recently pushed an OTA update with minor string changes, but these changes aren’t reflected in the app until after a restart IN SPITE of the version number being correct.

Simplified, I did 2 things that were not reflected:

  1. Removed the subtitle in a view
<Text>Title</Text>
  <Text>Subtitle</Text>
    <Text>Main text</Text> 

I removed the middle tag (subtitle) in the update

  1. Changed a ‘wrong-login-creds’ string on the loginscreen from ‘wrong email and/or password’ to ‘wrong username and/or password’.

To be clear, here are some steps:

  1. User downloads app from app store, version 1.0.0 (visible on loginscreen, shown using Constants.manifest)
  2. User opens app, sees old strings and version 1.0.0
  3. User restarts app to apply update, verifies new version number (1.0.1), but the string changes are not applied
  4. User restarts app again, and this time both the version number and string changes are updated

I can consistently reproduce the problem following the steps above across 4 different iOS devices. Android works as expected.

Step 4 should not be necessary, as far as I understand. I’m really confused as to how it is possible for the app manifest to be updated without also applying the changes. It was my understanding that during step 2 where Expo checks for a new bundle on the CDN and downloads it, that it would apply the whole bundle as an update to the javascript VM, and not do it gradually or partially. Can someone explain the process that can lead to this problem?

It’s worth noting that I’m using "loadJSInBackgroundExperimental": true in app.json, and that I updated both version, expoBuildNumber, buildNumber (iOS) and versionCode (android) before pushing the OTA update.

Hi @jhalborg - thanks for reporting this. The behavior you’re seeing is likely because we download the manifest and actual JS code bundle separately – so in step 3, it’s using the new manifest (which it downloaded in the background in step 2) but has not yet downloaded the new JS code, as it needed a url from the new manifest in order to do this.

I think that things might work a little bit more seamlessly if you remove the "loadJSInBackgroundExperimental": true from your app.json – but note that clients will need to first receive a manifest without this key before it affects the process for future updates.

FWIW, we’re in the process of overhauling the OTA update process right now & hopefully removing the “experimental” tag from it, so you will likely see some significant improvements in the next few SDK versions. For instance, we will be protecting against the case where you have a mismatched manifest & JS bundle version (as you do in step 3).

Hope this helps and is not too confusing. Let me know if you have any other questions!

Thanks a lot for getting back to me, and so fast! :wink:

It all makes sense and explains the issue perfectly. It sounds great that you’re working on syncing up application of the new manifest to the new JS bundle. I wonder why the new manifest is needed to find the URL for the new JS bundle, though - couldn’t the bundle just be beside the manifest on the URL the app looks for a new manifest? But you guys probably have it covered :slight_smile:

In the meantime, should we perhaps add a note about it to the docs?

Thanks for all the great work you guys are doing :smiley:

It would be nice if it were simpler like that :sweat_smile: but for various reasons that’s just not how our system is designed.

If you’d like to send a PR to the docs that would be welcome. But note that we will likely be deprecating this feature very soon.

Thanks for your note, glad things are making sense!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.