Skip to main content
Answered

React Native EXPO: 404 Resource not found

  • September 25, 2024
  • 3 replies
  • 122 views

Hi there, 

We have issue with the mobile SDK “@intercom/intercom-react-native” when trying to integrate it with our APP with Expo. 

 

Below is the sample code we ran with local development build with iOS/Android simulator

try {
          console.log('==== SIGN IN ===='); 
          await Intercom.loginUnidentifiedUser();
        } catch (error) {
          console.error(
            error.code,  // 101
            error.message, // Error in loginUnidentifiedUser
            error.userInfo?.NSLocalizedDescription // HTTP Error: 404 not found
          );
        }

environment variables & dependencies version:

  • @intercom/intercom-react-native - v7.2.1

  • expo SDK: v51.0.31

  • react: v18.2.0

  • react-native: v0.74.5

 

Any idea?

Kind regards,

 

Best answer by Oseas

This was solved via support conversation.

 

For anyone running into a similar issue, please make sure to check you’re pointing your Intercom instance to the right region. For example, if your workspace is hosted in the US, you’ll need to specify “US” for the intercomRegion attribute within the expo object:

 

You can find our documentation for Expo here.
 

Sometimes can be tricky to know exactly what region your workspace is hosted (thanks to @stinglin for flagging that). But an easy way to find your hosting region is by checking the URL of your workspace. The URL will differ based on the region:

  • For US-hosted workspaces, the URL will be app.intercom.com.

  • For EU-hosted workspaces, the URL will be app.eu.intercom.com.

  • For Australian-hosted workspaces, the URL will be app.au.intercom.com.

Hope that helps!

View original
Did this topic help you find an answer to your question?

3 replies

  • Author
  • New Participant
  • 2 replies
  • September 25, 2024

Update

Android simulator was able to loginUnidentifiedUser, but after calling

Intercom.presentMessageComposer()
// or
Intercom.present()

It is showing “something’s gone wrong”

 


  • Author
  • New Participant
  • 2 replies
  • September 29, 2024

[Problem solved]

It was caused by the region of the workspace:

"intercomRegion": "US"

One suggestion: it would be great to show the region in the workspace portal interface to save us time to trouble shooting.

 

Big shout out to support team. Thank you.


Oseas
Employee
Forum|alt.badge.img+4
  • Employee
  • 103 replies
  • Answer
  • September 30, 2024

This was solved via support conversation.

 

For anyone running into a similar issue, please make sure to check you’re pointing your Intercom instance to the right region. For example, if your workspace is hosted in the US, you’ll need to specify “US” for the intercomRegion attribute within the expo object:

 

You can find our documentation for Expo here.
 

Sometimes can be tricky to know exactly what region your workspace is hosted (thanks to @stinglin for flagging that). But an easy way to find your hosting region is by checking the URL of your workspace. The URL will differ based on the region:

  • For US-hosted workspaces, the URL will be app.intercom.com.

  • For EU-hosted workspaces, the URL will be app.eu.intercom.com.

  • For Australian-hosted workspaces, the URL will be app.au.intercom.com.

Hope that helps!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings