Closed michaelVictoriaDev closed 2 years ago
I have the same issue!
I am having an issue like this as well. In my case after just follow up the installation guide, suddenly all my axios requests are returning Network Error and they were just fine before.
I also faced similar issue when using the updated version 21.1.0 (or even 20.0.0). It was running successfully on Android only when I run the app in Debug mode and ENABLE the Network Inspect otherwise the Android app was always crashing as soon as a Network call was hit.
A quick fix for the issue is to downgrade the package to ^18.0.0 and use sdk 7.+ . By using this configuration, Android app won’t crash in release mode but the UI of Intercom screen looks distorted.
Seems like we have to wait to get the latest version of the package fixed to make everything work properly.
Refer this issue thread for details on fixing the crash : https://github.com/tinycreative/react-native-intercom/issues/422
We did fix this updating the okhttp packages in our gradlew, for some reason Intercom and some other libraries were trying to make requests using different okhttp versions, causing crash. Not sure if everyone is having the same issue, but my fix was adding these lines:
dependencies { // define a BOM and its version implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.0")) // define any required OkHttp artifacts without version implementation("com.squareup.okhttp3:okhttp") implementation("com.squareup.okhttp3:logging-interceptor") }
Thanks @molimat ! Your solution works like a charm.
We also faced same crash issue with react native insider versions greater than 19.0.0. The above fix mentioned by @molimat fixed the crash issue, but was causing some problems with other libraries already there in our app. So that didn't help us.
Waiting for a permanent fix for this crash problem.
Thanks to @molimat , this solution works!
Also you can check the OkHttp docs where you can find the examples @molimat mentioned
https://square.github.io/okhttp/#releases
dependencies {
// Intercom requires okhttp packages to be version compatible
// For latest release please check: https://square.github.io/okhttp/#releases
// define a BOM and its version
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.9.0"))
// define any required OkHttp artifacts without version
implementation("com.squareup.okhttp3:okhttp")
implementation("com.squareup.okhttp3:logging-interceptor")
}
After config all in the docs, and config the gradle.
Im having app crash with no errors in my terminal
Then Im starting to check in adb logs , I think the screenshot is saying there's an error in the package.