Skip to content

Find & fix a crash

CLI v3.0.2View Markdown

Outcome: the previously failing interaction succeeds, with evidence from the same app and device.

Connect a device or Cloud workspace, open your app’s source project, and configure the app package. For source-level debugging, use a debuggable build. See installation and configuration.

The app crashes when I open Settings. Reproduce it with Olef, inspect the
crash and relevant source, make the smallest fix, then apply the build
and repeat the same interaction. Report the before-and-after evidence.

Read the screen before acting:

Terminal window
olef ui dump

Find the actual selector for the failing action. For example, if your app exposes settings_button and the destination should contain “Settings”:

Terminal window
olef ui tap --rid settings_button --expect-text "Settings"

An unsuccessful postcondition is a useful observation; do not treat a delivered tap as proof that the destination opened.

Terminal window
olef why
olef log --last 5m --level e

why combines available crash/ANR, log, screen, and network evidence. Look at the verdict, exception, app frames, and hints. no_obvious_cause means no cause was established by those signals; it is not proof that the app is healthy.

For a bug that needs live state rather than a crash trace, use the debugger. For an offline handoff, olef collect gathers a diagnostic bundle; review sensitive data before sharing it.

Change the relevant source, then run from the configured Android project:

Terminal window
olef app apply

Read the returned result to see whether Olef applied code in place, restarted the activity, or reinstalled. A successful apply does not establish that the bug is fixed.

Repeat the same starting state and interaction. Assert the expected screen, inspect recent errors, and confirm the behavior that originally failed. Use a recording to save the flow as a regression test.

A failure may depend on app data, permissions, device version, or backend state. Preserve those conditions when reproducing it. Avoid clearing app data unless resetting that state is part of the test you intend to run.