Updates.channel is coming as null after setting up expo-updates

430 views Asked by At

In my project I am using expo-sdk:43 along with expo-updates. I have setup the channel property in eas.json file.

{
  "cli": {
    "version": ">= 0.52.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "channel":"dev"
    },
    "preview": {
      "android": {
        "buildType": "apk"
      },
      "channel":"preview"
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

I have tried to publish my updates through EAS update, but it is not working and the app is not receiving any update. I have tried to do an apk build for the application, and tried to get the output of Updates.Channel and it is outputting as undefined.

eas build -p android --profile --preview

eas update --branch preview --message "update"

But, when I build the app, the build is successful, in the eas logs I can see that it shows that channel property has also been configured.

Can someone please help what might be the possible issue in this case?

I have also tried to do the same steps with an expo-init command (But with expo sdk:47) and minimal app setup and it is working as expected.

1

There are 1 answers

0
somecatdad On

Do you have the updates.url value configured in your app.json / app.config.js? (Here is the reference for that config.) Without this config URL set, the app won't know from where to attempt to fetch updates.

Alternatively, if you run eas update:configure from the command line, it should attempt to configure this for you.