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

It's slow on iOS 13 when building the tree of springboard at the first time #14751

Closed
aelam opened this issue Sep 22, 2020 · 13 comments
Closed
Labels
Needs Info typically non-actionable; needs author to respond ThirdParty upstream problems XCUITest regarding xcuitest driver

Comments

@aelam
Copy link

aelam commented Sep 22, 2020

The problem

It's slow on iOS 13 when building the tree of springboard at the first time, usually it takes more than minutes when I call :8100/source

I tested on the latest WDA

Environment

  • Appium version (or git revision) that exhibits the issue: 1.15.1
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: Mac OS 10.15.6
  • Node.js version (unless using Appium.app|exe): v10.0.0
  • Npm or Yarn package manager: 5.6.0
  • Mobile platform/version under test: iOS 13.6
  • Real device or emulator/simulator:Real device iPhone 8 Plus
  • Appium CLI or Appium.app|exe: Appium.app

Details

  1. iproxy 8100 8100
  2. access localhost:8100/source
  3. it will take more than 1 minute to get the result

Link to Appium logs

Create a GIST which is a paste of your full Appium logs, and link them here.
Do NOT paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs!

Code To Reproduce Issue [ Good To Have ]

Please remember that with sample code it's easier to reproduce the bug and it's much faster to fix it.

Please git clone https://github.com/appium/appium and from the sample-code directory, use one of your favourite languages and sample apps to reproduce the issue.

In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.

@mykola-mokhnach
Copy link
Collaborator

Please fill out the issue report properly and provide the required details

@mykola-mokhnach mykola-mokhnach added the Needs Info typically non-actionable; needs author to respond label Sep 22, 2020
@aelam
Copy link
Author

aelam commented Sep 22, 2020

@mykola-mokhnach updated

@mykola-mokhnach
Copy link
Collaborator

@mykola-mokhnach mykola-mokhnach added ThirdParty upstream problems XCUITest regarding xcuitest driver labels Sep 22, 2020
@aelam
Copy link
Author

aelam commented Sep 22, 2020

@mykola-mokhnach actually I didn't start Appium, I used the latest WDA project, ran in Xcode 11, and check the :8100/source interface in chrome.

@mykola-mokhnach
Copy link
Collaborator

Then feel fee to skip the first comment. The other two are still relevant.

@Dan-Maor
Copy link
Contributor

Dan-Maor commented Sep 23, 2020

I remember seeing this happening on my end as well, indeed specifically with iOS 13.

According to the syslog (from what I remember) - testmanagerd attempts to create an automation session against SpringBoard, however SpringBoard fails to respond after 60 seconds, thus testmanagerd gives up and carries on without an automation session and the operation still succeeds.

Last time I remembered seeing it (I don't test against SpringBoard that much) was when I used Xcode 11.3.1, though I didn't play with it that much since, and I wonder whether Apple has since resolved it.

I'm pretty sure that attempting to use a similar functionality through a regular XCUI test (go to SpringBoard, [XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"] and call debugDescription on it) will result in the same behavior, though I didn't test it at the time (may be the same as calling source with type description, might be worth a check).

Given that that what's hanging is a connection between the tested application and testmanagerd (which is part of the developer image) I'm not sure that this is something that can be resolved with an Xcode update, however it might be resolved with a more updated OS.

@aelam - aside from the logs requested by @mykola-mokhnach , which exact OS version and Xcode version are you using? (last time I checked it I was testing against 13.3).

@aelam
Copy link
Author

aelam commented Sep 23, 2020

@Dan-Maor Did you have two xctest bundles on iPhone when you tried [XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"], Like you have WDA runs on iPhone, then you have this test runnning on iPhone too. I highly doubt two xctest bundles could cause this problem

@Dan-Maor
Copy link
Contributor

I didn't test the scenario I mentioned, however I'm assuming it will have the same effect.

What I meant was using an entirely new project, not WDA, without WDA installed, and attempt this scenario.

@Dan-Maor
Copy link
Contributor

Dan-Maor commented Sep 23, 2020

I've tested the scenario on my device (currently on 13.6) and looks like the issue might have been fixed at some point (I'll need to look around for a 13.3 device to verify if I can reproduce it there). Both a regular XCUI test where the information is pulled from a SpringBoard XCUIApplication works, and it looks like testmanagerd is able to get an automation session from SpringBoard as well (can be seen when enabling verbose logging in WDA).

Which exact versions of iOS & Xcode are you using?

@aelam
Copy link
Author

aelam commented Sep 23, 2020

I tested on iOS 13 and Xcode 11.3.1, my secanrio may be different from you.
I run two wda with different ids, then check the duration of source api, it would reproduce somehow. Then kill two, then it can happen everytime I'll try yours tomorrow

@Dan-Maor
Copy link
Contributor

But which specific 13 version?

@aelam
Copy link
Author

aelam commented Sep 23, 2020

iOS 13.6 and iOS 14.
In addition, it seems if run with xcode 10 the result is fast

@mykola-mokhnach
Copy link
Collaborator

Closed as third party issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Info typically non-actionable; needs author to respond ThirdParty upstream problems XCUITest regarding xcuitest driver
Projects
None yet
Development

No branches or pull requests

3 participants