eas update works, but only on phone restart

After some finagling, I was able to get updates successfully passed to my app with the following command:

eas update --branch next --platform all --message “iterate to 1.0.1”

My relevant eas.json block looks like this:

"new": {
  "channel": "next",
  "android": {
    "buildType": "apk"
  },
  ios: {
    "enterpriseProvisioning": "universal",
    resourceClass: "m1-medium"
  }
}

What I am noticing is that when I test this on my Android, I have to actually restart my phone to get the update to show up. Opening the app alone doesn’t seem to do anything, regardless of how many times I open it. It’s also only after a restart of the phone that I see the app splash screen. Otherwise when I click the app icon I immediately see the login screen. Is this the expected behavior?

I am handling checking and applying updates if they exist like so:

  async componentDidMount() {
    await this.onFetchUpdateAsync();
  }

  onFetchUpdateAsync = async () => {
    try {
      const update = await Updates.checkForUpdateAsync();
      if (update.isAvailable) {
        await Updates.fetchUpdateAsync();
        await Updates.reloadAsync();
      }
    } catch (error) {
      alert(`Error fetching latest Expo update: ${error}`);
    }
  };

Hi @darrenbrett

If you just press the home button (or whatever it’s called), your app will not be closed. It will just be sent to the background. You’ll have to press the button that shows you your running apps and swipe your app away for it to actually close. (I believe your app might also close if the OS is running out of resources or something.)

So you shouldn’t need to reboot the phone, but you will need to make sure the app is actually closed by swiping it away.

Sorry, I don’t know the proper names for the buttons or the app list that you can close your app from :slight_smile:

1 Like

Thanks, that makes sense. I appreciate the response!

1 Like

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