smartlook / smartlook-android-sdk

5 stars 1 forks source link

Crash - Could not use library on Nexus 5 (6.0.1) #2

Closed DemonGyro closed 5 years ago

DemonGyro commented 6 years ago

Model: Nexus 5 OS Version: 6.0.1 Build Number: M4B30Z

Disabling this functionality allows the app to start:

Smartlook.init(getSmartlookKey(), true);
Smartlook.enableCrashlytics(true);
Smartlook.identify("", null);

Here is the crash log:

E/CrashlyticsCore: Failed to execute task.
    java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(FutureTask.java:177)
        at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
        at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:320)
        at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:300)
        at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
        at com.smartlook.sdk.smartlook.a.a.b.uncaughtException(SourceFile:42)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
E/UncaughtException: java.lang.RuntimeException: Unable to start activity ComponentInfo{<REDACTED>}: java.lang.RuntimeException: Window couldn't find content container view
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.RuntimeException: Window couldn't find content container view
        at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:3915)
        at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:3981)
        at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:1969)
        at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:374)
        at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)
        at android.support.v7.app.AppCompatDelegateImplV9.onPostCreate(AppCompatDelegateImplV9.java:170)
        at android.support.v7.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:97)
        at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1188)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2398)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
        at android.app.ActivityThread.-wrap11(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5417) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.farmlead.farmlead, PID: 12398
    java.lang.RuntimeException: Unable to start activity ComponentInfo{<REDACTED>}: java.lang.RuntimeException: Window couldn't find content container view
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5417)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
     Caused by: java.lang.RuntimeException: Window couldn't find content container view
        at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:3915)
        at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:3981)
        at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:1969)
        at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:374)
        at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)
        at android.support.v7.app.AppCompatDelegateImplV9.onPostCreate(AppCompatDelegateImplV9.java:170)
        at android.support.v7.app.AppCompatActivity.onPostCreate(AppCompatActivity.java:97)
        at android.app.Instrumentation.callActivityOnPostCreate(Instrumentation.java:1188)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2398)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
        at android.app.ActivityThread.-wrap11(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:148) 
        at android.app.ActivityThread.main(ActivityThread.java:5417) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
adamblack commented 6 years ago

Hi @DemonGyro ,

thank you for using Smartlook!

Since the log is very general and I am unable to find the cause right away, would it be possible to give me more details, please?

Line: at com.smartlook.sdk.smartlook.a.a.b.uncaughtException(SourceFile:42) in your log is ok and it should actually be listed (in case there is a crash), however I cannot find any other direct contact of the SDK with the app.

When/Where (i.e. Application or Activity class + method) do you invoke:

Smartlook.init(getSmartlookKey(), true); Smartlook.enableCrashlytics(true); Smartlook.identify("", null);

?

Also, when you keep just: Smartlook.init(getSmartlookKey(), true);, is SDK working or do you see the same issue? Did you also try to call non-experimental version: Smartlook.init(getSmartlookKey(), false);?

Thank you for any information that might help us to resolve the issue. :]

DemonGyro commented 6 years ago

I invoke init and the other functions in the order listed in my MultiDexApplication class onCreate method, after calling setTheme(...) and super.onCreate().

I followed your suggestion and if I don't do anything but init, it seems to work fine. With init and the other options, it crashes every time (doesn't matter if its true or false for init).

DemonGyro commented 6 years ago

It will occasionally crash even with just init with the same error.

adamblack commented 6 years ago

Thanks @DemonGyro ,

we will get back to you ASAP.

adamblack commented 5 years ago

@DemonGyro , could you give me your e-mail address so I can send you instructions for debug build? That should give us enough info. Or feel free to contact me at adam@smartlook.com

Thanks!

lbagga2x commented 5 years ago

Hey @adamblack, @DemonGyro is on vacation. You can send me the instructions at lbagga.dev@gmail.com

lgengsy commented 5 years ago

I got this err too

adamblack commented 5 years ago

Hi @lgengsy ,

could you give me SDK version you are using + trace, please?

lgengsy commented 5 years ago

thks i slove it ,it's mine err

1wayticket commented 5 years ago

thks i slove it ,it's mine err

I have the same error in my project--Window couldn't find content container view,can you share your experience about solution? thanks a lot.

stan-osipov commented 4 years ago

I do have a similar issue with other plugins. If you guys can share an issue of what exactly caused it, it would be really nice.

adamblack commented 4 years ago

Hi @stan-osipov ,

I am little bit confused, how is your message connected to Smartlook SDK? :O