Skip to content

Commit 7be63bc

Browse files
committed
docs: scope the reasonless-session branch to the cause, not the dispatch (#3674)
The named-session row sits under the retry legend's dispatched: no umbrella, but the session-required family answers with no details at all. Reading the cause equivalence under that umbrella would promise a non-dispatch those responses never make, inviting a blind retry. The row now says the branch is on the missing-session cause only, and the missing dispatched keeps its usual no-guarantee reading.
1 parent 2ce7a12 commit 7be63bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎website/docs/docs/commands.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ Read-only commands such as `get`, `snapshot`, and `wait` report `no`, and so do
502502
These refusals carry `dispatched: no` and a typed `error.details.reason`, so branch on the reason, not the message:
503503
504504
- `session_or_device_selector_required`: the request had neither an active session nor a device selector. Open a session or pass `--platform`. Commands that require a session or a device selector before they read the request's target (`boot`, `clipboard`, `push`, `apps`, and siblings) answer this even when the request named a session the daemon does not hold.
505-
- `named_session_not_found`: the request named a session this daemon does not hold, with no device selector to fall back on (or no selector it can answer without the session — `appstate` on an Apple target refuses this even with an explicit device). The daemon lost its sessions (replaced or restarted), or the name is wrong; `agent-device session list` shows what it holds. Commands that require a session before they read anything else (interactions, `find` clicks, RN tooling) answer the same event as `SESSION_NOT_FOUND` with no reason; treat a reasonless `SESSION_NOT_FOUND` on a named session as this one.
505+
- `named_session_not_found`: the request named a session this daemon does not hold, with no device selector to fall back on (or no selector it can answer without the session — `appstate` on an Apple target refuses this even with an explicit device). The daemon lost its sessions (replaced or restarted), or the name is wrong; `agent-device session list` shows what it holds. Commands that require a session before they read anything else (interactions, `find` clicks, RN tooling, `screenshot`-style generic commands) answer the same missing-session cause as `SESSION_NOT_FOUND` with no `details` at all — so the same branch on the cause applies, but the `dispatched: no` guarantee above does not: read the missing `dispatched` as no guarantee, as usual.
506506
- `session_app_required`: a per-app setting was requested but the session binds no app and none was named. Run `open <app>`, or name the app on the request for a setting that takes one (`settings clear-app-state com.example.app`).
507507
- `app_not_installed`: the named app resolves to no installed app on the target. Run `apps --all` for the exact bundle id or package, or install the app, then retry.
508508
- `webdriver_route_unsupported`: on a WebDriver-backed device cloud, the driver does not implement the route; the limit is the cloud's driver, not the device. A command with a second route (`orientation` has two) tries it before failing. After an ambiguous failure on that transport, only read-only requests are resent.

0 commit comments

Comments
 (0)