doctor
Every check hotcodepush doctor runs, from the configuration and the session to the build step wiring and the signing keys, each one ok, skipped or failed.
hotcodepush doctor checks the project: its configuration, the hook wiring, the signing key, the hosts and the versions a bug report needs.
It changes nothing and asks nothing. Every check prints one row, ok, skipped or failed, with the manual step under a failure.
Running init repairs most failures.
hotcodepush doctor
hotcodepush doctor --jsonThe checks
The checks run in this order. An API that cannot be reached fails session and the checks that read it, and the rest still run.
| Check | Verifies |
|---|---|
configuration | hotcodepush.json is found walking up from the working directory and names an appId and a channel. |
session | The stored session or HOTCODEPUSH_TOKEN is a credential the API accepts. The check is skipped without either. |
app | The app and the channel the configuration names exist for you. The check is left out when session was skipped or failed. |
framework | The check runs only when the project's framework cannot be told from package.json. |
package | The framework's SDK package is in package.json and installed in node_modules. |
hook | The build step is wired: the Xcode phase and the Gradle line, the Expo config plugin entry, or the Cordova plugin. |
import | On Capacitor only, a script or component file under src/ imports @hotcodepush/capacitor-live-updates, which tells the SDK the app rendered. The check is skipped without src/. |
host | On React Native only, the app delegate returns HotCodePush.bundleURL() and MainApplication.kt builds its host with HotCodePushReactHost. |
android_file_mode | On Cordova only, config.xml leaves AndroidInsecureFileModeEnabled off. |
hosts | The API and the two hosts a device reads from answer within 5 seconds. |
signing_key | Every public key hotcodepush.json lists is registered with the app, and HOTCODEPUSH_SIGNING_KEY, when set, belongs to one of them. The check is skipped while code signing is off. |
versions | The check prints the CLI, Node, framework and SDK versions. |
The command exits 1 with doctor_failed when any check failed, and 0 otherwise. A missing session never fails it.
Under --json the same content is one document: status, clean or failed, and checks, each with its check, status and message, plus manualStep and code on a failed one.
The code is the error's when an error failed the check, and otherwise the check's own reason: project_config_missing, project_config_invalid, package_missing, package_not_installed, wiring_missing, import_missing, insecure_file_mode, host_unreachable, public_key_unlisted or public_key_unregistered.
An agent performs every manualStep and runs doctor --json again until status is clean. A device that still takes nothing is a question for Troubleshooting.
Last updated on