Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS App crashes in during getPageSource() if it has large page source - Error getting main window -25215 #13864

Closed
sundarsiv1995 opened this issue Jan 22, 2020 · 6 comments
Labels
ThirdParty upstream problems XCUITest regarding xcuitest driver

Comments

@sundarsiv1995
Copy link

When I am trying to inspect a app screen which has a PDF document with 21 pages displayed, the app crashes with the below error in appium logs.

[Xcode] 2020-01-09 12:38:52.554368+0530 WebDriverAgentRunner-Runner[423:16389] Internal error: Error Domain=com.apple.dt.xctest.automation-support.error Code=8 "Error getting main window -25215" UserInfo={NSLocalizedDescription=Error getting main window -25215}
[Xcode]
[Xcode] t = 2647.09s Snapshot accessibility hierarchy for app with pid 431
[Xcode]
[Xcode] t = 2647.10s Snapshot accessibility hierarchy for app with pid 431

Note: The app has another screen where PDF is displayed which has only one page. I am able to inspect this page.

Solutions tried:
1.Tried with 1.16 beta version of appium
2.Checked if it is webview. Not a webview.

Please help here.

@mykola-mokhnach
Copy link
Collaborator

This error is thrown by XCTest and we cannot do anything about it in Appium. Consider reporting the issue to Apple.

You could try #13595 (comment) as a workaround to get the page source.

@mykola-mokhnach mykola-mokhnach added ThirdParty upstream problems XCUITest regarding xcuitest driver labels Jan 22, 2020
@amedvedjev
Copy link
Contributor

@sundarsiv1995 you can also try using "Accessibility Inspector" from xCode with this screen (if you need to inspect it)

@sundarsiv1995
Copy link
Author

This error is thrown by XCTest and we cannot do anything about it in Appium. Consider reporting the issue to Apple.

You could try #13595 (comment) as a workaround to get the page source.

@mykola-mokhnach
Can you please help me how to use the mobile: source endpoint when I try to inspect the app through appium inspector.
Do I need to add any capability?

@sundarsiv1995
Copy link
Author

Tried adding useJSONSource and snapshotTimeout capability in appium inspector.
Getting the below error:

[WD Proxy] Matched '/source?format=json' to command name 'getPageSource'
[WD Proxy] Proxying [GET /source?format=json] to [GET http://localhost:8100/session/A9DC24CB-7B27-4002-A845-FD6B159806A9/source?format=json] with no body
[HTTP] --> GET /wd/hub/session/be8ac988-5c1d-47a8-9afd-f9556b8a009d/window/current/size
[HTTP] {}
[MJSONWP (be8ac988)] Calling AppiumDriver.getWindowSize() with args: ["current","be8ac988-5c1d-47a8-9afd-f9556b8a009d"]
[XCUITest] Executing command 'getWindowSize'
[Xcode] 2020-01-23 09:54:59.210691+0530 WebDriverAgentRunner-Runner[324:8153] Cannot take the snapshot of Application 'com.sci.beacon-test' after 15 seconds
[Xcode] 2020-01-23 09:54:59.211140+0530 WebDriverAgentRunner-Runner[324:8153] Internal error: Error Domain=com.apple.dt.xctest.automation-support.error Code=8 "Error getting main window -25204" UserInfo={NSLocalizedDescription=Error getting main window -25204}
[Xcode] t = 377.41s Snapshot accessibility hierarchy for app with pid 336
[Xcode]
[Xcode] t = 377.48s Snapshot accessibility hierarchy for app with pid 336
[Xcode]
[Xcode] t = 396.05s Get all elements bound by accessibility element for: Elements matching predicate 'wdUID IN {"05000000-0000-0000-5001-000000000000", "06000000-0000-0000-5001-000000000000", "07000000-0000-0000-5001-000000000000"} AND (1 == 1 OR identifier == 0 OR frame == 0 OR value == 0 OR title == 0 OR label == 0 OR elementType == 0 OR enabled == 0 OR placeholderValue == 0)'

@sundarsiv1995
Copy link
Author

@sundarsiv1995 you can also try using "Accessibility Inspector" from xCode with this screen (if you need to inspect it)

@amedvedjev Tried with accessibility inspector. But not getting any properties for that PDF pages. But I am able to get the name, label for the other native buttons present in the screen.

accesibility inspector

@mykola-mokhnach
Copy link
Collaborator

Unfortunately there is nothing we can do there from Appium side. Consider reporting the issue to Apple.

Closed as third party issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ThirdParty upstream problems XCUITest regarding xcuitest driver
Projects
None yet
Development

No branches or pull requests

3 participants