Axonpack

Troubleshooting

The most common problems, with the cause and the fix for each.

Start here if something does not work. Each item has the symptom, the cause and the fix. The list shows the last error in a snackbar above its header card, in plain words with what to try, so read that first. The raw error goes to the console. The messages are listed under Errors.

"Previews aren't set up"

Cause. The config has no bucket URL: s3Config is left out, or its url is undefined, empty or blank. Usually the env value is missing, such as a build made without its .env. This is a setup state, not an error, so there is no snackbar. Fix. Set EXPO_PUBLIC_PREVIEW_S3_URL, or whatever the app passes as s3Config.url, then restart Metro with npx expo start --clear, or rebuild. See Settings and env files.

"The bucket URL ... is not a full address"

The snackbar says "Something went wrong." with this message under it, and has no Retry.

Cause. s3Config.url is set but does not start with https:// or http://, such as /previews or localhost:9000/previews. Fix. Pass the whole address, such as https://pub-<id>.r2.dev, then restart Metro with npx expo start --clear, or rebuild.

The list is empty

Cause. Nothing is published for this build's key. The app only asks for its own key. Fix. With the default compatibility: "appVersion" the key is the app version, so publish again after a version bump. With "fingerprint", a prebuild or any native or app config change gives a new key, so publish again from the code the installed build was made from. publish prints the URL of the list it wrote; compare its key with the build's, and its folder with the app's slug. The app reads only the folder named after its own slug.

"This build has no compatibility key"

Cause. The build was made without the config plugin. Fix. Add "@axonpack/preview" to plugins in the app config and make a new native build. Or pass buildKey in the config. See Compatibility.

"This build has no app slug"

Cause. The build was made without the config plugin, and the config passes buildKey but no slug. Without the slug the app can't tell which folder in the bucket is its own, so it reads nothing. Fix. Add "@axonpack/preview" to plugins and make a new native build, or pass slug with buildKey. See Compatibility.

"Expected JSON from ... but got text/html"

Cause. Something other than the bucket answered. The URL is not public, a tunnel or proxy is showing its login page, or the URL points at the wrong place. Fix. Open the URL from the message in a browser. Make the bucket or the tunnel public, give the app the read key, or pass the headers the proxy wants with s3Config.headers.

The bucket answers 403

The list says "The bucket refused access."

Cause. In the app: a private bucket without a read key, a read key without s3:ListBucket, or a signing region that does not match the bucket. In the CLI: the write key lacks one of the actions it needs. Fix. Check the key's policy against Storage, and set the region (PREVIEW_S3_REGION for the CLI, s3Config.region in the app) for an AWS bucket outside us-east-1.

Publish says to set PREVIEW_S3_URL

Cause. A required publish setting is missing. Fix. Set it in the shell or CI secrets, or in .env.local in the app's root. See Settings and env files.

Publish fails with "ECONNRESET" or "ECONNREFUSED"

For example preview: PUT files/<sha256> failed after 4 tries: ECONNRESET read ECONNRESET.

Cause. The connection to the bucket dropped, or nothing answered on its port: the server restarted or stopped, or a proxy or the network cut the connection. The CLI already tried that request 4 times over 7 seconds. Fix. Check that the server is up and that this machine reaches it, then run publish again. The files already uploaded are skipped. ENOTFOUND means the host name in PREVIEW_S3_URL doesn't resolve, and a certificate code such as CERT_HAS_EXPIRED means the HTTPS certificate is the problem. Neither is retried. See Errors and retries.

"No git branch to name the preview after"

Cause. A detached HEAD, which is normal on CI. Fix. Pass --id. The sample workflows pass the pull request's branch name.

Downloads fail with a cleartext error on Android

Cause. A release build refuses plain HTTP. Fix. Use HTTPS. For a local test server only, turn on android.usesCleartextTraffic with expo-build-properties in your app config.

Android cannot reach the local server

The list says "Can't reach the bucket at localhost:9000." On Android it also says to use 10.0.2.2 or adb reverse, with the bucket's port.

Cause. On the emulator, localhost is the emulator itself, not your computer. On a phone, the adb reverse was lost when it restarted. Or Android 17 refused the app local network access. Fix. Use 10.0.2.2 for the bucket's host on the emulator, or run adb reverse tcp:9000 tcp:9000 (again). Allow the local network permission in the app's settings.

"did not match its checksum"

Cause. A file came back different from what was published: a proxy changed it, or the bucket's file was replaced by hand. Fix. Publish the preview again. The half download was deleted, so nothing broken is left on the device.

A preview shows as Broken

Cause. It failed before the app had mounted the provider, so the next start loaded the default bundle. On Android that happens straight away. On iOS the failed start leaves a blank screen until the app is closed and opened again. Fix. Look at the error in that branch's code. Also check that the provider is mounted on every start, not behind a login or a lazy screen: a start that never mounts it counts as a failure. Once the fix is published, the row shows Update available, and the new download takes the Broken mark off. Switching to the preview also clears it.

Switch does nothing, or says the native side is older

Cause. The app's native code was not rebuilt after the package was added or updated. Fix. Make a new native build (npx expo run:ios, npx expo run:android, or EAS Build). Expo Go can't run this package.

The selected preview is ignored

Cause. The app runs on the old architecture, a preview was made with another Hermes version, or the preview was made for another native build. Fix. Turn on the New Architecture. Publish again from the code the installed build was made from. The device log has a warning for the first two cases.

A preview shows the installed build's web app

Cause. The preview was published without the file set, or under another name than the one the app asks for. Under Show details the header card then says Default copy. Fix. Check that publish printed files <name>: <n> files from <folder>, and that the name in the plugin's files option, the preview config's files and usePreviewFiles(name) is the same. A device that downloaded the preview before it had the set shows Update available; update it.

"files.www: web/dist has no files"

Cause. The folder named in the plugin's files option is missing or empty when you publish. With in the copy in the message, it's missing from publish's copy of the project. A .easignore that lists the folder leaves it out of the copy. Fix. Build the web app first or give the set a build command, or fix the folder, which is relative to the app's root. With a build command, check that it writes into that folder. Take the folder out of .easignore, or give the set a build command so the copy builds it.

"files.www: the build command failed"

Cause. The set's build command exited with an error, so nothing was published. Its own output is above the message. Fix. Run the command from the app's root to see it fail there. With --environment, a variable with secret visibility isn't passed to it; set that one in the shell or as a CI secret. Publish runs it in its copy of the project, after the copy's install. To look at the copy as the command saw it, run publish again with --keep-copy.

A script or the install fails in the copy

For example android: eas-build-post-install failed with exit code 1: bun run eas-build-post-install, or android: bun install --frozen-lockfile failed with exit code 1. The message ends with Run again with --keep-copy to look inside the copy.

Cause. Publish runs your eas-build-pre-install and eas-build-post-install scripts, and an install with a frozen lockfile, in its copy of the project. A script written for an EAS build machine may install system packages, use sudo or write to the home folder, which now happens on your computer. On EAS, eas-build-post-install runs after prebuild; the copy has no prebuild, so a script that edits ios or android fails when git ignores those folders. A frozen install fails when the lockfile doesn't match package.json. Fix.

  • Make the script skip what only makes sense on EAS: [ -n "$PREVIEW_PUBLISH" ] && exit 0.
  • Update the lockfile with an install in your folder, or set EAS_NO_FROZEN_LOCKFILE=1, as on EAS.
  • Or publish with --in-place, which runs no script and no install.
  • --keep-copy keeps the copy, so you can run the script there yourself.

"no lockfile in the app's folder or its workspace root"

Cause. The copy needs an install, and publish found no package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lock, bun.lockb or nub.lock next to the app or at its workspace root. With nub, an @expo/package-manager older than 1.14 doesn't know nub.lock, so you get this message too. Fix. Run your package manager's install once to make the lockfile, or publish with --in-place. For nub, update expo so that npm ls @expo/package-manager shows 1.14 or later.

"can't install with ... in a copy of the project"

Cause. Expo found a package manager that publish has no install for. It installs the copy with npm, Yarn, pnpm, bun or nub (see Install and hooks). The message names the manager Expo found and its lockfile. Publish stops before it copies anything. Fix. Publish with --in-place, which builds in your app's folder with no install.

Publish is slow, or the copy is large

Cause. Publish copies your workspace root, git-ignored files included, and installs in the copy, once per platform. A large generated folder that isn't on the skip list, such as a web app's build cache, is copied each time. Fix. List big generated folders in a .easignore at the workspace root, in .gitignore syntax. For a quick publish from a folder that's already installed, use --in-place.

"no git in the copy"

Cause. Your folder is a git worktree, or a submodule, whose .git is a file pointing at the real repository. Publish leaves it out, since git in the copy would change that repository. A script in the copy that runs git then fails with not a git repository. Fix. The preview's branch and commit still come from your folder. If a script needs git, publish with --in-place, or from a normal clone.

Dev preview servers lists nothing

Cause. The build is a release build, enabled or devPreviewServers is off, the build has no slug, or the device can't reach the computer. Fix. Use a debug build with the plugin, enabled and devPreviewServers: true. On a USB phone, run adb reverse for each port, or start the servers with preview start with adb on the PATH. See Dev preview servers.

A picked dev preview server doesn't load with expo-dev-client

The app starts on the server the dev launcher opened, not the one picked in the dev servers list.

Cause. In a build with expo-dev-client, the dev launcher chooses the server at launch. On iOS, an older Expo release, such as 57.0.8, also keeps the dev launcher's server when you tap a row. Fix. Tap the picked server's row after each launch. On iOS, use Expo SDK 58, or 57.0.23 or later. See Limits.

A computer on the same Wi-Fi doesn't show

A preview start on the same Wi-Fi, a teammate's or your own, doesn't show in the dev servers list.

Cause. The network sweep doesn't reach the computer, or the device can't reach it at all. A row also needs Metro to answer at the computer's address and port. Fix. Pull to refresh, which sweeps again. If it still doesn't show, open http://<computer's IP>:19150/servers in the phone's browser. preview start prints that IP as On a phone on this Wi-Fi: Add a host → <IP>.

  • The page doesn't load. The phone can't reach the computer at all, often because the Wi-Fi keeps devices apart (client isolation, common on guest Wi-Fi). Nothing finds it there, a host you add included. Use USB, or another network.
  • The page loads, and the computer's address is outside the phone's own /24. The sweep doesn't go that far. Add the computer as a host.
  • The page loads otherwise. Check the app's local network access: on iOS in Settings > the app > Local Network (see iOS asks first), and the local network permission on Android 17. Or add the computer as a host.

npx preview fails with a 404 in a bun project

Cause. npx can't read bun's install, so it looks for a preview package on npm. Fix. Use bunx preview with bun. An app installed with npm uses npx.

On this page