发生未知的服务器端错误300秒钟后运行Web测试时未得到任何响应

时间:2019-11-27 21:29:44

标签: appium

问题

  

在处理命令时发生未知的服务器端错误。原始错误:300秒后未收到任何响应

环境

    出现此问题的
  • Appium版本(或git版本):1.15.0 / 1.15.1
  • 用于运行Appium的台式机操作系统/版本:mac OS 10.15.1
  • Node.js版本(除非使用Appium.app | exe):v13.2.0
  • Npm或Yarn程序包管理器:6.13.1
  • 正在测试的移动平台/版本:iOS 13.1.2
  • 真实设备或模拟器/模拟器:iPhone X

详细信息

我在iOS 13.1.2上运行网络测试。前面的步骤可以正确执行。同时执行CLICK命令。花了大约10分钟的时间,并报告了上面的错误。

我曾经使用Appium 1.15.1,现在降级到1.15.0。我还尝试了升级和降级Katalon Studio版本,但问题仍然存在。

Test Cases/Mobile/M-Queenb - Login FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/Mobile - Login/Page_Home Decor Online Store  queen/a_Categories'
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
    at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:79)
    at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:42)
    at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:60)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
    at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)
    at M-Queenb - Login.run(M-Queenb - Login:34)
    at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
    at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
    at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
    at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
    at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
    at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
    at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:114)
    at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
    at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
    at TempTestCase1574827926297.run(TempTestCase1574827926297.groovy:23)
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Did not get any response after 300s
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'PACMAN.ecommistry.com', ip: 'fe80:0:0:0:1887:6d13:ace3:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_181'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {automationName: XCUITest, browserName: Safari, databaseEnabled: false, deviceName: test, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 1800, platform: MAC, platformName: iOS, platformVersion: 13.1.2, realDeviceLogger: /Applications/Katalon Studi..., takesScreenshot: true, udid: 0f040a74e28d16c7291dcc3eca2..., wdaLocalPort: 62547, webStorageEnabled: false}
Session ID: e38d6851-f76b-4815-8cea-1362dead6450
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
    at io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
    at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
    at io.appium.java_client.ios.IOSElement.execute(IOSElement.java:1)
    at org.openqa.selenium.remote.RemoteWebElement.isDisplayed(RemoteWebElement.java:326)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
    at com.sun.proxy.$Proxy10.isDisplayed(Unknown Source)
    at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.isDisplayed(EventFiringWebDriver.java:470)
    at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:314)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:43)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:300)
    at org.openqa.selenium.support.ui.ExpectedConditions$10.apply(ExpectedConditions.java:297)
    at org.openqa.selenium.support.ui.ExpectedConditions$23.apply(ExpectedConditions.java:670)
    at org.openqa.selenium.support.ui.ExpectedConditions$23.apply(ExpectedConditions.java:666)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:249)
    at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:56)
    at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
    at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20) ```






1 个答案:

答案 0 :(得分:0)

以下内容对我有用: 我使用的是最新的Appium,在撰写本文时为v1.16.0。在appium-webdriveragent的多个安装位置。我意识到/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules/appium-webdriveragent中的版本不是最新版本,因此我将其升级为最新版本(以我的情况为v2.5.4),如下所示:

cd /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/node_modules
mv appium-webdriveragent appium-webdriveragent.prev  # fallback
npm i appium-webdriveragent
cd appium-webdriveragent
mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d
open -a xcode WebDriverAgent.xcodeproj

在Xcode中,确保“ WebDriverAgentLib”和“ WebDriverAgentRunner”项目的“签名和功能”具有正确的“团队”和“签名证书”(更多信息:http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/)。然后构建“ WebDriverAgentRunner> nameOfYouriOS或iPadOSDevice”-确保构建成功。现在尝试进行测试-“ 300秒内响应”错误不再发生。