Troubleshooting
This page aims to act as a reference for issues that may be encountered when using the Inspector.
Cannot open the app after installation¶
Please refer to the Installation guide.
Cannot start a session using plugin version¶
The reason for this issue is cross-origin resource sharing
(CORS). The browser will prevent you from connecting to the Appium server if the base URLs of the
Inspector and the Appium server do not match (the server typically uses 127.0.0.1).
If the base URLs of the server and the Inspector differ (localhost is considered different from 127.0.0.1), CORS must be explicitly allowed when starting the server:
This will instruct the server to sent the correct CORS-related headers, and it should be possible to create a session.
Note
If you encounter this issue with a cloud provider, the fix must be applied on the provider side, because they are the ones hosting the Appium server.
Cannot see full source tree with XCUITest driver + React Native app¶
This is a known issue. The problem is caused by Apple's XCTest framework, so unfortunately it cannot be resolved from the Appium side. However, there are a few suggestions that may help mitigate this:
- Set the
snapshotMaxDepthsetting to62(the maximum stable value) - Configure the
pageSourceExcludedAttributessetting to exclude some attributes that you may find less relevant (e.g."visible,accessible") - Set the
customSnapshotTimeoutsetting to a higher value (for XCUITest driver version < 8)
If these do not help, then the only remaining solution is to work with the app developers to refactor the application code. Some suggestions from the linked issue thread include:
- Try to remove unnecessary nesting levels
- Use the Fabric renderer with View Flattening
- Use native stack navigator instead of stack navigator
- Reduce the amount of view tags/test IDs