Intercom Android SDK crashing with Android AppCompat 1.1.0-alpha03

#1

Hi,

Android Intercom crash when IntercomBaseActivity call applyOverrideConfiguration with an
IllegalStateException(" Override configuration has already been set ");

It’s because, since AppCompat 1.1.0-alpha03, AppCompatActivity had already call applyOverrideConfiguration before IntercomBaseActivity

See the AppCompat git commit here :
https://android.googlesource.com/platform/frameworks/support/+/fdccf4b1a3c96ede7f955635858d5acba75b6f2e

Intercom.client().displayMessenger() throws exception
#2

Hey there Steve :wave:

What you’ve run into here is a known issue in Intercom at the moment. Our engineers are looking into it and are currently working on a fix.

I’ve come across this quite a lot and we’ve advised customers to try rolling back to version 1.0.2 of AppCompat.

However, I’ve also had some customers with who’ve managed to resolve this issue by updating to the latest version of AppCompat alpha. For example updating to appcompat 1.1.0-alpha05.

#3

Thanks for your answer

AppCompat 1.1.0-alpha05 doesn’t exists yet
AppCompat 1.1.0-alpha04 had the same issue

Rolling back to version 1.0.2 of AppCompat works again

#4

Ah right sorry, I didn’t realise alpha05 wasn’t out yet! Okay I’m glad that resolved the issue for now. I’ll reach out to you through Intercom once the issue is resolved to let you know. :+1:

1 Like
#5

Hi our integrated intercom in android is also crashing
Error Logs :
Unable to start activity ComponentInfo{client.spanda.com/io.intercom.android.sdk.activities.IntercomMessengerActivity}: java.lang.IllegalStateException: getResources() or getAssets() has already been called

Caused by: java.lang.IllegalStateException: getResources() or getAssets() has already been called
at android.view.ContextThemeWrapper.applyOverrideConfiguration(ContextThemeWrapper.java:95)
at io.intercom.android.sdk.utilities.ContextLocaliser.applyOverrideConfiguration(ContextLocaliser.java:70)
at io.intercom.android.sdk.activities.IntercomBaseActivity.attachBaseContext(IntercomBaseActivity.java:13)

I also tried to rolling back my version but still not working.

----> implementation ‘androidx.appcompat:appcompat:1.0.2’

@steve.grosbois do you have suggestion regarding this error? Thankyou so much for the help.

#6

Use appcompat version 1.1.0-alpha02 and then add

configurations.all {
    resolutionStrategy.eachDependency { details ->
        def requested = details.requested
        if (requested.group == 'androidx.appcompat') {
            details.useVersion '1.1.0-alpha02'
        }
    }
}

at the bottom of your app-level build.gradle.