Skip to content

Android requests failing with cookies #33

@leabaertschi

Description

@leabaertschi

Requests with cookies are failing with the following error:

03-17 10:43:14.575 22319 22461 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Util;
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.JavaNetCookieJar.decodeHeaderAsJavaNetCookies(JavaNetCookieJar.kt:81)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.JavaNetCookieJar.loadForRequest(JavaNetCookieJar.kt:59)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at com.facebook.react.modules.network.ReactCookieJarContainer.loadForRequest(ReactCookieJarContainer.kt:37)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:75)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:74)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:126)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:208)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:530)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
03-17 10:43:14.575 22319 22461 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:1012)

expo 55.0.5
react-native 0.83.2
@bam.tech/react-native-app-security 0.6.1

When removing @bam.tech/react-native-app-security from the app all works as expected. It looks like there might be version mismatches of okhttp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions