facebookarchive / WebDriverAgent

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

Failure getting list of active applications #1054

Open AvrahamAtia opened 5 years ago

AvrahamAtia commented 5 years ago

The problem: Failure getting list of active applications

Environment

Details Parallel execution iOS real devices and simulator. It happened only on Simulator.

Link to Appium logs [Xcode] t = 67104.91s Open com.shutterfly.mopho.prototype [Xcode] t = 67104.91s Launch com.shutterfly.mopho.prototype [Xcode] [Xcode] t = 67104.99s Wait for accessibility to load [Xcode] [Xcode] t = 67106.41s Wait for com.shutterfly.mopho.prototype to idle [Xcode] [Xcode] t = 67166.42s App event loop idle notification not received, will attempt to continue. [Xcode] [Xcode] t = 67166.42s App animations complete notification not received, will attempt to continue. [Xcode] 2019-01-01 11:32:16.204292+0200 WebDriverAgentRunner-Runner[23355:193499] Enqueue Failure: Failure to determine system application: (null) /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1 [Xcode] [Xcode] 2019-01-01 11:33:21.207391+0200 WebDriverAgentRunner-Runner[23355:193499] Enqueue Failure: Failure fetching attributes for (null): Error Domain=com.apple.XCTestErrorDomain Code=1000 "Timeout waiting for fulfillment of promise for 'Fetching attributes for (null)'." UserInfo={NSLocalizedDescription=Timeout waiting for fulfillment of promise for 'Fetching attributes for (null)'.} /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1 [Xcode] [Xcode] 2019-01-01 11:33:21.208218+0200 WebDriverAgentRunner-Runner[23355:193499] Enqueue Failure: Failure getting list of active applications: (null) /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1 [Xcode]

shibupanda commented 5 years ago

@AvrahamAtia Even I am getting the same "Enqueue Failure:" while executing my Appium script and it took much time to launch. Please let us know if the issue you have resolved.

srinidhipatel commented 5 years ago

We are also facing the same error.

[Xcode] 2019-03-28 13:34:07.473372+0530 WebDriverAgentRunner-Runner[40852:3532381] Enqueue Failure: Failure getting list of active applications: (null) /usr/local/Cellar/node@8/8.15.0/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 37 1

We are blocked here. Can you please help on this?

AvrahamAtia commented 5 years ago

I do not have solution for that, For now I testing only on Real devices.

jerolan commented 5 years ago

I'm having the same problem, does anyone have a solution?

AvrahamAtia commented 5 years ago

@jerolan Which version of simulators are you using?

jerolan commented 5 years ago

@AvrahamAtia I'm on iOS 12.1

AvrahamAtia commented 5 years ago

Try not use 12.1 version, use 11.3.1 or 11.3.

jerolan commented 5 years ago

No, I still have the same problem, am I using react-native can it be related to that?

jade685 commented 5 years ago

Having same problem here, can run though, just really slow.

Srinija25 commented 5 years ago

No, I still have the same problem, am I using react-native can it be related to that?

I am also facing the same issue, Working on React Native app, iOS version 12.1, iPhone 6 and it is taking almost 20 mins to start the execution, Please let me know if you have any solution.

shibupanda commented 5 years ago

Could you please upgrade your Appium to latest(1.12.0). As XCUITest driver has added a capability called "eventLoopIdleDelaySec" Please refer below link. https://github.com/appium/appium/releases

Srinija25 commented 5 years ago

Thanks for the reply, @shibupanda I am using the latest Appium version 1.12.0

shibupanda commented 5 years ago

@Srinija25 Have you used "eventLoopIdleDelaySec" capability.

Srinija25 commented 5 years ago

yes I have used it my capabilities are:

capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iphone7-test"); capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "IOS"); capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "12.1.4"); capabilities.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath()); capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST); capabilities.setCapability("deviceOrientation", "portrait"); capabilities.setCapability("xcodeOrgId", ""); capabilities.setCapability("xcodeSigningId", ""); capabilities.setCapability("udid", ""); capabilities.setCapability("updateWDABundleId", "****"); capabilities.setCapability("waitForQuiescence", false); capabilities.setCapability("useNewWDA", true); capabilities.setCapability("wdaEventloopIdleDelay", 3); capabilities.setCapability("eventLoopIdleDelaySec", 1); capabilities.setCapability("useJSONSource", true);

kamaleshrnp commented 5 years ago

Environment Details :

MacOs Mojave 10.14.4 Appium Server 1.12.1 Xcode 10.2 Appium Java Client 6.1.0

Capabilities:

caps.setCapability("automationName", prop.getProperty("ios.automationName")); caps.setCapability("platformVersion", prop.getProperty("ios.platformVersion")); caps.setCapability("platformName", prop.getProperty("ios")); caps.setCapability("deviceName", prop.getProperty("ios.deviceName")); caps.setCapability("autoAcceptAlerts", prop.getProperty("ios.autoAcceptAlerts")); caps.setCapability("showXcodeLog","true"); caps.setCapability("useNewWDA","true"); caps.setCapability("waitForQuietness","false"); caps.setCapability("wdaEventloopIdleDelay","3"); caps.setCapability("eventLoopIdleDelaySec", "1"); caps.setCapability("noReset", prop.getProperty("ios.noReset"));

Comments

1) Manually, It works perfectly in appium desktop version 1.12.1 2) I tried with various Xcode Versions ; but nothing helped(got errors like Couldn't identify simulators with particular versions. But they are actually installed) 3) Tried removing capabilities "useNewWDA" and reduce the delay for capabilities("wdaEventloopIdleDelay & eventLoopIdleDelay) Need Help