AppDeath

data class AppDeath(val sequence: Long, val kind: AppDeath.Kind, val packageName: String, val processName: String, val pid: Int, val at: Instant, val exceptionClass: String, val message: String, val stackTrace: String, val watched: Boolean, val handled: Boolean, val serial: String)(source)

A crash or ANR of an app on the device, as Android logged it and the host server recorded it (Device.appDeaths, CommandException.appDeath, AppDiedException).

Only watched deaths (watched) explain command failures, end waits and fail tests: deaths of an app started through this attachment (launch, coldLaunch, foreground, openLink) or named by a command's selector (anything inside device.app(pkg)), from then on.

Constructors

Link copied to clipboard
constructor(sequence: Long, kind: AppDeath.Kind, packageName: String, processName: String, pid: Int, at: Instant, exceptionClass: String, message: String, stackTrace: String, watched: Boolean, handled: Boolean, serial: String)

Types

Link copied to clipboard

Properties

Link copied to clipboard
val at: Instant

The device clock when Android logged it.

Link copied to clipboard

A crash's exception class (java.lang.IllegalStateException, or Native crash); empty for an ANR.

Link copied to clipboard

Whether a client already has it: a command's error carried it, or a Device.guard, Device.allowDeaths, Device.expectDeath block or an end-of-test check took it. A handled death explains no later failure, ends no wait and fails no test.

Link copied to clipboard
Link copied to clipboard

A crash's exception message, or an ANR's reason (Input dispatching timed out …).

Link copied to clipboard
Link copied to clipboard
val pid: Int
Link copied to clipboard

The process: packageName or packageName:suffix.

Link copied to clipboard

Per attachment, from 1, in the order Android logged the deaths.

Link copied to clipboard

The serial of the device it died on.

Link copied to clipboard

A crash's stack trace from the crash buffer (at most 32 KiB); empty when it scrolled out, and for an ANR.

Link copied to clipboard

com.shop crashed (pid 23554): java.lang.IllegalStateException: Out of stock.

Link copied to clipboard

Whether the app was watched when it died.