{
  "id": 3226188,
  "title": "How we detect a bad Capacitor OTA and roll it back in 10 seconds",
  "url": "https://urgent.news/2026/08/25/how-we-detect-a-bad-capacitor-ota-and-roll-it-back-in-10-seconds",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T08:36:47.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/capgo_app/how-we-detect-a-bad-capacitor-ota-and-roll-it-back-in-10-seconds-84"
  },
  "original_language": "en",
  "account": "JavaScript is shipped over the air for the author's job. The worst scenario for them is not a malfunctioning button label, but a bundle that fails to boot. They designed @capgo/capacitor-updater to have a self-check feature, so the phone can determine if the new folder of HTML and JavaScript is faulty and revert to the previous good bundle. This decision is a handshake between JavaScript and native code. If JavaScript fails to complete the handshake within 10 seconds, the native code restores the last working bundle. The default window for this handshake is ten seconds. The function that triggers this handshake is notifyAppReady(). Every time the app launches, the native plugin serves a bundle, either the one included in the binary or a zipped download from earlier. The app checks if the bundle is functional by calling notifyAppReady(). If the bundle is broken, the app will fail to boot within the 10-second window, and the previous version will be restored. The 10-second timer resets with every new launch and does not carry over from the previous launch. To test a broken bundle, the author uses the @capgo/cli tool to create a test channel, upload a faulty bundle, and then synchronize the app. After ten seconds, the app should revert to the previous bundle.",
  "summary": "I ship JavaScript over the air for a living. The failure mode that still keeps me honest is not a bad button label. It is a bundle that never boots. When we designed @capgo/capacitor-updater , I did not want a cloud dashboard to be the only undo button. The phone has to decide, by itself, that the new folder of HTML and JS is dead and put the last good folder back. That decision is a handshake.…",
  "key_points": [
    "JavaScript shipped OTA for app updates",
    "Self-check feature detects faulty bundles",
    "Native code restores previous bundle if handshake fails"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}