Troubleshooting
This page is for anyone setting up or running KeepSnappy who meets an error. Find the line your log or init printed, and its fix is beside it. If yours is not here, ask whoever set KeepSnappy up on your team, or the person who invited you.
Fix common problems
Each line starts with what the log says.
--upload needs the project key in the environment variable KEEPSNAPPY_KEY: the secret does not reach the step. Add theenv:block withKEEPSNAPPY_KEYto the step that runskeepsnappy.cannot open a run set at …: invalid_key (check KEEPSNAPPY_KEY): the API refused the key withinvalid_key. The key inKEEPSNAPPY_KEYis wrong, or it no longer works. Make a new CI key on Setup, step 1, and store it as the GitHub secretKEEPSNAPPY_KEY.cannot open a run set at …: CI key was revoked. Ask an organisation owner or admin for a new CI key and update the CI secret. (check KEEPSNAPPY_KEY): someone stopped this CI key. Ask an owner or admin of your organization for a new one, and store it as the GitHub secretKEEPSNAPPY_KEY.Session failed: no run sent any data. Check that the build carries the SDK and that the app reaches the API.: the app was built withoutKEEPSNAPPY=1or withmeasureFromLaunchoff (plugin options), or it is not installed on the booted simulator. SetKEEPSNAPPY=1forprebuildand the build.Session failed — no iteration sent any data(thefarmcommand says iteration for a run), or a run whose app had sending switched off: the build has no SDK key or no API address. A build whose app sends its own measurements needs both (which builds do). Copy both from Setup, step 1, under Builds that send their own measurements. Set them asEXPO_PUBLIC_KEEPSNAPPY_KEYandEXPO_PUBLIC_KEEPSNAPPY_INGEST_URLin the build environment, and build again. The CI key does not replace the SDK key.Can’t tell — the device session failed, on BrowserStack: BrowserStack ended the device session before any run sent data. Open the session from theDevice session:line to see why, then run the job again. The step fails with exit1, even withverdict_gate: advisory.Session failed: no run sent any data. Every run failed its test command: your tests failed. Readtest.login each run folder ofkeepsnappy-out. With Maestro,test.logholds only its summary: the screenshots and view hierarchy of the failing step are in the debug folder it names (under~/.maestro/tests/).- Runs the log lists as
test-failed: that journey’s test failed. Read itstest.logfirst, whatever the Session failed line says. - Runs the log lists as
no-windows: the SDK recorded no measurement windows during the run. Check that the measuring build is active on the selected device and that the journey reaches a screen or taps while KeepSnappy records, from the run’s start to its end. - Can’t tell, “too few places could be judged”, with places that read “the component data at this place is incomplete”, or Can’t tell, “the judged measures are missing in one session” on a result judged with earlier rules: the build may have no render times:
renderTimesis off in the plugin options. Turn it on, then runprebuildand the build again. - Can’t tell, “main does not have enough sessions on this phone and journey yet”: run the workflow on
mainuntil it has 3 sessions on the same phone model. - HTTP 429 with error code
rate_limited: you sent too many requests to the API. Wait for the time inRetry-After, then try again. run_token_exhausted: one run sent more data than its run token allows. Run the job again. If it happens again, ask the person who invited you.
When you report an API error, include its request_id.
If init stops or leaves something to you
Each line starts with what init prints.
-
Cannot go on: The iOS bundle id is not in app.json or the Xcode project.: your app config builds the bundle id in code. Run init again with--bundle-idand the bundle id of the Release build you measure. Thebundle-idline ofdoctorreadsMISSuntilnpx expo prebuildwrites theios/folder. Until then, ignore thatMISS. Doctor exits 1 for it, also with--local. -
No changes made.: init could not ask its questions, for example in a script, in CI or in a coding agent. Run it again with--yes, then store the CI key withnpx --no-install keepsnappy init --key. -
By you:and a line to add: init does not editapp.config.jsorapp.config.ts. Add'@keepsnappy/react-native'to thepluginsarray returned by that config, keeping the entries it already returns. -
init does not set up Detox: writekeepsnappy.ymlby hand, with your Detox command as thecommandsetting (Any other test command). -
By you: Wrap the final config in metro.config.mjs:(or your config’s filename). Wrap the exported config withwithKeepSnappy, imported from@keepsnappy/react-native/metro.js. Pass it the final config after your existing resolver, transformer and other wrappers have been applied (Install by hand). -
By you: Make a CI job that checks out the pull request's head with its whole history (fetch-depth: 0): init found no workflow job it could copy. Follow the printed steps or copy the CI example from your test tool’s page: Maestro, Appium or e2e. For a local device or a device farm, choose your setup to find the build and run steps for that environment.
Init exits 0 once its changes are made, and lists what is left under Next steps. It exits 1 only when it cannot go on, an install fails, or --key cannot store the key. Running it twice changes nothing.
Setting up by hand: Install by hand. Without Expo’s prebuild: Bare React Native.
Doctor checks the upstream repository instead of your fork
If the key warning names a repository whose secrets you cannot list, check the repository gh repo view selects from this checkout. For a fork, set GH_REPO to your fork’s OWNER/REPO when you run doctor or keepsnappy init --key. Check the repository name before setting the key. If doctor names the right repository and still cannot list its secrets, ask a repository admin to check the CI secret.
A default branch other than main
KeepSnappy compares each pull request with one branch of your repository. For your app that branch is main, unless it was set to another. There is no dashboard setting for it yet, and the keepsnappy command cannot change it.
Init’s workflow runs on pushes to your repository’s default branch, for example develop. If that branch is not your app’s comparison branch, its sessions never count as main. Every pull request then reads No main to compare.
To check it, put the CI key in your shell and run npx --no-install keepsnappy doctor --group app. Its comparison-branch line reads FAIL when your workflow runs on a branch KeepSnappy does not compare with.
If your default branch is not main:
- Ask the person who invited you to have KeepSnappy compare with your branch.
- Read
mainon these pages as your branch. Run the workflow withgh workflow run keepsnappy.yml --ref develop, and a session on your Mac withnpx --no-install keepsnappy run --upload --wait --branch develop(Try it on your Mac).
Result still pending after the CLI stops waiting
If the CLI times out waiting for the result, open the dashboard link in its output. The session can still receive a result after the command exits. For a job that should wait longer, set --wait-timeout in minutes and leave enough time for it in the CI job. See Run exit codes.
Maestro
Each line starts with what you see. Maestro has the setup.
- The run stops and lists several simulators: more than one is booted and none is named. Set
deviceto the UDID, or pass--device. - A flow reads an empty value that your shell has set: Maestro forwards only
MAESTRO_*variables. Set the value under that name. - A renamed flow shows no history: a new file name is a new journey. Give
main3 sessions with the new name. - A flow that waits for an element fails on a slow runner: raise that wait’s
timeout. Do not add a fixed pause.
Appium
Each line starts with what you see. Appium has the setup.
- Runs listed as
no-windows: the SDK recorded no measurement windows. Check that Appium drives the measuring build on the simulator named indevice, and that it reaches a screen or taps while KeepSnappy records. Session failed: no run sent any data. Check that the build carries the SDK and that the app reaches the API.: the app under test is not the measuring build, or Appium installed another build over it. Build withKEEPSNAPPY=1and install that build once.- Every run starts with a slow session or times out: the first Appium session on a fresh runner needs time to start. Raise
timeout_seconds. - The activation link arrives but the SDK sends nothing: if the measuring build waits for activation, check that the Appium journey module starts the app after the link. If you pinned
@keepsnappy/appium-driver, check it against Versions that work together. An older driver can deliver the link without relaunching the app. - The suite drives another simulator than the one KeepSnappy reads: give both the same UDID, and boot only one simulator.
- A run is slow or odd after a failed attempt passed on a retry: KeepSnappy does not detect Appium retries. Set
specFileRetriesand the retries of your test framework to 0.
e2e
e2e (formerly TesterArmy e2e): each line starts with what you see. e2e has the setup.
- Runs refused with
e2e-ai-stepore2e-model-event: a test used AI. The dashboard and the log name the step. Move the test under youraitag, or to a job KeepSnappy does not wrap. - Runs refused with
e2e-retry: e2e retried a test. Turn its retries off with the--retriesoption, as in the command on the e2e page. - Runs refused with
e2e-report-missing: e2e wrote no newreport.json. Check that the command ran the tests, and that KeepSnappy reads the right path: setflows.e2e_reportwhen a script runs e2e. KeepSnappy prints the path it read. - Runs refused with
e2e-report-schema: the report is in a format this CLI does not read. Use thee2eversion that the e2e page names, or a newer CLI. - Exploration (
explore) stops the run before it starts: exploration is AI only and is never wrapped. - The first run is slow or times out: e2e builds its iOS runner on first use. Keep the unmeasured call before
keepsnappy run, and raisetimeout_seconds.