Appium io.appium.java_client.service.local.InvalidServerInstanceException:

tester_小新 · 2018年07月16日 · 最后由 tester_小新 回复于 2018年07月16日 · 2056 次阅读
[TestNG] Running:
  C:\Users\Young\AppData\Local\Temp\testng-eclipse-1222286826\testng-customsuite.xml

FAILED CONFIGURATION: @BeforeSuite globalSetup
io.appium.java_client.service.local.InvalidServerInstanceException: Invalid server instance exception has occured: There is no installed nodes! Please install node via NPM (https://www.npmjs.com/package/appium#using-node-js) or download and install Appium app (http://appium.io/downloads.html)
    at io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:155)
    at io.appium.java_client.service.local.AppiumServiceBuilder.checkAppiumJS(AppiumServiceBuilder.java:309)
    at io.appium.java_client.service.local.AppiumServiceBuilder.createArgs(AppiumServiceBuilder.java:389)
    at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:332)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:76)
    at io.appium.java_client.service.local.AppiumDriverLocalService.buildDefaultService(AppiumDriverLocalService.java:72)
    at org.sem.sample.example_code.BaseTest.globalSetup(BaseTest.java:16)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
    at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
    at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
    at org.testng.SuiteRunner.run(SuiteRunner.java:268)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
    at org.testng.TestNG.run(TestNG.java:1064)
    at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Caused by: java.io.IOException: C:\Users\Young\AppData\Roaming\npm\node_modules

    at io.appium.java_client.service.local.AppiumServiceBuilder.findNodeInCurrentFileSystem(AppiumServiceBuilder.java:156)
    ... 24 more

SKIPPED CONFIGURATION: @BeforeClass setUp
SKIPPED CONFIGURATION: @AfterClass tearDown
SKIPPED: testCreateSession

===============================================
    Default test
    Tests run: 1, Failures: 0, Skips: 1
    Configuration Failures: 1, Skips: 2
===============================================


===============================================
Default suite
Total tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 3
===============================================

[TestNG] Time taken by org.testng.reporters.jq.Main@60f82f98: 66 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@7a5d012c: 14 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@67b64c45: 121 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 22 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@6aaa5eb0: 10 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@380fb434: 7 ms

附言 1  ·  2018年07月16日

找到答案了 ; 我用 nodejs 安装了 appium-server 问题解决 ;实际上 ,官方给出了两种解决方案 : 1. 从命令行安装 2. 直接安装 appium.exe ; 不知道为什么 , .exe 安装后 ;似乎不能被 appium-java-client 所识别; 那么最终解决方案就是 : 又映射了镜像 ,从 node 命令行模式安装了一遍 ;问题解决 ;

共收到 2 条回复 时间 点赞

重装下 appium-server 端试试

我是安装的 appium-desktop , 使用的最新版 ;但是似乎没有起作用 ; 目前 stackflow 仍然没有找到相关的解答

tester_小新 关闭了讨论 07月16日 14:05
tester_小新 重新开启了讨论 07月16日 14:05
tester_小新 关闭了讨论 07月16日 14:08
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册