Anyone can explain OTA update caching


#1

Hi,

I’ve found that our app will update to the latest version using the OTA updates but then seemingly randomly will revert to the built version.

So it updates to version 1.8.9 and stays on that for a bit then reverts back to 1.8.7. Then after a few opens it will update again to 1.8.9.

Is there a way of knowing what causes this to happen?

Are the updates cached? It seems like it tries to get the very latest version each time and if that fails it falls back to the built in version, not the last seen.

Any help much appreciated!


#2

Hi @riverford_expo_ci - hmm, that’s definitely not the expected behavior. Could you share the following information:

  • Are you seeing this on both iOS and Android clients, or just one? (this is really important)
  • Which Expo SDK version is your app running?
  • Is your app detached? If not, when did you run exp build to get the binary with 1.8.7?
  • Have you used any of the exp publish:history/set/rollback commands? Or only exp publish?

#3

Hello,

Thanks for the quick response.
To answer some of your questions:

  • At the moment we’re focusing on iOS as we’re going to launch that version soon so I don’t actually have an android version of that build available. sorry that is probably not very helpful as you said this question is the most important

  • I’ve never used the rollback / history features, just publish

  • the app is not detached

  • I’m on version 29 of the sdk

  • there is a possibility that the ipa is at an earlier version (28 or 27) as I did update relatively recently and I think the build is from a few weeks back. I’ll need to double check that tomorrow when I’m back in the office (I’m on uk time :)) The thing is I would have thought in this case it wouldn’t have updated at all…

Thanks for your help again,


#4

Hi @riverford_expo_ci - thanks, that’s helpful. Could you also provide your updates config in app.json? Also, any additional information you can discern about when this reverting happens would be great.


#5

Hi,

My updates config is as follows:

"updates": {
      "enabled": true,
      "fallbackToCacheTimeout": 0
}

I’ve noticed that the revert occurs either:

a) after a period of time has passed, or
b) after switching the phone off

I was able to reproduce a few times using (b).

I’ve also had a chance to review my commit history, and it does look like the build was most likely sdk28 and the pushed version is sdk29, so I’ll deploy the new .ipa built with sdk29 and see if the problem persists.

Thanks,
Daniel


#6

@riverford_expo_ci - thanks for the additional info. I’m unable to reproduce this unfortunately, even after followng (b) – does it happen consistently for you after rebooting the device, or only sometimes?

Do let me know if building a new IPA seems to solve the issue.

Thanks a bunch, and really sorry for the trouble! :disappointed:


closed #7

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