Failed resolution of: Ljava/net/http/HttpClient;
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.3k
- Forks
- 752
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 8
Description
Description
Attempting to setup Appium in a KMM app, currently working on the Android side. Attempting to run a basic test results in the runtime error in the title when the AndroidDriver() is instantiated.
Environment
- Kotlin 1.9.10
- Java client 9.1.0
- Selenium 4.17.0
- Appium CLI v2.4.1
- MacOS Ventura 13.5.2
- Android API 34
- Pixel 7 Emulator
Details
Please provide more details, if necessary.
Attempting to run the test always fails at driver = AndroidDriver(url, options) and results in the stack trace below. The missing library, java.net.http.HttpClient, doesn't appear to be available on Android.
Failed resolution of: Ljava/net/http/HttpClient;
at org.openqa.selenium.remote.http.jdk.JdkHttpClient.<init>(JdkHttpClient.java:90)
at org.openqa.selenium.remote.http.jdk.JdkHttpClient$Factory.createClient(JdkHttpClient.java:475)
at org.openqa.selenium.remote.HttpCommandExecutor.<init>(HttpCommandExecutor.java:114)
at io.appium.java_client.remote.AppiumCommandExecutor.<init>(AppiumCommandExecutor.java:75)
at io.appium.java_client.remote.AppiumCommandExecutor.<init>(AppiumCommandExecutor.java:102)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:102)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:109)
at com.navusoft.navusaleskmp.test.utils.AuthTest.setUp(AppiumSetup.kt:31)
Code To Reproduce Issue
https://gist.github.com/LivPNavusoft/a190821ffeab12430f651a02727e9b0a
Exception Stacktraces
https://gist.github.com/LivPNavusoft/3ea2a999730d7c2ef6c7d6772ead3131
Link To Appium Logs
None generated, it never connects. Verified I can start a session with AppiumInspector
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction code and stack trace linked in the issue, then inspect the AndroidDriver instantiation at AppiumSetup.kt:31 and the JdkHttpClient entry in the trace. Reproduce the failure in the listed KMM and Android environment; done means AndroidDriver initializes without the missing HttpClient error and the test can proceed to create a session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, kotlin
- Domain
- mobile, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100