Periodic expo.io errors in serving production app OTA

  1. SDK Version: 41
  2. Platforms(Android/iOS/web/all): iOS/Android

We’re seeing a number of errors lately around fleeting timeouts on the update service, for example:

const { isAvailable } = await Updates.checkForUpdateAsync()

will throw Error: Failed to download manifest from URL: [redacted] on Expo

or sometimes Error: The Expo server timed out.

We don’t think these are just user network issues because we see successful calls leading up to the throws, and we’ve seen the failures ourselves on known good networks.

Any thoughts on what’s going on with this? We have some fallback logic for rare errors but we’re seeing a number each day, which is causing some poor experiences.

The updates service can have timeouts and outages since it is a web service, and depending on your app’s needs you can add a timeout and error handling like:

const timeoutPromise = new Promise((resolve) => {
  setTimeout(() => {
    resolve(null);
  } , 2000 /* choose what works for your app */);
});

let result;
try {
 result = await Promise.race([
    Updates.checkForUpdateAsync(),
    timeoutPromise,
  ]);
} catch (e) {
  // e is thrown if Updates.checkForUpdateAsync() fails before the timeout
}

if (result) {
  const { isAvailable } = result;
  ...
}

We also recommend checking for updates sparingly as network calls consume device battery life and increase server load. A good tactic is perhaps to check when an app is foregrounded if the last check was over a day ago, except on launch since updates are typically already checked.