EAS update not updating on my app

Hello team!

I am implementing OTA in my managed expo app first time and struggling to get update from last one week.
I referred Updates - Expo Documentation, Get started - Expo Documentation and Use EAS Update - Expo Documentation docs.

APP.JSON: added

"updates": {
      "checkAutomatically": "ON_ERROR_RECOVERY",
      "fallbackToCacheTimeout": 0,
	  }

IN APP.JS ADDED

import { View, Button } from 'react-native';
import * as Updates from 'expo-updates';

export default function App() {

  async function onFetchUpdateAsync() {
    alert(`update:${Updates?.releaseChannel}`)
    alert(`updatemainifest:${Updates?.manifest?.releaseChannel}`)
    try {
      const update = await Updates.checkForUpdateAsync();

      if (update.isAvailable) {
        alert('update.isAvailable:true')
        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.
      alert(`Error fetching latest Expo update: ${error}`);
    }
  }

  const eventListener = (event) => {
    alert(`EVENT FIRES ${event}`)
    if (event.type === Updates.UpdateEventType.ERROR) {
      // Handle error
      alert('UPDATE ERROR');
    } else if (event.type === Updates.UpdateEventType.NO_UPDATE_AVAILABLE) {
      // Handle no update available
      alert('UPDATE NO_UPDATE_AVAILABLE');
    } else if (event.type === Updates.UpdateEventType.UPDATE_AVAILABLE) {
      // Handle update available
      alert('UPDATE UPDATE_AVAILABLE');
    }
  };

  Updates.useUpdateEvents(eventListener);

  return (
    <View>
      <Button title="Fetch update" onPress={onFetchUpdateAsync} />
    </View>
  );
}

AND EAS.JSON

{
  "cli": {
    "version": ">= 3.13.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "channel": "development"
    },
    "preview": {
      "channel": "preview",
      "distribution": "internal"
    },
    "production": {
      "channel": "production"
    }
  },
  "submit": {
    "production": {}
  }
}

after that I run the production build and that i deployed in the PLAYSTORE -INTERNAL TESTING but I am not getting latest updated.
I used
eas build --profile production --platform android
eas submit --platform android
eas update --branch production --message “Updating the app”
command.
Here is some screenshot of expo.dev Once i click update button i will getting error message FAIL TO DOWNLOAD MANIFEST FROM THE URL


image

Please gait me is any steps i am missing?

hi there! sorry you’re having some issues here.

i’d suggest referring to the following guides:

if those don’t help, please share any other info that you’ve learned from there

1 Like

Thank you soo much, i checked the first link and the procedure solved the issue i was facing

Hey quixcel, am currently facing the same problem. What was your issue and how did you resolve it?

Same here! My app is detecting the updates but not applying the updates. From android logs I can see an error while parsing a date but I dont know if it could be it

Just solved the issue. In my case it was just adding

requestHeaders: {
        "expo-runtime-version": xxx,
        "expo-channel-name": xx
      },

under expo.updates on app.config.js

1 Like

I suppose that I’m facing the same error as my error message reads as follows.

code: ERR_UPDATES_CHECK 
message: "channel-name" is not allowed to be empty.

@komonpavs I think your workaround would work for me. Thanks.
However, isn’t it a bug then? I set build.production.channel to production in eas.json. Also, EAS update worked properly 1 month ago with the same code.

I would say so, my problem was that the not the channel name nor the runtime version were being set on the manifests so I hope that solution works for you!

1 Like