Skip to content

Roll Back a Release

A rollback reverts to a previous bundle when a new one doesn't work as expected. The SDK supports automatic rollbacks (self-healing), and you can also roll back manually from the CLI or Console.

Automatic Rollbacks

The SDK can automatically roll back to the previous bundle if a new bundle fails to start. Configure readyTimeout and autoBlockRolledBackBundles:

capacitor.config.json
{
  "plugins": {
    "LiveUpdate": {
      "autoBlockRolledBackBundles": true,
      "readyTimeout": 10000
    }
  }
}
config.xml
<preference name="AUTO_BLOCK_ROLLED_BACK_BUNDLES" value="true" />
<preference name="READY_TIMEOUT" value="10000" />

readyTimeout is the deadline (in milliseconds): if your app doesn't call ready() within this window of starting, the SDK assumes the bundle is broken and reverts on the next launch. autoBlockRolledBackBundles prevents a rollback loop by blocking a bundle that has already triggered a rollback.

For this to work, call ready() as early as possible at app start — as soon as your bootstrap code has run without crashing:

import { LiveUpdate } from "@capawesome/capacitor-live-update";

await LiveUpdate.ready();
document.addEventListener("deviceready", async () => {
  await cordova.plugins.LiveUpdate.ready();
});

Manual Rollbacks

Roll back to a previous bundle from the CLI or Console.

Use the apps:liveupdates:rollback command:

npx @capawesome/cli apps:liveupdates:rollback

Select the app and channel, then choose the deployment you want to roll back to.

In the Console, open the channel's history page, find the deployment you want to roll back to, and click Rollback. A new deployment is created that points to the selected bundle.

Rollback Bundle