question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

launchTimeout capability is ignored, session setup exceeds 60 seconds

See original GitHub issue

Description

Facing various issues, not able to run tests at all. Similar problems with running consistently on Android, perhaps not as bad? At least on Android the screen would unlock sometimes

Failed to create WDA session. Retrying…

The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds.

[Appium][debug] [XCUITest] ‘pgrep -nif xcodebuild.*55adcd589527d1cafb8bab01ca1636152efdaabf’ didn’t detect any matching processes. Return code: 1 [Appium][debug] [XCUITest] ‘pgrep -nif iproxy 8100’ didn’t detect any matching processes. Return code: 1

Here are my capabilities:

            dc.SetCapability("platformName", "iOS");
            dc.SetCapability("platformVersion", d.iosVer);
            dc.SetCapability("udid", d.udid);
            dc.SetCapability("deviceName", d.phoneName);
            dc.SetCapability("automationName", "XCUITest");
            dc.SetCapability(MobileCapabilityType.NoReset, true);
            dc.SetCapability(MobileCapabilityType.FullReset, false);
            //dc.SetCapability("showXcodeLog", true);
            dc.SetCapability(MobileCapabilityType.NewCommandTimeout, 180);
            dc.SetCapability(IOSMobileCapabilityType.LaunchTimeout, 160000);
            dc.SetCapability("app", $"{root}{slash}appium_lib{slash}Debug-iphoneos{slash}IntegrationApp.app");

Environment

  • Windows/macOS/Linux
  • .NET 4.7.1
  • node v9.11.1, npm v5.8.0
  • Appium 1.7.2
  • Latest selenium client, etc
  • iPhone 7 Plus (real)

Details

WDA session times out after 60 seconds, specifying a newCommandTimeout and/or launchTimeout capability does not resolute the issue as it seems to be entirely ignored in place of the original 60 second figure.

FWIW, Xcode builds the IntegrationApp and WebDriverAgentRunner fine from the IDE (and they install) but when trying to build from command line via xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner I run into the following problem with cpu architecture:

Undefined symbols for architecture armv7:
  "_OBJC_METACLASS_$_FBFailureProofTestCase", referenced from:
      _OBJC_METACLASS_$_UITestingUITests in UITestingUITests.o
  "_OBJC_CLASS_$_FBWebServer", referenced from:
      objc-class-ref in UITestingUITests.o
  "_OBJC_CLASS_$_FBFailureProofTestCase", referenced from:
      _OBJC_CLASS_$_UITestingUITests in UITestingUITests.o
  "_OBJC_CLASS_$_FBConfiguration", referenced from:
      objc-class-ref in UITestingUITests.o
  "_OBJC_CLASS_$_FBDebugLogDelegateDecorator", referenced from:
      objc-class-ref in UITestingUITests.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld /Users/sjaroch/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Intermediates.noindex/WebDriverAgent.build/Debug-iphoneos/WebDriverAgentRunner.build/Objects-normal/armv7/WebDriverAgentRunner normal armv7
(1 failure)

Exception stacktraces

 ===============
  --Exception--
 ===============
4/19/2018 3:32:57 PM
appium-dotnet-driver, -2146233088
System.Collections.ListDictionaryInternal
The HTTP request to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds.


OpenQA.Selenium.Remote.Response Execute(OpenQA.Selenium.Remote.Command)
  at OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute (OpenQA.Selenium.Remote.Command commandToExecute) [0x0005e] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at OpenQA.Selenium.Remote.RemoteWebDriver.Execute (System.String driverCommandToExecute, System.Collections.Generic.Dictionary`2[TKey,TValue] parameters) [0x00014] in <6a93e12c6bde4af79c4b6c5665da6798>:0 
  at OpenQA.Selenium.Appium.AppiumDriver`1[W].Execute (System.String driverCommandToExecute, System.Collections.Generic.Dictionary`2[TKey,TValue] parameters) [0x00000] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession (OpenQA.Selenium.ICapabilities desiredCapabilities) [0x0004b] in <6a93e12c6bde4af79c4b6c5665da6798>:0 
  at OpenQA.Selenium.Remote.RemoteWebDriver..ctor (OpenQA.Selenium.Remote.ICommandExecutor commandExecutor, OpenQA.Selenium.ICapabilities desiredCapabilities) [0x0001e] in <6a93e12c6bde4af79c4b6c5665da6798>:0 
  at OpenQA.Selenium.Appium.AppiumDriver`1[W]..ctor (OpenQA.Selenium.Remote.ICommandExecutor commandExecutor, OpenQA.Selenium.ICapabilities desiredCapabilities) [0x00000] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at OpenQA.Selenium.Appium.AppiumDriver`1[W]..ctor (System.Uri remoteAddress, OpenQA.Selenium.ICapabilities desiredCapabilities, System.TimeSpan commandTimeout) [0x00008] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at OpenQA.Selenium.Appium.AppiumDriver`1[W]..ctor (System.Uri remoteAddress, OpenQA.Selenium.ICapabilities desiredCapabilities) [0x00000] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at OpenQA.Selenium.Appium.iOS.IOSDriver`1[W]..ctor (System.Uri remoteAddress, OpenQA.Selenium.Remote.DesiredCapabilities desiredCapabilities) [0x0000d] in <9b3ceeffa60d410090f33f3b9ea8ebde>:0 
  at appiumIosUnitTests.testLogic.runTests (appiumIosUnitTests.Program+device de) [0x006fd] in <d155b0d699c5499eb8bc8629883c689f>:0 
 ===================
  --End exception--
 ===================

Link to Appium logs

appium_logs.zip

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
gamesgurucommented, Nov 4, 2018

i see things are changed.

is it noted anywhere an internet connection is required to get an ios driver session opened? Our app needs to connect to a hotspot that lacks internet, and I figured this out myself… nothing in the Appium logs was very helpful in the root cause analysis. This is the rule rather than the exception with Appium.

0reactions
laolubensoncommented, Nov 1, 2018

@gamesguru Just for your reference, the guidance related to your issue, and my response is well documented here. There could probably be a new page to describe how to instantiate a session for each constructor or most commonly used/required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

launchTimeout capability is ignored, session setup ...
The default value for the client-side request timeout is 60 seconds. You can configure this during instantiation of your AppiumDriver, using the ...
Read more >
Appium Desired Capabilities - Read the Docs
newCommandTimeout, How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the...
Read more >
The HTTP request to the remote WebDriver timed out after ...
When running a basic script which just created a FF driver and nothing else, a 60 second timeout worked 100% of the time....
Read more >
Compute Sanitizer User Manual
launch-timeout, {number}, 10 for single process, 60 for multi-process, Timeout in seconds for the connection to the target process.
Read more >
FortiSandbox 4.4.0 Administration Guide
Combining Web Category and URL Pre-Filtering settings. 138. Customized Rating ... When this option is disabled, the default timeout is 60 seconds.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found