Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appium JAVA Client 5.0.1 AppiumServiceBuilder throws java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V Exception #713

Closed
EitanBe opened this issue Aug 30, 2017 · 1 comment
Assignees

Comments

@EitanBe
Copy link

EitanBe commented Aug 30, 2017

Description

I start server programmatically using java client 5.0.1
the line: AppiumServiceBuilder asb = new AppiumServiceBuilder();
same for: new AppiumServiceBuilder();
throw the exception: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V

Running Appium via command line works fine.

I tried with:
//appium.node.js.exec.path
System.setProperty(AppiumServiceBuilder.NODE_PATH ,
nodePath);

System.setProperty(AppiumServiceBuilder.APPIUM_PATH ,
mainPath);

and did not work.

Environment

*Appium server version is: 1.6.5
IOS Sierra
node version: v6.11.2
Android real device (5)

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

AppiumServiceBuilder asb = new AppiumServiceBuilder();

Ecxeption stacktraces

ava.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V

at org.openqa.selenium.remote.service.DriverService$Builder.usingPort(DriverService.java:241)
at io.appium.java_client.service.local.AppiumServiceBuilder.usingPort(AppiumServiceBuilder.java:455)
at io.appium.java_client.service.local.AppiumServiceBuilder.<init>(AppiumServiceBuilder.java:95)
at .AndroidDevice.setAppiumServerParams(AndroidDevice.java:65)
at .entities.devices.Device.startServer(Device.java:163)
atutils.AppiumServer.start(AppiumServer.java:16)
at .stepDefinitions.hooks.AppiumInitializationHook.appiumBefore(AppiumInitializationHook.java:24)
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 cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Link to Appium logs

No logs

@TikhomirovSergey TikhomirovSergey self-assigned this Aug 30, 2017
@TikhomirovSergey
Copy link
Contributor

@EitanBe I am going to fix it there #714 . Thank you for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants