> ## Documentation Index
> Fetch the complete documentation index at: https://qawolf-mktg-5213-self-service-faq-page.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Flows Troubleshooting

> Common issues when authoring or running flows.

## `platform.target` Throws

Cause: The active target was read before it was configured.

Check:

* the runner is setting the target before flow code executes
* tests and local tooling call `configureTarget(...)` explicitly

## `expect` Throws A Stub Error

Cause: The package code is running outside the runner-provided execution environment.

Check:

* the flow is running through the expected runtime
* local tooling is not calling the type-safe stub directly

## Callback Is Missing `page` Or `driver`

Cause: The flow uses the no-`launch` path, so launched runtime objects are not injected into the callback automatically.

Check:

* whether the flow should use `{ target, launch: true }`
* whether the flow should call `launch()` explicitly inside the callback

## Runtime API Called Outside The Flow Callback

Cause: `launch()`, `expect`, `device`, or `platform.target` was called at the module level, outside the flow callback.

Check:

* that all runtime API calls are inside the flow callback, not at the top of the file
* that module-level code is limited to imports, constants, and pure helper functions
