Problem with Live updates (Ionic 5)

We have an Ionic project that we would like to publish in Google Play. However, we would like to install the Ionic deploy plugin in order to update the application on client’s devices easily. However, after installing the plugin the expected behavior is not met. I will now try to explain the steps I followed in order to give a good overview:

  1. Look at IonicPro Dashboard/Deploy/Destinations.
  2. Copy the installation instructions:
  3. Run the instructions in terminal:
    ionic deploy add
    –app-id=“IonicAppId”
    –channel-name=“Production”
    –update-method=“auto”
  4. I noticed that there is a message “Appflow deploy manifest written to ./www/pro-manifest.json”, however after I checked it turned out that there is no such file in the ./www directory. So, basically the only change of the installation is this line in the package.json file:

“cordova-plugin-ionic”: “5.4.7”

  1. I pushed the changes to IonicPro and build and .apk file there. Also installed the application on an Android device.
  2. I did some small HTML changes and pushed to IonicPro.
  3. Created a web build from last commit and assigned it to Production channel.
  4. Checked the app on the android device - changes are not there.

I would like to note that I tried the second alternative from the docs (installing cordova plugins) here: https://ionicframework.com/docs/appflow/deploy/api#plugin-variables however this did not work out either.

Last but not least, following the steps above I created the .apk file myself using AndroidStudio but the result was the same - live update does not work.

I would appreciate if anyone has an idea what is causing the issue.

1 Like

Hey Billiton,

We have the same problem. In our case we have tried IOS.
We implemented all the instructions from the appflow documentation and the step you listed above. however => no changes in the end result.

We are also used

ionic deploy add
–app-id=“IonicAppId”
–channel-name=“Production”
–update-method=“auto”

We have also noticed that there is no ./www/pro-manifest.json file.

Did you manage to solve the problem?

Kind regards and thxs,
O.

Hi,

This could be an issue with the live update plugin configuration used or any missing variables.

The best way to figure out what’s going on is to install the app on a device and call the following methods from the chrome / safari inspector. Call these methods from a fresh install of your Appflow native build.

IonicCordova.deploy.getConfiguration()
This will display the plugin config including the configured channel for this install.

IonicCordova.deploy.checkForUpdate()
This will tell us if an update is available.

IonicCordova.deploy.getCurrentVersion()
This will return all the details of the currently running deploy update including the job id of the web build deployed. This really helps to zero in on the specific update that’s causing a problem.

If you are not sure how to enable the chrome inspector refer the docs on the same here.

If the above does not help, feel free to contact Appflow support with the results and we can take a closer look.

Thanks,

Hi Likhith_Alla,
Thx for the fast reply and help.

This is the result

IonicCordova.deploy.getConfiguration()
There is an returning object

__zone_symbol__value: Object
appId: "4c997c64"
binaryVersion: "1.7.15"
binaryVersionCode: "1.7.15"
binaryVersionName: "1.7.15"
channel: "dev"
disabled: true
host: "https://api.ionicjs.com"
maxVersions: 2
minBackgroundDuration: 30
updateMethod: "background"

but for IonicCordova.deploy.checkForUpdate()
i have received following object (Although we have commited and deployed changes.)

available: false
compatible: false
partial: false

On IonicCordova.deploy.getCurrentVersion()
value: undefined

Any Ideas?
Thx for the great support.
O.

Thanks for the reply.

This could be a misconfiguration of the live update channel or any other values. It would be helpful for us to take a closer look at your dashboard and project configuration.

I would request you to get in touch with our Appflow support and be sure to add your App Id and other details.

Thanks,

1 Like