appium icon indicating copy to clipboard operation
appium copied to clipboard

Connection to WDA timed out

Open lohitsb opened this issue 9 years ago • 29 comments

After launching the application, It is not finding the elements and giving an error "Connection to WDA timed out".

I am using Xcode 8.3.3 iOS Device with 10.3

Attached the code and Logs for the same.

My Code:

package test2.test2;

import java.net.MalformedURLException; import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.testng.annotations.Test;

import io.appium.java_client.AppiumDriver; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.ios.IOSDriver;

public class Sample {

@Test
public void test1() throws MalformedURLException, InterruptedException
{
	DesiredCapabilities capabilities=new DesiredCapabilities();
	capabilities.setCapability("platformName", "iOS");
	capabilities.setCapability("platformVersion", "10.3.1");
    capabilities.setCapability("deviceName", "MyTwc-iPhone 7");
    capabilities.setCapability("udid", "3f1f389017eee1253e907ce51cb4cf76a596115f");
    capabilities.setCapability("bundleId", "com.timewarnercable.mytwc");
  //  capabilities.setCapability("App", "http://bit.ly/2t2O5I9");
    capabilities.setCapability("automationName", "XCUITest");
    //capabilities.setCapability("xcodeOrgId", "RLWCK255Y4");
    capabilities.setCapability("xcodeLog", true);
   // capabilities.setCapability("xcodeSigningId", "Lohitaksh Belaladavar (RLWCK255Y4)");
    //capabilities.setCapability("updatedWDABundleId", "com.broadsoft.appiumtest");
    capabilities.setCapability("xcodeConfigFile","/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig");
    capabilities.setCapability("wdaConnectionTimeout", 600000);

    System.out.println("Device identified");

  //  capabilities.setCapability("appPackage", "com.mytwc.common.resource");
    //capabilities.setCapability("appActivity", "com.mportal.twcframework.ui.SplashActivity");

    System.out.println("Activity and package added");

     AppiumDriver driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub/"), capabilities);

    System.out.println("Connected to Appium Server");
    
    Thread.sleep(30);
    
    //androidDriver.findElementByAccessibilityId("Allow").click();
    driver.findElementByAccessibilityId("Sign In").click();
    
    
}

}

Attached the Appium Logs:

wda_time_out.docx

lohitsb avatar Jun 30 '17 11:06 lohitsb

Please attach the log as a gist or as a text file. docx files are not appreciated.

mykola-mokhnach avatar Jun 30 '17 12:06 mykola-mokhnach

Sorry, Now i have attached the logs as .txt WDA_TimeOUT.txt

lohitsb avatar Jun 30 '17 12:06 lohitsb

Nothing suspicious in the Appium log. Probably, the device log contains more information

mykola-mokhnach avatar Jun 30 '17 13:06 mykola-mokhnach

I saw two things of interest in your log:

[debug] [iProxy] recv failed: Operation not permitted

Have you got a restrictive firewall running ? When I run Appium on this Mac I get occasional popups asking for network access for ruby (my scripts are in ruby).

2) Closing session, cause was 'New Command Timeout of 60 seconds expired. Try customizing the timeout using the 'newCommandTimeout' desired capability'

I usually run with newCommandTimeout = 360 in my caps because this can take a while even over localhost, although it looks like it was a permissions thing

amias-channer avatar Jun 30 '17 14:06 amias-channer

Nope, i never get any firewall restriction pop up.

I have tried "capabilities.setCapability("newCommandTimeout", 380);", but still i am getting same error.

Please let me know do i need to check anything?

lohitsb avatar Jul 01 '17 16:07 lohitsb

@lohitsb can you re-run the appium server with --log-timestamp so we can see the flow of time? and make sure you're using the latest appium beta. then show us the logs.

jlipps avatar Jul 28 '17 22:07 jlipps

closing due to inactivity

jlipps avatar Aug 29 '17 22:08 jlipps

I am also facing same issue.

Environment Appium - 1.8.1 xcode - 9.4 real iOS device version - 11.4

**Appium logs **

Responding to client with driver.getContexts() result: ["NATIVE_APP","WEBVIEW_1"] [HTTP] <-- GET /wd/hub/session/eee59416-4df8-4cd9-8986-41571c960409/contexts 200 9 ms - 36 [HTTP] [HTTP] --> POST /wd/hub/session/eee59416-4df8-4cd9-8986-41571c960409/context [HTTP] {"name":"WEBVIEW_1"} [debug] [W3C] Calling AppiumDriver.setContext() with args: ["WEBVIEW_1","eee59416-4df8-4cd9-8986-41571c960409"] [debug] [XCUITest] Executing command 'setContext' [debug] [iOS] Attempting to set context to 'WEBVIEW_1' [debug] [RemoteDebugger] WebKit debugger web socket connected to url: ws://localhost:27753/devtools/page/1 [debug] [RemoteDebugger] Starting to listen for JavaScript console [debug] [RemoteDebugger] Sending WebKit data: {"method":"Console.enable","params":{"objectGroup":"console","includeCommandLineAPI":true,"doNotPauseOnExceptionsAndMuteConsole":true}} [debug] [RemoteDebugger] Webkit response timeout: 50000 [debug] [RemoteDebugger] Receiving WebKit data: '{"result":{},"id":1}' [debug] [RemoteDebugger] Found handler for message '1' [debug] [RemoteDebugger] WebKit debugger got a message for 'Console.enable' and have no handler, doing nothing. [debug] [XCUITest] Connection to WDA timed out [debug] [iProxy] recv failed: Operation not permitted [W3C] Encountered internal error running command: TimeoutError: operation timed out [W3C] at afterTimeout (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/timers.js:46:19) [W3C] at Timeout.timeoutTimeout [as _onTimeout] (/usr/local/lib/node_modules/appium/node_modules/bluebird/js/release/timers.js:76:13) [W3C] at ontimeout (timers.js:466:11) [W3C] at tryOnTimeout (timers.js:304:5) [W3C] at Timer.listOnTimeout (timers.js:267:5)

Can anyone please help on this ?

deepikashekar37 avatar Jun 19 '18 07:06 deepikashekar37

Me also facing the same same issue. Any update?

ashoksqa avatar Jun 22 '18 06:06 ashoksqa

Update to the latest beta (npm uninstall -g appium && npm install -g appium@beta).

imurchie avatar Jun 22 '18 13:06 imurchie

I have updated to the latest version and am still facing this issue. This is a blocker for our automation execution. Any help would be greatly appreciated.

vinaybalepur avatar Jun 28 '18 09:06 vinaybalepur

I was facing the same issue but after upgrading appium to 1.8.2-beta issue solved. Also upgrade java client

deepikashekar37 avatar Jun 28 '18 09:06 deepikashekar37

I upgraded to 1.8.2-beta. I started getting "Unhandled endpoint" from AppiumDriver.getPageSource(). Then downgraded to 1.8.2. Now am not even able to connect to hub. The xcode version is 9.2. The java client is 6.1.0

vinaybalepur avatar Jun 29 '18 10:06 vinaybalepur

Can you please send your desired capabilities

On Fri, 29 Jun 2018 4:13 pm Vinay B P, [email protected] wrote:

I upgraded to 1.8.2-beta. I started getting "Unhandled endpoint" from AppiumDriver.getPageSource(). Then downgraded to 1.8.2. Now am not even able to connect to hub. The xcode version is 9.2. The java client is 6.1.0

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8764#issuecomment-401318640, or mute the thread https://github.com/notifications/unsubscribe-auth/AdZSSsi07LMTBf94JiC-YJJJy_GtxHCFks5uBgTTgaJpZM4OKdC8 .

deepikashekar37 avatar Jun 29 '18 14:06 deepikashekar37

Following is the capabilities. "udid":"device_udid", "app":"app_path", "server:CONFIG_UUID":"74248ac2-26a0-4eb9-8f6c-e205e5efb67c", //this is not provided but some how this is picked up and shown in appium logs "commandTimeouts":35000, "newCommandTimeout":1000, "platformVersion":"9.3", "automationName":"XCUITest", "platformName":"ios", "deviceName":"iPhone", "iosInstallPause":10000, "usePrebuiltWDA":true, "device":"iphone",

vinaybalepur avatar Jun 29 '18 15:06 vinaybalepur

Try by setting automation name capability

On Fri, 29 Jun 2018 8:44 pm Vinay B P, [email protected] wrote:

Following is the capabilities. "udid":"device_udid", "app":"app_path", "server:CONFIG_UUID":"74248ac2-26a0-4eb9-8f6c-e205e5efb67c", //this is not provided but some how this is picked up and shown in appium logs "commandTimeouts":35000, "newCommandTimeout":1000, "platformVersion":"9.3", "automationName":"XCUITest", "platformName":"ios", "deviceName":"iPhone", "iosInstallPause":10000, "usePrebuiltWDA":true, "device":"iphone",

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8764#issuecomment-401385039, or mute the thread https://github.com/notifications/unsubscribe-auth/AdZSSpobptOfWWC8PbMRXlYa8yJ233QDks5uBkRNgaJpZM4OKdC8 .

deepikashekar37 avatar Jun 29 '18 15:06 deepikashekar37

I mean .....automationName as UIAutomator2....

On Fri, 29 Jun 2018 8:46 pm Deepika Shekar, [email protected] wrote:

Try by setting automation name capability

On Fri, 29 Jun 2018 8:44 pm Vinay B P, [email protected] wrote:

Following is the capabilities. "udid":"device_udid", "app":"app_path", "server:CONFIG_UUID":"74248ac2-26a0-4eb9-8f6c-e205e5efb67c", //this is not provided but some how this is picked up and shown in appium logs "commandTimeouts":35000, "newCommandTimeout":1000, "platformVersion":"9.3", "automationName":"XCUITest", "platformName":"ios", "deviceName":"iPhone", "iosInstallPause":10000, "usePrebuiltWDA":true, "device":"iphone",

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8764#issuecomment-401385039, or mute the thread https://github.com/notifications/unsubscribe-auth/AdZSSpobptOfWWC8PbMRXlYa8yJ233QDks5uBkRNgaJpZM4OKdC8 .

deepikashekar37 avatar Jun 29 '18 15:06 deepikashekar37

Thanks for the support. How will adding this capability help?

On Fri, Jun 29, 2018, 8:54 PM deepikashekar37 [email protected] wrote:

I mean .....automationName as UIAutomator2....

On Fri, 29 Jun 2018 8:46 pm Deepika Shekar, [email protected] wrote:

Try by setting automation name capability

On Fri, 29 Jun 2018 8:44 pm Vinay B P, [email protected] wrote:

Following is the capabilities. "udid":"device_udid", "app":"app_path", "server:CONFIG_UUID":"74248ac2-26a0-4eb9-8f6c-e205e5efb67c", //this is not provided but some how this is picked up and shown in appium logs "commandTimeouts":35000, "newCommandTimeout":1000, "platformVersion":"9.3", "automationName":"XCUITest", "platformName":"ios", "deviceName":"iPhone", "iosInstallPause":10000, "usePrebuiltWDA":true, "device":"iphone",

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8764#issuecomment-401385039, or mute the thread < https://github.com/notifications/unsubscribe-auth/AdZSSpobptOfWWC8PbMRXlYa8yJ233QDks5uBkRNgaJpZM4OKdC8

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/appium/appium/issues/8764#issuecomment-401387800, or mute the thread https://github.com/notifications/unsubscribe-auth/ADBUUcBLxtLF2INbhRhrGQ09rNcgTZPpks5uBkaQgaJpZM4OKdC8 .

vinaybalepur avatar Jun 29 '18 15:06 vinaybalepur

I am having the same issue. Appium 1.9.1 iOS 12.0 xCode 10.0 beta 4

SokhomRatanak avatar Oct 03 '18 10:10 SokhomRatanak

I am getting same issue with same device configuration

akhand-pratap2807 avatar Oct 05 '18 05:10 akhand-pratap2807