Open ghost opened 4 years ago
Hey @TheDoorNextBoy,
Sorry for the issue: we'll take a look at it asap.
@TheDoorNextBoy thanks for the report! We're digging in.
In the meantime, could you email us at support@apptentive.com with which the account you're working on? I'd like to keep your Customer Success Manager in the loop so they can help coordinate, if need be.
Thanks again.
Hey @TheDoorNextBoy , can you please let me know the steps that lead to this crash? I am trying to reproduce the same scenario in order to debug the real issue.
@TheDoorNextBoy, did you get the crash log from the crash reporting tool or were you able to reproduce it locally? Do you have any other logs on top of the crash log?
Hi there, thanks for your fast response! @twinklesharma1311 , @weeeBox I can't reproduce it locally, but it's our number 1 crash on Firebase Crashlytics. I will send you the account details to your support address. Maybe you can see more in your own logs.
I sent a message to support@apptentive.com earlier and got the following back
We recently received a message from you but were unable to find the associated record. Your message was not added to Apptentive.
Could you check that or give me another email address? Thx
@TheDoorNextBoy very sorry about the issue using support@apptentive.com -- I'm looking into it.
Can you email me directly at casey@apptentive.com?
I am also facing the same crash. Using the SDK version 5.4.1 Before the crash my screen freezes with a black screen and logs show the following error:
E/Apptentive: android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class
at android.view.LayoutInflater.inflate(LayoutInflater.java:551) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.apptentive.android.sdk.ApptentiveViewActivity.onCreate(ApptentiveViewActivity.java:143) at android.app.Activity.performCreate(Activity.java:6876) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350) at android.app.ActivityThread.access$1100(ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class at android.view.LayoutInflater.createView(LayoutInflater.java:657) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) at android.view.LayoutInflater.inflate(LayoutInflater.java:527) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.apptentive.android.sdk.ApptentiveViewActivity.onCreate(ApptentiveViewActivity.java:143) at android.app.Activity.performCreate(Activity.java:6876) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350) at android.app.ActivityThread.access$1100(ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) at android.view.LayoutInflater.createView(LayoutInflater.java:631) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) at android.view.LayoutInflater.inflate(LayoutInflater.java:527) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.apptentive.android.sdk.ApptentiveViewActivity.onCreate(ApptentiveViewActivity.java:143) at android.app.Activity.performCreate(Activity.java:6876) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350) at android.app.ActivityThread.access$1100(ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 13: TypedValue{t=0x2/d=0x7f010148 a=3} at android.content.res.TypedArray.getDrawable(TypedArray.java:883) at android.view.View. (View.java:4225) at android.view.ViewGroup. (ViewGroup.java:589) at android.view.ViewGroup. (ViewGroup.java:585) at android.support.v7.widget.Toolbar. (Toolbar.java:233) at android.support.v7.widget.Toolbar. (Toolbar.java:229) at java.lang.reflect.Constructor.newInstance(Native Method) at android.view.LayoutInflater.createView(LayoutInflater.java:631) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:776) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:716) at android.view.LayoutInflater.rInflate(LayoutInflater.java:847) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:810) at android.view.LayoutInflater.inflate(LayoutInflater.java:527) at android.view.LayoutInflater.inflate(LayoutInflater.java:429) at android.view.LayoutInflater.inflate(LayoutInflater.java:380) at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:469) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.apptentive.android.sdk.ApptentiveViewActivity.onCreate(ApptentiveViewActivity.java:143) at android.app.Activity.performCreate(Activity.java:6876) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3207) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350) at android.app.ActivityThread.access$1100(ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
And then after home option pressed App crashes with following logs:
E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.apptentive.android.sdk.adapter.ApptentiveViewPagerAdapter.getFragmentTag(int)' on a null object reference at com.apptentive.android.sdk.ApptentiveViewActivity.onSaveInstanceState(ApptentiveViewActivity.java:302) at android.app.Activity.performSaveInstanceState(Activity.java:1474) at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1317) at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:5398) at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:4700) at android.app.ActivityThread.handleStopActivity(ActivityThread.java:4774) at android.app.ActivityThread.access$1400(ActivityThread.java:222) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1824) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7229) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Hey @prashantbankar,
Could you share the contents of your build.gradle
file and your app theme?
@TheDoorNextBoy could you share the contents of your build.gradle
file and your app theme as well?
Thanks!
@weeeBox
app theme Theme.AppCompat.Light.NoActionBar
build.gradle buildToolsVersion '28.0.0' compileSdkVersion 28 targetSdkVersion 28 implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:recyclerview-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:support-compat:28.0.0'
Thanks @prashantbankar,
Do you also have any reproduction steps?
@weeeBox I am firing up the event
Apptentive.engage(baseContext, event);
then calling startActivity()
I tried the troubleshoot but it didn't help
EDIT: the following log was printed though: I/Apptentive: Launching interaction: EnjoymentDialog
@weeeBox Any update on this?
@prashantbankar, we're trying to reproduce the issue on our end. We have a fix ready but really want to figure out the underlying cause of the inflating exception.
@prashantbankar, what Gradle plugin version do you use?
@weeeBox Gradle Plugin version 3.0.1
and Gradle version 4.1
Thanks, @prashantbankar ! We're digging into this.
@TheDoorNextBoy and @prashantbankar. We've released SDK version 5.4.7 with a fix for this crash. Can you update and let me know if you're still having any issues?
Thanks!
@CaseyApptentive Thanks for your fast response, But I am really disappointed about your "fix".
} catch (Exception e) {
- ApptentiveLog.e(e, "Exception in %s.onCreate()", ApptentiveViewActivity.class.getSimpleName());
+ ApptentiveLog.e(e, "Exception in %s.onCreate(). Finishing activity...", ApptentiveViewActivity.class.getSimpleName());
logException(e);
+ finish();
}
Just catching everything and finishing can not be a solution. I'd rather have the App crash and know about it than having unexpected behaviour and bad reviews. I understand that there is maybe not enough information at the moment to properly fix it. But if you would not use those generic catches I could have sent you better logs in the first place.
Please let me know if you plan another update. Thanks
@TheDoorNextBoy, we understand your frustration but cannot reproduce the bug on any configuration (Gradle Plugin/Wrapper version, legacy Android Studio, different app themes). We released a fix to prevent devices from crashing and continued investigating. There will be no unexpected behaviour: if the problem persists - the users won't be able to see Love Dialog.
It would be really helpful if you can provide the content of your app and project level build.gradle
files (we need to know your dependencies and Gradle Plugin/Wrapper versions) and your styling files (what theme you use and how you configure it). Hope, this makes it more clear and sorry for the inconvenience.
Hi @weeeBox, Sorry for my late reply. I was a bit busy the last days. We will release a new version with 5.4.7 in a few days as soon as QA approves.
Actually our theme could really be an issue.
Our parent theme is Theme.MaterialComponents.Light.NoActionBar.Bridge
from
implementation 'com.google.android.material:material:1.0.0'
Maybe you could check it. If I find some time today I'll try another one.
We are using the following androidx libraries:
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core:1.1.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
Our gradle version is gradle-5.4.1
Hi @TheDoorNextBoy, we need to create an app with the very same dependencies, Gradle plugin/wrapper versions and styling as your app in order for being able to reproduce the issue. Would you be able to provide these?
Hi, I do get the following crash report
I assume this can happen when something else crashes in onCreate before addFragmentToAdapter() is called. The generic catch should be removed there to find the real issue. A null check in onSaveInstance state could be a quick fix.
Edit: version is 5.3.1