Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Slowness on app launch #998

Closed
andrecnogueira opened this issue Sep 25, 2018 · 12 comments
Closed

Slowness on app launch #998

andrecnogueira opened this issue Sep 25, 2018 · 12 comments

Comments

@andrecnogueira
Copy link

With Xcode10 release I noticed our build execution time increased significantly, when checking Appium logs with showXcodeLog=true, I see WDA gets stuck waiting for accessibility to load and then it throws Enqueue Failure. I am not sure which accessibility WDA is looking for. Please, can anyone look into it?

2018-09-25 13:19:43:488 - info: [Xcode]     t =     0.51s Open de.company.company_company
2018-09-25 13:19:43:489 - info: [Xcode]
2018-09-25 13:19:43:489 - info: [Xcode]     t =     0.52s     Launch de.company.company_company
2018-09-25 13:19:43:489 - info: [Xcode]
2018-09-25 13:19:43:538 - info: [Xcode]     t =     0.56s         Wait for accessibility to load
2018-09-25 13:19:43:538 - info: [Xcode]
2018-09-25 13:20:43:626 - info: [Xcode] 2018-09-25 15:20:43.625281+0200 WebDriverAgentRunner-Runner[20997:461408] Enqueue Failure: Application 'de.company.company_company' has not loaded accessibility /Users/useruser/.nvm/versions/node/v9.9.0/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1**

Fuller logs

Env:
Xcode 10
iOS version: 11.4 and 12
Simulators: any
WDA Version: latest checkout from master

@fr0l
Copy link
Contributor

fr0l commented Sep 26, 2018

Same observed here #993 (this is a duplicate)

@fr0l
Copy link
Contributor

fr0l commented Sep 26, 2018

Also for me this is true if WDA was compiled with Xcode 10.

If I compile WDA with Xcode 9.4.1, and then run tests on iOS 11.4 and iOS 12.0 Simulators, then it is as fast as 5-6 seconds on application start.

@andrecnogueira can you try WDA binary compiled with Xcode 9.4.1 ?

@andrecnogueira
Copy link
Author

@fr0l

I tried with a pre built WDA, compiled with Xcode 9.4.1, and I still see the issue.

t =    14.96s Open de.company.company
t =    14.96s     Launch de.company.company
t =    15.00s         Wait for accessibility to load
2018-10-01 19:19:10.463103+0200 WebDriverAgentRunner-Runner[19998:3862512] Enqueue Failure: Application 'de.company.company' has not loaded accessibility /Users/useruser/.nvm/versions/node/v9.9.0/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1
t =    76.20s Find the Application 'de.company.company'

I noticed this issue when I migrated from Appium 1.7.2 to 1.9.X. when we have been forced to update drivers to start building with Xcode 10. I will see if I can use the WebDriverAgent packed with Appium 1.7.2 as a pre built WDA and let you know. Not sure if it will be compatible tho.

@andrecnogueira
Copy link
Author

@fr0l , As I promised I build WDA version that comes packed with Appium 1.7.2 built with xcode 9.4.1 and it worked just fine...I did not see such long time on app launch. Again, I noticed such slowness when I upgraded from Appium 1.7.2 to 1.8.0. I am not sure what has changed on WDA side making the long application start.

Snippet logs for the above setup

t =    43.28s Open de.company.company
t =    43.28s     Launch de.company.company
t =    44.43s Find the Application "com.apple.springboard" 0x60c0000d46d0
t =    44.43s     Snapshot accessibility hierarchy for app with pid 32116

Appium logs pre build wda compiled with Xcode 9.4.1
WDA logs

@ghost
Copy link

ghost commented Oct 11, 2018

I'm seeing similar issues using appium 1.9.2-beta.2. I have Xcode 10 installed on the computer and I have set waitForQuiescence to false in my capabilities. My tests start, app is installed on the simulator and then it sits there for a minute or two before anything happens. This didn't happen when I started using appium with version 1.7.2 with corresponds to what @andrecnogueira is telling.

@hemantbanafal
Copy link

I am also facing this issue and our execution time is increased drastically. Can anyone please look into this issue?

@andrecnogueira
Copy link
Author

@fr0l
I don't believe this issue is dup of #993 I tried to reproduce the steps you mentioned to get around the issue by either commenting the if statement in FBApplication.launch or setting WaitForQuiescence = false and still taking long time to launch app.

I was wondering if there is any way to prioritise/bring more attention to this issue as building WDA with 9.4.1 is not an option to us as our major tests are running on iOS 12 where Xcode 10 is required.

@JasWoolieX
Copy link

I am facing the same issue with the slowness of launching the app and finding the elements with Appium in iOS. I am also using Appium 1.9.1 with Xcode 10

As an idea, the appium looks for an element which is not present for approx 20 times before it moves further which is making it extremely slow.

For finding elements, I am either relying on accessibility ids wherever I have access to those other wise I am using this approach
@iOSXCUITFindBy(iOSNsPredicate = "name BEGINSWITH 'DRIVER INSTRUCTIONS'")

@lanzelot1989
Copy link

Is #1013 a duplicate of this?

@marekcirkos
Copy link
Contributor

Should be resolved, pls reopen otherwise

@amokmen
Copy link

amokmen commented Mar 20, 2019

@marekcirkos I just write comment in #999. Seems problem still here.

@muraliseveneleven
Copy link

I still see this problem as well . As soon as we launch appium takes 6 to 9 minutes to execute tests

Enqueue Failure: Failure fetching attributes for Device system-wide element: Error Domain=com.apple.XCTestErrorDomain Code=1000 "Timeout waiting for fulfillment of promise for 'Fetching attributes for Device system-wide element'." UserInfo={NSLocalizedDescription=Timeout waiting for fulfillment of promise for 'Fetching attributes for Device system-wide element'.}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants