Rollbacks¶
Rollbacks are a way to revert to a previous bundle of your app. This is useful when you have deployed a new bundle of your app and it is not working as expected.
Automatic Rollbacks¶
The Live Update SDK can automatically roll back to the previous bundle if the new bundle fails to load or if your app does not signal that it is ready within a specified timeout period. To enable automatic rollbacks, you need to configure the readyTimeout option in your Capacitor configuration file.
{
"plugins": {
"LiveUpdate": {
"autoBlockRolledBackBundles": true,
"readyTimeout": 10000
}
}
}
The readyTimeout option specifies the maximum time (in milliseconds) to wait for your app to signal that it is ready before rolling back to the built-in bundle. The autoBlockRolledBackBundles option automatically blocks bundles that caused a rollback and skips them in future operations, preventing your app from getting stuck in a rollback loop.
Your app must call the ready() method directly at app startup before the timeout expires, otherwise the SDK will roll back to the built-in bundle. Call this method as early as possible in your app's lifecycle—for example, in the ngOnInit or created hooks (Angular/Vue) or in the useEffect hook (React) of your root component:
import { LiveUpdate } from "@capawesome/capacitor-live-update";
const initializeApp = async () => {
await LiveUpdate.ready();
// Continue with app initialization...
};
Read more about this configuration options in the Live Update plugin documentation.
Manual Rollbacks¶
You can manually roll back to a previous bundle using either the Capawesome CLI or the Capawesome Cloud Console.
To roll back to a previous bundle using the Capawesome CLI, you can use the apps:liveupdates:rollback command:
You will be prompted to select the app and the channel you want to roll back. After selecting the app and channel, you will see a list of previous deployments. Select the deployment you want to roll back to, and confirm the rollback.
To roll back to a previous bundle using the Capawesome Cloud Console, navigate to the app you want to roll back for, and click on the Channels menu item under the "Live Updates" section in the sidebar. Next, navigate to the history page of the desired live update channel. You will see a list of previous deployments with a "Rollback" button next to each deployment. Click the "Rollback" button next to the deployment you want to roll back to, and confirm the rollback.

A new deployment will be created that points to the selected previous bundle.