Suraj
Suraj

Reputation: 1

java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.tolmmutableList() Ljava/util/stream/Collector error using Appium and Selenium

We are trying to integrate report portal with mobile automation framework. In the framework we are using Appium, Selenium and TestNG. We have added Report portal dependencies and at the time of execution, we can see the launches in report portal but the execution is getting failed with following exception:

java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.tolmmutableList() Ljava/util/stream/Collector;
at io.appium.java_client.remote.NewAppiumSessionPayload.getW3C (NewAppiumSessionPayload.java:367)

We tried changing Appium and Report portal dependency versions.

Upvotes: 0

Views: 304

Answers (1)

undetected Selenium
undetected Selenium

Reputation: 193308

This error message...

java.lang.NoSuchMethodError: com.google.common.collect.ImmutableList.tolmmutableList() Ljava/util/stream/Collector;

...implies that there are conflicting/multiple versions of guava at play.

Possibly Report portal dependencies adds the second version of guava. Resolve the interdependency and you would be good to go.

Upvotes: 1

Related Questions