Answered

Chat not starting/connecting when the android app is running for the first time

  • 9 September 2020
  • 5 replies
  • 105 views

I'm using intercom android 7.2.0 (also tested 8.1.0 and it is the same) and I have a strange issue: the first time I run my application, when I try to use the messaging, intercom didn't start correctly, but it works fine if I close the application and start it again.

From my side, it appears like a service is not starting/connecting the first time the app is run.

Do this behaviour rings any bell to you? Oh, and this is important: I've just migrated my app to androidX. Intercom was working fine before the migration, when I was using the support libraries.

Any advice?

 

This is what I see in the first run:

 

lOxDNo2pgt

the user is registered correctly, and the event log is working as expected

but no messaging is available until I restart the app.

If I restart now, the conversation loads correctly

icon

Best answer by Justin W11 9 September 2020, 18:55

View original

5 replies

Badge +1

Hey @guillermo​ - I'm not an Android user, but from my research I don't see anything that indicates the specific support for Android X that may require a few adjustments to the code to initiate the Intercom service to appear. You definitely have a glitch experience which appears to be a routing issue, but I am still looking.

Userlevel 1

Hey @guillermo​, I checked with our mobile engineers and the only known issue with AndroidX is that customers will have to keep 

android.enableJetifier=true in their gradle settings until we update Glide. Do you have it set up this way in your gradle?

Hi Eric and Justin, thank you both for the responses.

 

I'm using intercom in a Xamarin application (I've been using for years my own binding here), so there is no Gradle.

 

I've tested a little bit more and I've realized that the problem was not related to the migration to AndroidX step per se, but to a previous change I did in the project structure, before migrating to AndroidX; I've also migrated my project to use PackageReference instead of the old package.config for all the dependencies.

 

Now, I know that you don't support xamarin yourselves, but any lead on what could be the reason for this behavior will help me to solve the problem. 

 

Could it be related to a service not registering/starting as supposed to?  

Or it sounds more like being a dependency problem? (I doubt it because that do not explain why it is working fine the second time the application run)

I have more information about the error. I've enabled the log in verbose mode, and I compared the logs for the first time run (where intercom fails to initialize) and the second run. I can see only one error in the first run log, and it says:

 

Error  18085   Intercom    Failed to register or update user: {"type":"error.list","request_id":"some random id, i deleted it just in case it contains any private info","errors": [{"code":"hmac_mismatch","message":"Failed Identity Verification check"}]}

 

I'll check and debug my code to see if I found what is going on

 

With regard to my last comment:

Both the first and second run are registering the user using the same digest, so I have no idea why this is failing the first time. Any ideas? If it is useful in any way, I can attach both logs

Reply