跳转到内容

Debugging

此内容尚不支持你的语言。

Understanding cloud logs:

Sent from the backend

codeDescription
InvalidIpThe user is located in a Google data center and the update is less than 4 hours old. This is done to prevent Google bots’ devices from counting as devices in your account.
needPlanUpgrade (previously needUpgrade)Indicates that you have reached the limit of your plan, and the device will not receive updates until you upgrade or until the next month.
noNewThe device has the latest available version.
disablePlatformIosThe device is on the iOS platform, but that is disabled in the channel settings.
disablePlatformAndroidThe device is on the Android platform, but that is disabled in the channel settings.
disableAutoUpdate”major"
disableAutoUpdateUnderNativeThe device has version (1.2.3), and the channel has an update (1.2.2) under the device version to send, but that is disabled in the channel settings.
disableDevBuildThe device has a dev build, but that is disabled in the channel settings.
disableEmulatorThe device is an emulator, but that is disabled in the channel settings.
cannotGetBundleFailed to generate a valid signed URL for the bundle download. This occurs when the bundle URL generation fails or returns an invalid URL (not starting with http/https) and there’s no manifest available as a fallback.
cannotUpdateViaPrivateChannelThe device tried to self-associate with a private channel, but the channel settings don’t allow device self-association (allow_device_self_set is false) and the channel is not public.
channelMisconfiguredThe channel is configured to disable auto-update by version number (disable_auto_update: 'version_number'), but the bundle’s min_update_version field is null, making it impossible to determine which devices should receive the update.
disableAutoUpdateMetadataAuto-update is disabled by version number metadata. The channel requires the device’s version to be at least min_update_version, but the device’s current version is lower than this threshold.
disableAutoUpdateToMajorChannel setting disable_auto_update: 'major' prevents updates that would increase the major version number (e.g., blocking 1.x.x from updating to 2.x.x).
disableAutoUpdateToMinorChannel setting disable_auto_update: 'minor' prevents updates that would increase the minor version number (e.g., blocking 1.2.x from updating to 1.3.x).
disableAutoUpdateToPatchChannel setting disable_auto_update: 'patch' prevents updates that would increase the patch version number, or allows only patch-level updates within the same major.minor version (e.g., 1.2.3 can update to 1.2.4 but not 1.2.2 or 1.3.0).
missingBundleThe bundle assigned to this channel has no downloadable content. This means the bundle has no external_url, no r2_path, it’s not a built-in version, and there are no manifest entries available for download.
NoChannelOrOverrideNo default channel is configured for this app and the device has no specific channel override assigned. At least one must be present for updates to work.
rateLimitedThe device has been rate limited due to excessive requests.

Sent from the device

codeDescription
pingInternal test action used to verify the stats system is working correctly.
getInfo for downloading the new version has been sent to the device.
deleteOne bundle has been deleted on the device.
setA bundle has been set on the device.
set_failThe bundle failed to set.
resetThe device reset to the builtin bundle.
download_XXA new bundle has been downloaded - progress indicated by XX% (increments of 10%).
download_completeThe new bundle has finished downloading.
download_manifest_startThe device started downloading the update manifest.
download_manifest_completeThe device finished downloading the update manifest.
download_zip_startThe device started downloading the bundle archive.
download_zip_completeThe device finished downloading the bundle archive.
download_manifest_file_failOne manifest entry failed to download; the stats payload puts version_name in the form version:fileName to pinpoint the asset.
download_manifest_checksum_failThe manifest file failed checksum validation.
download_manifest_brotli_failThe manifest file failed to decompress using Brotli.
download_failThe new bundle failed to download.
update_failThe new bundle has been installed but failed to call notifyAppReady.
checksum_failThe new bundle failed to validate the checksum. If you’re using Capgo Cloud and encounter this error, it typically means your app version is expecting a different checksum type. The latest version of the CLI and plugins (version 6.25.0 or 7+) use SHA256 checksums, while older plugins used CRC32. If you see a checksum fail, check if the checksum is CRC32 (a shorter hash) rather than SHA256. This usually indicates the bundle was uploaded with an old version of the CLI. Verify your bundle version in the Capgo dashboard - bundles created since version 6.25.0/7 should use SHA256. If you’re seeing CRC32 checksums, ensure you have the latest plugin version installed locally (the CLI checks your local plugin version to determine which checksum type to upload), then upgrade your CLI and re-upload the bundle.
windows_path_failThe zip has files who contain windows path who are illegal
canonical_path_failThe path of files is not canonical
directory_path_failThere is an error in the path of zip files
unzip_failunzip failed
low_mem_failDownload failed because of low memory in the device
app_moved_to_backgroundThe application entered the background state.
app_moved_to_foregroundThe application entered the foreground state.
decrypt_failFailed to decrypt the downloaded bundle.
getChannelThe current channel for the device was queried.
setChannelA channel was successfully set for the device.
uninstallThe application was uninstalled or Capgo data cleared.
blocked_by_server_urlServer.url is present in your capacitor config, this make Capacitor serve remote url and ignore local files, while our updater is made to function with local file, Server.url Is consider by Capacitor Makers as bad practice in production and will lead to many issue and plugin not working correctly.

Bundle status

  • SUCCESS: install bundle done
  • ERROR: install or download failed
  • PENDING: Download done, pending release
  • DELETED: Bundle deleted, still presented for stats
  • DOWNLOADING: Currently downloading a bundle

Understanding device logs:

Debug command:

There is a debug command for Capgo cloud users.

Terminal window
npx @capgo/cli@latest app debug

This will allow you to check all events happening in the app and find a solution if updates don’t happen.

IOS

to find your logs on Xcode

Android:

to find your logs on Android studio

Explanations Logs

  • Failed to download from => same as download_fail
  • notifyAppReady was not called, roll back current bundle => same as as update_fail

Finding the downloaded bundle in your device

iOS

To debug on iOS, you need to dump the app on your computer, you can do it like this:

Xcode has a built-in feature for inspecting the file system of developer-installed apps on an iOS device. image

To achieve this:

  • Connect your device to your Mac and select Window > Devices in the Xcode menubar.
  • Select your device in the left pane under the Devices section.
  • This will show a list of developer-installed apps for that device.
  • Select the app you want to inspect and then select the 3 dots icon near the bottom of the screen.
  • Here you can view the current file system by selecting download a snapshot of it.

image

Selecting Download Container… will download and export a snapshot of the file system as a .xcappdata file that you can browse through.

image

Right-click on this file and select Show Package Contents to open the folder.

Open the App Data folder, and you should now see a few folders like Documents, Library, tmp, etc.

image

Then you will find a version in 2 folders:

library/NoCloud/ionic_built_snapshots is necessary after the app reboot

and documents/versions for hot reload

Android

To debug on Android, you need to access the device from Android Studio:

  • Click View > Tool Windows > Device File Explorer or click the Device File Explorer button in the tool window bar to open the Device File Explorer.
  • Select a device from the dropdown list.
  • Open the path data/data/APP_NAME/ where APP_NAME is your app ID.

image

Then Find the versions folder to see all the versions

Understanding ios production crash logs