Unable to start Appium service issue through Appiumdriverlocalserivce

Source: Internet
Author: User

Problem background Description

With the official Appiumdriverlocalservice method, the code starts Appium server

1 ImportIo.appium.java_client.service.local.AppiumDriverLocalService;2 ImportIo.appium.java_client.service.local.AppiumServiceBuilder;3 ImportIo.appium.java_client.service.local.flags.GeneralServerFlag;4 5 6 /**7  * @authorKingdow8 * @date 2018/5/18 17:319  */Ten  Public classAppiumdrivertest { One  A      Public Static voidMain (string[] args) { -  -Appiumservicebuilder Builder =NewAppiumservicebuilder () the . Withargument (generalserverflag.session_override) -. Withipaddress ("127.0.0.1") - . Usinganyfreeport (); -Appiumdriverlocalservice Service =Appiumdriverlocalservice.buildservice (builder); + Service.start (); -     } +}

Get the following error message

ExceptioninchThread"Main"Io.appium.java_client.service.local.AppiumServerHasNotBeenStartedLocallyException:The local appium server have not been started. The given node. js Executable:c:\program files\nodejs\node.exe Arguments: [C:\Users\KingDow\AppData\Roaming\npm\node_ Modules\appium\build\lib\main.js,--port,8000,--address,127.0.0.1,--session-Override] at Io.appium.java_client.service.local.AppiumDriverLocalService.start ( Appiumdriverlocalservice.java:149) at Com.ziroom.vayne.appium.server.AppiumDriverTest.main (Appiumdrivertest.java: -) at Sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke (Nativemethodaccessorimpl.java: +) at Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.java: +) at Java.lang.reflect.Method.invoke (Method.java:498) at Com.intellij.rt.execution.application.AppMain.main (Appmain.java:144) caused By:java.lang.NoSuchMethodError:com.google.common.util.concurrent.SimpleTimeLimiter.create (Ljava /util/concurrent/executorservice;) lcom/google/common/util/concurrent/Simpletimelimiter; At Org.openqa.selenium.net.UrlChecker.<init> (Urlchecker.java: +) at Io.appium.java_client.service.local.AppiumDriverLocalService.Ping(Appiumdriverlocalservice.java:113) at Io.appium.java_client.service.local.AppiumDriverLocalService.start (Appiumdriverlocalservice.java:136)    ... 6  MoreProcess finished with exit code1

Problem analysis Positioning

The referenced third-party dependency package version conflict, which was found to be positioned as Com.google.guava version too low, does not have the Simpletimelimiter create () method in the original version 20.0.

Problem Solving Methods

After updating the latest version of guava, see the source code Create () method exists

<!--Https://mvnrepository.com/artifact/com.google.guava/guava -<Dependency>    <groupId>Com.google.guava</groupId>    <Artifactid>Guava</Artifactid>    <version>25.1-jre</version></Dependency>

Unable to start Appium service issue through Appiumdriverlocalserivce

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.