Eas Update not working - branch v channel confusion?

144 views Asked by At

I read the EAS Update docs and thought i understood it. Making the updates as followed:

eas.json:

"production": {
      "channel": "main", 
      "env": { }
    }

I did not name the channel: "production" because I was under the impression when running eas update --auto it will use the name of the branch I am on. So in this case, my "production" branch is "main".

In my app.config:

updates: {
      url: 'https://u.expo.dev/hash-goes-here',
    },
    runtimeVersion: {
      policy: 'appVersion',
    },

In EAS, my Channels show: enter image description here

and the Linked Branches shows my last update as successful:

enter image description here

and the Update shows my last update too: enter image description here

I also have a useEffect to check, as suggested in the docs:

useEffect(function onFetchUpdateAsync() {
    async function checkIt() {
      try {
        const update = await Updates.checkForUpdateAsync();

        if (update.isAvailable) {
          await Updates.fetchUpdateAsync();
          await Updates.reloadAsync();
        }
      } catch (error) {
        // You can also add an alert() to see the error message in case of an error when fetching updates.
        console.error(`Error fetching latest Expo update: ${error}`);
        Bugsnag.notify(error as Error);
      }
    }
    if (__DEV__) return; //
    checkIt();
  }, []);

When I open my production app, I do not see the update. I tried uninstalling & reinstalling. I tried opening & closing multiple times.

Questions:

  1. Is it true that EAS Update will auto check without a useEffect when the app opens & closes?
  2. When running eas update --auto, from main branch, is this correctly linked to my production channel named main?
  3. Is there something else I am missing on this that would not make my updates appear?
0

There are 0 answers