I have error on android: "Something went wrong. Couldn't load your conversations". Console gives:
Intercom React Native Error TypeError: IntercomWrapper.registerForPush is not a function
at IntercomClient.js:221
at tryCallTwo (core.js:45)
at doResolve (core.js:200)
at new Promise (core.js:66)
at IntercomClient.js:220
at tryCallOne (core.js:37)
at core.js:123
at JSTimers.js:98
at Object.callTimer (JSTimersExecution.js:95)
at Object.callImmediatesPass (JSTimersExecution.js:199)
at Object.callImmediates (JSTimersExecution.js:214)
at MessageQueue.js:222
at guard (MessageQueue.js:46)
at MessageQueue.__callImmediates (MessageQueue.js:222)
at MessageQueue.js:109
at guard (MessageQueue.js:46)
Resolved with user registering: Intercom.registerIdentifiedUser({ userId: 'bob' }); but still registerForPush is not a function
Im having the same issue even with Intercom.registerIdentifiedUser already in use.
Android simulator works just fine but when installed on a device and trying to open the chat window i just get the "Something went wrong. Couldn't load your conversations" message.
Don't know what is wrong
I've the same problem on Android
Intercom React Native Error TypeError: IntercomWrapper.registerForPush is not a function
at IntercomClient.js:221
at tryCallTwo (core.js:45)
at doResolve (core.js:200)
at new Promise (core.js:66)
at IntercomClient.js:220
at tryCallOne (core.js:37)
at core.js:123
at JSTimers.js:262
at _callTimer (JSTimers.js:143)
at Object.callImmediatesPass (JSTimers.js:443)
On iOS everything works fine.
Having a look into the native code, registerForPush is defined within the iOS code but not within Android. Is it supposed to be like this?
Any other ideas what might be wrong?
__Update:__
I've the feeling that it is supposed to be like this. registerForPush is only needed for iOS, so you might want to put it in a if clause:
if (Platform.OS === 'ios') {
Intercom.registerForPush()
}
To make pushes work on Android I've had to call
Intercom.sendTokenToIntercom(deviceToken)
After I registered my device for pushes and received the deviceToken.
@andoni0305, did you manage to find a solution? I'm having the same error when running on device. EDIT: For me, the error was that I was using the same API key for iOS and Android, just changing ios_sdk to android_sdk... needless to say, that doesn't work 馃槢
is there an answer to that issue?
@cauboy you sir are awesome!
Most helpful comment
I've the same problem on Android
On iOS everything works fine.
Having a look into the native code,
registerForPushis defined within the iOS code but not within Android. Is it supposed to be like this?Any other ideas what might be wrong?
__Update:__
I've the feeling that it is supposed to be like this.
registerForPushis only needed for iOS, so you might want to put it in a if clause:To make pushes work on Android I've had to call
After I registered my device for pushes and received the deviceToken.