After installing cordova-plugin-ionic for live update we get “Uncaught (in promise) String resource ID #0x0 error” in console and Channel not fired: onIonicProReady
“cordova-plugin-ionic”: “^5.5.3”,
After installing cordova-plugin-ionic for live update we get “Uncaught (in promise) String resource ID #0x0 error” in console and Channel not fired: onIonicProReady
“cordova-plugin-ionic”: “^5.5.3”,
are you using cordova or capacitor?
how did you install the plugin?
looks like you didn’t install it with the plugin variables which configure the plugin
We have capacitor v4 installed.
Background live update(Azure DevOps) works fine we followed the steps in the link Self-hosted Live Updates Setup - Appflow
LiveUpdates: {
appId: ‘test’,
channel: ‘test’,
autoUpdateMethod: ‘background’,
maxVersions: 2,
key: ‘public_key.pem’
}
Currently, we are trying manual update by setting autoUpdateMethod to none
We have installed npm i @capacitor/android@latest cordova-plugin-ionic@latest as per the steps provided in Live Updates API - Appflow
And called the below method
import { Deploy } from ‘cordova-plugin-ionic/dist/ngx’;
async performManualUpdate() {
this.updateStatus = ‘Checking for Update’;
const update = await this._deploy.checkForUpdate()
if (update.available){
this.updateStatus = ‘Update found. Downloading update’;
await this._deploy.downloadUpdate((progress) => {
console.log(progress);
})
this.updateStatus = ‘Update downloaded. Extracting update’;
await this._deploy.extractUpdate((progress) => {
console.log(progress);
})
console.log(‘Reloading app’);
this.updateStatus = ‘Update extracted. Reloading app’;
await this._deploy.reloadApp();
} else {
console.log(‘No update available’);
this.updateStatus = ‘No update available’;
}
}
Please let us know if we are missing anything
Did you run ionic deploy add --app-id="test" --channel-name="test" --update-method="none"
?
Or ionic deploy configure
? (both or them are mentioned in the link you provided)
Those commands should create some files or modify some files in your native project with information needed for live updates.
Those commands updated files strings.xml, and config.xml …but still, we get the issue
Uncaught (in promise) String resource ID #0x0
Channel not fired: onIonicProReady
I’ve noticed that when I answered the question, Ionic CLI 7.0.0 was already out and it renamed deploy
command to live-update
, so my answer was incorrect if using Ionic CLI 7.0.0 or newer, users should run
ionic live-update add --app-id="test" --channel-name="test" --update-method="none"
or ionic live-update configure
.
Also, if using Capacitor, there is now a new Capacitor plugin for live updates that you can use instead of the Cordova plugin, see Capacitor SDK Setup - Appflow