intercom_flutter icon indicating copy to clipboard operation
intercom_flutter copied to clipboard

Android App Crashes When Open Intercom: IllegalStateException

Open Nahrawene-ben-hmida opened this issue 2 years ago • 4 comments

Title: Android App Crashes When Open Intercom: IllegalStateException

Issue Description:

On Android, attempting to open Intercom results in an application crash with the following error: IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

Environment:

  • Flutter version: 3.10.6
  • Intercom for Flutter version: 7.8.3
  • Gradle version: gradle-7.1.3
  • kotlin version = '1.7.20'

To Reproduce:

call : Intercom.instance.displayMessenger()

Expected Result:

should open intercom view

Actual Result:

When the Intercom is clicked, the app crashes and throws the error: IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.

Logs:

D/AndroidRuntime(18907): Shutting down VM E/AndroidRuntime(18907): FATAL EXCEPTION: main E/AndroidRuntime(18907): Process: com.expensya.revamped, PID: 18907 E/AndroidRuntime(18907): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. E/AndroidRuntime(18907): at android.view.ViewGroup.addViewInner(ViewGroup.java:5235) E/AndroidRuntime(18907): at android.view.ViewGroup.addView(ViewGroup.java:5064) E/AndroidRuntime(18907): at android.view.ViewGroup.addView(ViewGroup.java:5004) E/AndroidRuntime(18907): at android.view.ViewGroup.addView(ViewGroup.java:4976) E/AndroidRuntime(18907): at app.screeb.sdk.ScreebWebView.onActivityStarted(SourceFile:2) E/AndroidRuntime(18907): at android.app.Application.dispatchActivityStarted(Application.java:406) E/AndroidRuntime(18907): at android.app.Activity.dispatchActivityStarted(Activity.java:1348) E/AndroidRuntime(18907): at android.app.Activity.onStart(Activity.java:1833) E/AndroidRuntime(18907): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1435) E/AndroidRuntime(18907): at android.app.Activity.performStart(Activity.java:8024) E/AndroidRuntime(18907): at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3475) E/AndroidRuntime(18907): at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221) E/AndroidRuntime(18907): at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201) E/AndroidRuntime(18907): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173) E/AndroidRuntime(18907): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) E/AndroidRuntime(18907): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) E/AndroidRuntime(18907): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(18907): at android.os.Looper.loop(Looper.java:223) E/AndroidRuntime(18907): at android.app.ActivityThread.main(ActivityThread.java:7656) E/AndroidRuntime(18907): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(18907): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/AndroidRuntime(18907): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) I/Process (18907): Sending signal. PID: 18907 SIG: 9

Screenshots:

image image

I would appreciate any help in resolving this issue. Thanks!

Nahrawene-ben-hmida avatar Aug 17 '23 14:08 Nahrawene-ben-hmida

We're currently facing the same issue :( It's blocking for the majority of our clients.

khalilyamoun avatar Aug 17 '23 14:08 khalilyamoun

Can you test the example app and see if it is also crashing? Also try the latest intercom_flutter: 7.8.4

deepak786 avatar Aug 17 '23 18:08 deepak786

I'm checking this issue with Intercom support team.

Meanwhile @Nahrawene-ben-hmida @khalilyamoun Is there any update related to my last comment?

deepak786 avatar Aug 21 '23 17:08 deepak786

any updates ?

abed-supy-io avatar Oct 02 '23 07:10 abed-supy-io