appium / appium/java-client

Library source does not match the bytecode for class ServerEvents

Open
#1,283 2 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

After importing appium java-client 7.3.0 in my gradle project (using implementation io.appium:java-client:7.3.0 per instructions here: https://search.maven.org/artifact/io.appium/java-client/7.3.0/jar

I am unable to debug because of the error:
Library source does not match the bytecode for class ServerEvents

I've been all over Intellij's troubleshooting steps, such as removing the caches folders for 7.3.0, invalidating caches and restarting, re-importing the project, etc. but none have helped in resolving this.

Can anyone help with steps on how to get the matching source for this version of the java-client?

I'm trying to use the ServerEvents class to record timings on test runs.
ServerEvents events = ((IOSDriver) driver).getEvents() events.save(new File("/Users/username/Desktop/java.json").toPath());

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:
  • Desktop OS/version used to run Appium if necessary: 1.15.1
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe:
  • Mobile platform/version under test: iOS
  • Real device or emulator/simulator: both/either

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

Please remember: it's easier to reproduce and fix the bug with sample code.
You can git clone https://github.com/appium/appium/tree/master/sample-code or https://github.com/appium/appium/tree/master/sample-code/apps and reproduce an issue using Java and sample apps.
Also you can create a gist with pasted java code sample or put it here using markdown. About markdown please read Mastering markdown and
Writing on GitHub

Exception Stacktraces

Please create a gist with the pasted stacktrace of the exception thrown by java.

Link To Appium Logs

Please create a gist which is a paste of your full Appium logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read!
If you are reporting a bug, always include Appium logs as linked gists! It helps to define the problem correctly and clearly.

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 with the Gradle dependency declaration for io.appium:java-client:7.3.0 and the ServerEvents class used through IOSDriver.getEvents(). Inspect the published 7.3.0 library and source artifacts to determine whether they correspond, then verify that IntelliJ can debug ServerEvents with matching sources.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.