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

app Crash com.apptentive.android.sdk.ApptentiveViewActivity java.lang.IllegalStateException: Already attached #194

Open
anilkumar98 opened this issue Dec 27, 2019 · 5 comments

Comments

@anilkumar98
Copy link

anilkumar98 commented Dec 27, 2019

Hi apptentive Team,

Do we have fix for below crash stack trace.
com.apptentive.android.sdk.ApptentiveViewActivity}: java.lang.IllegalStateException: Already attached
at android.app.ActivityThread.performLaunchActivity + 2927(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity + 2988(ActivityThread.java:2988)
at android.app.ActivityThread.handleRelaunchActivity + 4915(ActivityThread.java:4915)
at android.app.ActivityThread.-wrap21(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage + 1637(ActivityThread.java:1637)
at android.os.Handler.dispatchMessage + 102(Handler.java:102)
at android.os.Looper.loop + 154(Looper.java:154)
at android.app.ActivityThread.main + 6682(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 1520(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main + 1410(ZygoteInit.java:1410)

Thanks,
Anil

@CaseyApptentive
Copy link

Hi @anilkumar98 . Thanks for the report, and apologies that you're seeing an issue. I'll need a bit more information to know for certain.

Can you give a bit more context?

For example, what SDK version are you seeing this on? Are you upgrading from an older SDK, or is this the initial install?

Also are you seeing this crash in real customer devices, or only in a test environment?

Thanks!

@anilkumar98
Copy link
Author

anilkumar98 commented Dec 27, 2019

Thanks! it was so quick response..

com.apptentive:apptentive-android:5.4.5
Android SDK:28
Its not SDK upgrade
Its in our pre prod phase currently

@CaseyApptentive
Copy link

Thanks for the context. Are you using AndroidX 1.1 or more recent?

Also, are you able to able to consistently reproduce the crash?

I ask because, if you're using a recent version of AndroidX, we have seen a crash that happens every time an Apptentive Dialog is dismissed. This particular crash is very easy to repro. I can't quite tell from the stack trace you showed if that's this issue, but wanted to be sure. If it is this issue, it was fixed in SDK version 5.5.0.

@anilkumar98
Copy link
Author

implementation 'androidx.cardview:cardview:1.0.0'

implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta3'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'

implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation "androidx.exifinterface:exifinterface:1.1.0"
implementation 'androidx.multidex:multidex:2.0.1'

Above libs are most updated one.

Also SDK version 5.5.0 where can I see release notes to know if its good to upgrade.

@CaseyApptentive
Copy link

Hi @anilkumar98 !

Apologies for the delay. You can find version 5.5.0 here: https://github.com/apptentive/apptentive-android/releases/tag/v5.5.0

It does look like this crash is fixed in the latest version. The specific issue is with older SDKs and when you use androidx.appcompat:appcompat:1.1.0

Can you try building with 5.5.0 and let me know if you're continuing to see any issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants