Skip to main content
An XCUITest step fails with this line. Some Xcode versions write Failed to get matching snapshots:. Through WebDriverAgent and Appium, the same failure arrives as a stale element reference on a page-source or window-size request:
Mobster reads screens through WebDriverAgent, so a read on your iPhone can hit this. On iOS 26.0.1 (23 Sep 2026), with Safari in front, WebDriverAgent took an invisible system overlay, com.apple.siri.IntelligentLight, for the app in front, and every screen read failed after about 8 seconds. Mobster sets the app it opened as WebDriverAgent’s active app and retries the read once. In this case, the retry took 0.58 s.

Why it happens

XCTest reads a screen by asking the app’s accessibility server for a snapshot, starting from the app’s main window. kAXErrorServerNotFound means no server answered for that app. Reported causes include:

Fix

  1. Unlock the iPhone and look at it. Close Siri, Control Center and any banner. If the app isn’t on screen, open it again.
  2. Bring the app to the front before you read it. In an XCUITest, call app.activate(), or app.launch(), before the query. Through Appium, run mobile: activateApp with {"bundleId": "com.example.app"}. Through WebDriverAgent itself:
  3. Point WebDriverAgent at the app. Set defaultActiveApplication to its bundle ID, and activeAppDetectionPoint to a point inside the app’s content, as "x,y" in points. Mobster tries 160,320 first:
    Through Appium, pass the same two settings to updateSettings. Mobster sets the detection point on every session, and names each app it opens as the active one.
  4. Close the app in the app switcher and open it again. A restart of WebDriverAgent doesn’t clear a stuck accessibility server, and closing its app does.
  5. If every app fails, Settings included, restart the iPhone.

Check it worked

curl -s http://127.0.0.1:8100/source returns JSON whose value is the screen’s XML, starting with the app’s XCUIElementTypeApplication. An XCUITest query on the same screen passes. Checked 5 Nov 2026 against Mobster 0.4.0. The commands were checked with Xcode 26.4. Back to Troubleshooting.