Hi guys, I recently integrated intercom in our app React Native app running Expo 54. @intercom/intercom-react-native (^9.6.3). I noticed whenever I build on EAS, calling present() or presentMessageComposer() opens two instances of the messenger bottomsheet in our app. Doesn’t happen whenever I try to build locally using prebuild tho. Has anyone encountered this before?
Answered
Intercom present() method opens 2 message drawers on iOS when built using EAS
Best answer by Dara K
Hey
What you’re seeing (two bottom sheets opening) almost always points to Intercom being initialised twice in the EAS build, even if it looks fine locally. A few things to check:
-
JS initialisation (once only)
- Make sure you only call
Intercom.initialize(...)once in your JS/TS code (e.g. in your app entry file). - It shouldn’t be called again inside individual screens/components, or in both
App.tsxand some custom wrapper.
- Make sure you only call
-
Expo config plugin vs manual native setup
- If you’re using the Expo config plugin in
app.json/app.config:
then you shouldn’t also have manual Intercom setup in native files (e.g.{
"plugins": ["@intercom/intercom-react-native"]
}MainApplication.java/AppDelegate.m). The plugin wires this up for you, and having both can cause the module to be registered twice in EAS builds. - A local
prebuildcan behave differently if the plugin/native changes aren’t identical to what EAS is using, which matches what you’re seeing.
- If you’re using the Expo config plugin in
-
Clean EAS build after changes
- After removing any duplicate init (either extra JS initialisation or extra native wiring), do a clean EAS build and test again.
Join the Intercom Community 🎉
Already have an account? Login
Login to the community
No account yet? Create an account
Intercom Customers and Employees
Log in with SSOor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
