Skip to content

Conversation

@albinekb
Copy link
Contributor

See https://community.intercom.com/mobile-sdks-24/react-native-crash-on-android-for-latest-version-5-0-0-4482

Since this commit, if you send loginUserWithUserAttributes({ userId }) you get a crash on android:

com.facebook.react.bridge.NoSuchKeyException: email
    at com.facebook.react.bridge.ReadableNativeMap.getType(ReadableNativeMap.java:183)
    at com.intercom.reactnative.IntercomHelpers.getValueAsStringForKey(IntercomHelpers.java:227)
    at com.intercom.reactnative.IntercomModule.loginUserWithUserAttributes(IntercomModule.java:139)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:188)
    at com.facebook.jni.NativeRunnable.run(NativeRunnable.java)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
    at android.os.Looper.loopOnce(Looper.java:226)
    at android.os.Looper.loop(Looper.java:313)
    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)
    at java.lang.Thread.run(Thread.java:1012)

Copy link
Contributor

@Br1an-Boyle Br1an-Boyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @albinekb 👍🏻

@Br1an-Boyle Br1an-Boyle merged commit 9e087c7 into intercom:main May 31, 2023
@professorkolik
Copy link

By any chance you'll fix below issue as well?

Failed to register user. We already have a registered user. If you are attempting to register a new user, call logout() before this. If you are attempting to register an identified user call: registerIdentifiedUser(Registration)

It spams our tracking error system
Since you closed issues on Github and don't react in https://community.intercom.com may be here will be some action

@Br1an-Boyle
Copy link
Contributor

Hey @professorkolik
I'd recommend you get in touch with our support team via our Messenger on intercom.com.
Thats the best place to get this issue your having looked at.
Cheers
Brian

@Br1an-Boyle
Copy link
Contributor

@professorkolik you mentioned you got no reply on our community hub. Do you have a link to your post there so I can review it?
Thanks

@professorkolik
Copy link

@Br1an-Boyle thank you for fast response
https://community.intercom.com/mobile-sdks-24/how-can-i-get-the-currently-logged-in-user-2766

It happens only on Android and after we upgrade to v4

@ColeTownsend
Copy link

We noticed this only on iOS that there is a crash on initializing a user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants