tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
406 stars 280 forks source link

"Detected problems with API compatibility" pop-up error when starting Intercom on Android #406

Closed yahm23 closed 2 years ago

yahm23 commented 3 years ago

React Native version:

0.62.2

Intercom package version:

13.2.0

Device:

Hauwei P20 Lite, running on Android 9, with an API level of 28

Description

I have Intercom working smoothly on an emulator device running on Android 10, with an API level of 29. However, when using a real device running in Android 9 with API level of 28 I'm greeted with this error pop-up:

I can click 'OK' and continue using Intercom smoothly, however, this can't be visible to the user. I've researched the reason behind this and followed the URL the pop-up provides; and it seems to be an issue with accessing a dark-greylist or black list non-SDKs.

I then checked Logcat to see if any error messages popped up that are related to this and sure enough:

myapp.app Accessing hidden method Landroid/content/res/Resources$Theme;->rebase()V (dark greylist, reflection)

This also only occurs the first time the app is downloaded on the device, afterwards the pop-up doesn't show again. I've found a workaround that removes the pop-up by editing MainApplication.java but I had trouble with this, in addition it seems hacky and does not actually address the issue.

I'm lost and not too sure how to resolve this.

Any help or insight appreciated.

Edit I've run the application in production build and the error seems to disappear. I guess it's more a debug error for developers, but would still be interesting to know what aspect of the package is causing this.