Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercom was not initialized correctly #499

Open
JustineUgo opened this issue Jan 28, 2025 · 4 comments
Open

Intercom was not initialized correctly #499

JustineUgo opened this issue Jan 28, 2025 · 4 comments
Labels
platform-android Specific to Android platform support Asking for help writing an application

Comments

@JustineUgo
Copy link

I have been getting this error from our users through our Firebase Crashlytics.

Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.getcleva.cleva_mobile_app/io.intercom.android.sdk.m5.IntercomRootActivity}: io.intercom.android.sdk.exceptions.IntercomIntegrationException: Intercom was not initialized correctly, Intercom.initialize() needs to be called in onCreate() in your Application class.

I followed the documentation to properly setup for Android.

I created an MyApp.kt file and created a custom android.app.Application class named MyApp with an onCreate() override to initialize Intercom Sdk.

import android.app.Application
import io.maido.intercom.IntercomFlutterPlugin

class MyApp : Application() {
  override fun onCreate() {
    super.onCreate()

  
    IntercomFlutterPlugin.initSdk(this, appId = <Intercom App ID>, androidApiKey = <Intercom Android Key>)
  }
}

Finally, in my AndroidManifest.xml on the application tag I added an android:name attribute, and set the value to the class' name, prefixed by a dot (.). android:name=".MyApp"

Before shipping to production, it was confirmed and worked properly as expected.
From my investigation, this issue doesn't happen to all my android user, but has affected about 22 users.

@deepak786 deepak786 added platform-android Specific to Android platform support Asking for help writing an application labels Jan 28, 2025
@JustineUgo
Copy link
Author

@deepak786 Please can you assist here?

@deepak786
Copy link
Collaborator

@JustineUgo Can you please confirm if the issue is from your updated app version or older app version? It maybe possible that your users are still having the old app version.

@JustineUgo
Copy link
Author

JustineUgo commented Jan 31, 2025

@deepak786 Its actually users on my recent versions.
And I'm using intercom_flutter: ^9.2.1

@deepak786
Copy link
Collaborator

deepak786 commented Jan 31, 2025

@JustineUgo Then I'm not sure.

But are all the recent versions have the above implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-android Specific to Android platform support Asking for help writing an application
Projects
None yet
Development

No branches or pull requests

2 participants