Android app crashes when setting up Intercom React Native

  • 18 October 2022
  • 5 replies

I'm seeing this weird error.

TypeError: null is not an object (evaluating 'IntercomEventEmitter.UNREAD_COUNT_CHANGE_NOTIFICATION')


image.pngI followed the guide on the official Github repo


After trying the manual linking, I get a different error when building the app.

> Task :intercom-react-native:generateDebugRFile FAILED
Execution optimizations have been disabled for task ':intercom-react-native:generateDebugRFile' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/Users/bryamrodriguez/src/sammy-native/node_modules/@intercom/intercom-react-native/android/build/intermediates/packaged_manifests/debug'. Reason: Task ':intercom-react-native:generateDebugRFile' uses this output of task ':intercom_intercom-react-native:processDebugManifest' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to more details about this problem.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':intercom-react-native:generateDebugRFile'.
> A failure occurred while executing$GenerateLibRFileRunnable
> /Users/bryamrodriguez/src/sammy-native/node_modules/@intercom/intercom-react-native/android/build/intermediates/local_only_symbol_list/debug/R-def.txt

I'm using:

react native: 0.69.6

@intercom/intercom-react-native: 3.0.5

Device: Pixel 4 API 33



Best answer by Daniel M15 3 November 2022, 15:13

View original

5 replies

Userlevel 2

Hey @bryam​! Daniel from Customer Support Engineering here 🔧 


Could you please contact us over the Messenger for this one if you haven't already? There have been some reported issues on React native and it would be helpful for tracking the ongoing issues if you could write in to us 🙏 Thanks!

Did you ever find a solution? I'm getting a similar error on Android.


TypeError: Cannot read property 'UNREAD_COUNT_CHANGE_NOTIFICATION' of null, js engine: hermes


RN Version 0.70.5

"@intercom/intercom-react-native": "^4.0.1",

Not a solution, but we decided against this SDK and used the web plugin and included it with a webview in our mobile app

Nevermind, figured it out. My build config was messed up and my env vars weren't getting set.

Nevermind, figured it out. My build config was messed up and my env vars weren't getting set.

I have the same issue and tried a bunch of other things, could you please tell me what was the issue that you found?