Updates.checkForUpdateAsync() fails with Manifest verification failed or Failed to download manifest from URL

Please provide the following:

  1. SDK Version: 42
  2. Platforms(Android/iOS/web/all): iOS and Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Within my react code, every minute I’m having the phone run Updates.checkForUpdateAsync() to check to see if there are any updates. If so, it let’s the person know and then applies the update. I recently put some logging in place to see if there were any errors around this code and a ton of Manifest verification failed (for iOS) and Failed to download manifest from URL (for Android) errors are streaming in. Sometimes it works, sometimes it doesn’t. The code I’m using looks like this:

  React.useEffect(() => {
    let timeoutId: number;
    const updateChecker = async () => {
      try {
        const update = await Updates.checkForUpdateAsync();
        if (update.isAvailable) {
          await Updates.fetchUpdateAsync();
          Alert.alert(
            'Update Available',
            'An update has downloaded and will now be applied.',
            [{
              text: 'OK',
              onPress: () => {
                Updates.reloadAsync();
              },
            }],
          );
        } else {
          timeoutId = setTimeout(updateChecker, 1 * 60 * 1e3); // every 1 min.
        }
      } catch (e: any) {
        // Sometimes Expo Update has issues with checking if there is a new
        // version and returns these intermittent errors.  Ignore these two
        // particular errors and just keep trying. We also want to report
        // to Sentry just to see how bad this really is.
        if (
          e.message === 'Manifest verification failed'
          || e.message.startsWith('Failed to download manifest from URL')
        ) {
          Sentry.captureException(e);
          timeoutId = setTimeout(updateChecker, 1 * 60 * 1e3); // every 1 min.
        // Expo Update doesn't work in dev, so just ignore these particular errors and send
        // everything else to Sentry
        } else if (!e.message.startsWith('You cannot check for updates in development mode.')) {
          Sentry.captureException(e);
        }
      }
    };

    updateChecker();

    return () => {
      if (timeoutId) {
        clearTimeout(timeoutId);
      }
    };
  }, []);

Is it possible the endpoint for pulling the manifest is not reliable and is somehow timing out?

Hey @codylundquist, I’m going to raise this internally. To get a clear sense of the picture, how long have you been monitoring this and how consistent is the error rate? Interested to know if this could’ve been a transient event but from your description it sounds like that’s not the case.

Cheers,
Adam

Hi @adamjnav,

Sorry for the late reply! I totally did not see that you responded. Here is a screenshot of a Sentry graph from the last 24 hours. You can see the numbers over the largest bar and extrapolate from there.
image

And here is the same, but over 30 days:
image

Note: These times are in PST.

@adamjnav, any movement on this? I realize it’s the holidays, but just making sure someone is looking into it. I’m pretty sure this is the reason why our app intermittently gets stuck on the loading screen.

Hey @codylundquist, thanks for following up! I’ve relayed this internally and we’ll reach out once we’ve assessed and figured out what the next steps are. But, as you noted, it’s the holiday break so it will be a bit before we can dive into this.

Cheers!

2 Likes

Perfect! Thank you :)!

Hello, @adamjnav and @codylundquist. I have exactly the same issue as @codylundquist described above. Did you figure out anything? Thanks

1 Like

Hi there, we have the same issue. Is there any news?
SDK Version:43

1 Like

Wanting to bump this back to the top :). Any news?

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