appium / appium/java-client

Getting NoSuchMethodError with latest of Java client version

Open
#1,297 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Description

Getting java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V when new AndroidDriver is initialised. Looks like there is a dependency version mismatch

Environment

  • Java client build version or git revision if you use some snapshot: 7.3.0
  • Appium server version or git revision if you use some snapshot: 1.16.0-beta.3
  • Desktop OS/version used to run Appium if necessary:
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: v12.4.0
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Emulator

Details

I have only Java client dependency and have NOT added selenium dependency explicitly
Similar issues that I could find out
https://github.com/appium/java-client/issues/1197 - Open issue
https://github.com/appium/java-client/issues/171
https://github.com/appium/java-client/issues/171

Code To Reproduce Issue [ Good To Have ]

Exception Stacktraces

Error log here

However, this issue can be resolved by adding the latest selenium remote driver explicitly

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the Java client 7.3.0 dependency graph and the initialization path for the new AndroidDriver, using the reported NoSuchMethodError and linked error log. Reproduce with Appium server 1.16.0-beta.3 and verify that initialization works without adding an explicit Selenium remote driver dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.