Runtime / Mobile
Troubleshoot device sessions
Fix sessions that won't start, apps that start logged out or fail to install, missed targets, and viewer problems.
When in doubt, start with:
revyl device doctorSession Won't Start
Symptoms
revyl device startfails or hangs.revyl device infosays no active session.
Checks
- Confirm auth:
revyl auth status - Confirm active sessions:
revyl device list - Retry with explicit platform:
revyl device start --platform ios - If the project uses a session profile or
session.before_script, confirm you are in (or under) the directory that owns.revyl/config.yamland the script exits 0. Asession.before_script, or a profile script given as a repository path, must also be executable; a profile script given as a name needs its interpreter, as Script references describes. A mint failure aborts start before the device boots — see When a profile fails or Auth And Session Prep.
App Starts Logged Out
Symptoms
- Session boots, but the app shows a sign-in screen instead of the authenticated
state your session profile or
session.auth_bypassconfig should produce.
Checks
- Confirm cwd resolves the project that declares
session.profiles, orsession.before_script/session.auth_bypass(monorepo:cdinto the app directory that owns.revyl/). - Re-run start so the profile script or before script remints; launch env is fixed at boot, and a profile script runs only once per session.
- If you rely on org launch variables only (no before script), refresh those tokens — they expire independently of the session.
- Deep-link placeholders must come entirely from before-script output or entirely
from org vars; a mix fails at setup. Full contract:
Auth Bypass Deep Links. In a session profile's deep
link,
${NAME}fills only from stored launch configurations; write a token the script minted into the link as its value.
App Install or Launch Fails
Symptoms
installfails for app URL.launchfails with bundle ID errors.
Checks
- Verify build URL is reachable and points to APK/IPA.
- Re-run install and read returned bundle ID.
- Launch with exact bundle ID returned by install.
Grounded Target Misses
Symptoms
tap --targethits wrong location.type --targetfocuses wrong field.- A command with
--targetfails withtarget_not_foundand a non-zero exit code. Revyl found nothing on the screen that fits the description, so it sent no action to the device. With--json, stdout carries"success": falseand"error_code": "target_not_found".
Fixes
- Re-observe current UI:
revyl device screenshot --out debug.png - Use visible text in target:
--target "the 'Sign In' button" - If needed, fall back to raw coordinates (
--x,--y) for this step.
Actions Stop Working Mid-run
Symptoms
- Commands begin failing after earlier success.
- Session seems stale.
Fixes
- Confirm the session is still active:
revyl device list - Switch explicitly:
revyl device use <index> - If timed out, start a new session and continue.
Screenshot or Viewer Issues
Symptoms
- Screenshot command fails.
- Live viewer appears frozen.
Fixes
- Run
revyl device infoand confirmviewer_url. - Re-run
revyl device screenshot --out current.png. - Stop and restart session if the device session became unhealthy.
Quick Recovery Sequence
revyl auth status
revyl device list
revyl device doctor
revyl device stop --all
revyl device start --platform ios