appwrite / appwrite/sdk-for-android
Bug Report: Incompatibility with OkHttp 5.x – NoClassDefFoundError: okhttp3.internal.Util
- Dominant language
- Kotlin
- Stars
- 154
- Forks
- 30
- Avg merge
- 5h 41m
- Merged PRs (30d)
- 3
Description
### 👟 Reproduction steps
1. Add `implementation("com.squareup.okhttp3:okhttp:5.1.0")` to dependencies
2. Use Appwrite SDK in your Android app
3. Run a request that uses cookies
4. Crash occurs at `ListenableCookieJar`
### 👍 Expected behavior
- The Appwrite SDK should not rely on internal or private OkHttp classes.
- `ListenableCookieJar` should use only public APIs (e.g. `java.net.HttpCookie.parse(...)`) to handle cookies.
- App should work normally without crashing when using OkHttp 5.x.
### 👎 Actual Behavior
- App crashes at runtime with the following error:
- Caused by internal API usage that was removed in OkHttp 5.1.0.
- Makes it impossible to use Appwrite SDK with the latest OkHttp versions.
### 🎲 Appwrite version
Appwrite Cloud
### 💻 Operating system
Something else
### 🧱 Your Environment
- Appwrite SDK version: 8.1.0
- OkHttp version: 5.1.0
- Android version: Any
- Crash location: `ListenableCookieJar.kt`
### 👀 Have you spent some time to check if this issue has been raised before?
- [x] I checked and didn't find similar issue
### 🏢 Have you read the Code of Conduct?
- [x] I have read the [Code of Conduct](https://github.com/appwrite/.github/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.