facebookarchive / WebDriverAgent

A WebDriver server for iOS that runs inside the Simulator.
Other
4.15k stars 1.37k forks source link

[xcode 9, iOS 10] Could not obtain source element tree if test left application. #725

Open shynkevich-alex opened 7 years ago

shynkevich-alex commented 7 years ago

The problem

The error appears when test left application.

Could not obtain source: {"cause":{"sessionId":"41031a12-d8a0-487f-8ecb-17462ee12c14","status":13,"value":{"message":"An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up"}},"jsonwire-error":{"detail":"An unknown server-side error occurred while processing the command.","status":13,"summary":"UnknownError"},"message":"[source()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up","status":13}

Environment

Details

When test leave application and tries obtain elements tree the issue happens. It reproduces in iPad pro with iOS 10.3.3. I have the same iPad with iOS 11.0 and it works fine with it. I've tried get elements tree with appium desktop UI Inspector but the same issue happens. No matter if home screen is opened or safari.

Appium logs:

iPad 10.3.3 Logs: https://gist.github.com/shynkevich-alex/aaf9542a38beb3dabdcb81469a9e4bc6 iPad 11.0 Logs: https://gist.github.com/shynkevich-alex/62e35db714fccc88f590f60baee07977

Device logs:

iPad_10.3.3 device log: https://gist.github.com/shynkevich-alex/97e310335611663bf04be082df9f4008

shynkevich-alex commented 7 years ago

It seems the same issue as https://github.com/facebook/WebDriverAgent/issues/708https://github.com/facebook/WebDriverAgent/issues/708

shynkevich-alex commented 7 years ago

@marekcirkos could you clarify issue?

marekcirkos commented 7 years ago

I suspect getting source is slow, which is known issue on iOS 11.

chennareddy08 commented 7 years ago

This is happening for IOS 9.3.5 for ipod touch with appium desktop version 1.2.6 (1.2.6)

vsaraydarova-broadsoft commented 7 years ago

I have a problem with iOS 11, XCode 9 and latest Appium release 1.7.1. I can't get page source to process call kit screen for incoming call. Yes the page source retrieving is slow but even if it finish before call kit disappears, the content of page source is native screen with application icons.There is no Accept / Decline buttons. With iOS10.x and XCode 8.3.3 and Appium 1.6.5 call kit screens can be manipulated as part of the application.

Atandon09 commented 7 years ago

I am also encountering the same issue as above with IOS 11, Xcode 9 and Appium 1.7.1. I am unable to identify elements . Error is -Could not obtain source: {"cause":{"sessionId":"a82c3724-f73c-44a7-a2db-45041507fc81","status":13,"value":{"message":"An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up"}},"jsonwire-error":{"detail":"An unknown server-side error occurred while processing the command.","status":13,"summary":"UnknownError"},"message":"[source()] Error response status: 13, , UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up","status":13}

shynkevich-alex commented 6 years ago

@marekcirkos It seems not the same problem as slow getting source because in app it returns sources.

shynkevich-alex commented 6 years ago

With latest update it reproduces on iOS 11

samsonbarukula commented 6 years ago

any solution for this pls

shynkevich-alex commented 6 years ago

I am waiting solution too. It reproduces very often.

samsonbarukula commented 6 years ago

why might be the issue any idea pls ?

samsonbarukula commented 6 years ago

Try with getAbsolutePath()... It worked for me.... mobileCapabilityType

sharecommute commented 6 years ago

Any update or solution on this issue. I am also facing the same issue on Appium 1.7.2, Xcode 9.2 and ios 10.3.

jenniferneale commented 6 years ago

I am experiencing the same issue on simulated iPhone6, Appium 1.7.2, Xcode 9.3, ios 11.1.

skansar commented 5 years ago

Hello all, any of you guys find solutions / hacks / alternatives for this issue, we are facing the same issue on Appium/Appium Desktop 1.7.2 / 1.8.1 , Xcode 9.2 and IOS 10.3.

AbbyMei commented 5 years ago

Just start running the target application in your device ,then start session in appium

Suban5 commented 5 years ago

I am also facing the similar issue while trying to automate facebook messenger app with appPackage/appActivity :com.facebook.orca/com.facebook.orca.auth.StartScreenActivity. The app opens but won't any app source.