Error Reports
Appelium provides non-fatal error reporting via simple APIs. When enabled, you can report errors that don't cause crashes but are still worth tracking and investigating.
What error reports contain
Each error report includes:
- Error message provided by the caller.
- Error timestamp at the moment the error is reported.
- Application logs captured up to the moment of the error.
- User identifier if one has been set.
- File attachment if provided via the delegate.
Enabling error reporting
As all Appelium SDK features, error reporting is off by default and needs to be explicitly enabled during Appelium initialization:
AppeliumFeedback.start(
apiKey: <#api key#>,
errorReporting: .enabled()
)
Reporting errors
Once enabled, you can call the following API to report errors to the Appelium Dashboard:
AppeliumFeedback.reportError("Unable to parse response JSON")
Error reports are collected within the current session and uploaded together with other session diagnostics when the app transitions to the background.
Automatic ANR detection
When error reporting is enabled, Appelium automatically monitors the main thread for unresponsiveness. If the main thread is blocked for more than 5 seconds, an error report is generated automatically with the message describing the ANR event and a captured stack trace of the blocked thread.
Note
ANR detection is automatically disabled when a debugger is attached, to avoid false positives during debugging sessions.
Error grouping
Reported errors are automatically grouped on the server based on message similarity. Errors with similar messages are grouped together, making it easier to identify recurring issues and track their frequency across versions and devices.
Attaching data to error reports
Optionally set a delegate in your ErrorReportingConfiguration and implement the ErrorReportingDelegate protocol to attach additional data to error reports:
AppeliumFeedback.start(
apiKey: <#api key#>,
errorReporting: .enabled(delegate: self)
)
1 2 3 4 | |
Note
Each file attachment is limited to 100KB. If longer data is passed, only the last 100KB will be used.
Attaching user identifiers
In order to attach a user identifier to each error report you can use the following APIs:
AppeliumFeedback.setUserIdentifier("ABC-12345")
Note that the identifier is limited to max 50 characters.