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

com.clevertap.android.sdk.InAppNotificationActivity - Window couldn't find content container view #220

Closed
ankit-g-rapido opened this issue Jan 17, 2022 · 12 comments
Assignees

Comments

@ankit-g-rapido
Copy link

Describe the bug
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rapido.passenger/com.clevertap.android.sdk.InAppNotificationActivity}: java.lang.RuntimeException: Window couldn't find content container view

To Reproduce
Steps to reproduce the behavior:
1 On Android 6
2 Sending an InAppNotification/Notification is causing this exception.

Expected behavior
Should have not given any exception or give error in the callback

Environment (please complete the following information):

  • Device: [Vivo Y53]
  • OS: [e.g. Android 6]
  • CleverTap SDK Version 4.4.0]
  • Android Studio Version
    This is trending crash on our app.
@root-ansh-ct
Copy link
Contributor

root-ansh-ct commented Jan 17, 2022

Hi @ankit-g-rapido, Can you provide a full stack trace for this exception from the said device?

@naveenchandan
Copy link

Hi @root-ansh-ct, please find the stack trace for the above crash.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rapido.passenger/com.clevertap.android.sdk.InAppNotificationActivity}: java.lang.RuntimeException: Window couldn't find content container view at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2492) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2552) at android.app.ActivityThread.access$1000(ActivityThread.java:166) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1399) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5541) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)

Caused by java.lang.RuntimeException: Window couldn't find content container view at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:4183) at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:4249) at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2054) at android.view.Window.findViewById(Window.java:1049) at android.app.Activity.findViewById(Activity.java:2106) at androidx.fragment.app.FragmentActivity$HostCallbacks.onFindViewById(FragmentActivity.java:772) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:525) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:276) at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112) at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1632) at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:455) at androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2389) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2145) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2083) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1985) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3119) at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3053) at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:473) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1244) at android.app.Activity.performStart(Activity.java:6325) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2455) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2552) at android.app.ActivityThread.access$1000(ActivityThread.java:166) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1399) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5541) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:853) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)

cc: @ankit-g-rapido

@ankit-g-rapido
Copy link
Author

@root-ansh-ct You can find the stack trace submitted by @naveenchandan. We are from same team. Facing this issue.

@root-ansh-ct
Copy link
Contributor

root-ansh-ct commented Jan 19, 2022

@naveenchandan can you please confirm whether these below functions are being called by the Application class of your app?

class MyApplication :Application() {

    override fun onCreate() {
        ActivityLifecycleCallback.register(this)
        super.onCreate()
        val defaultInstance = CleverTapAPI.getDefaultInstance(this)

@root-ansh-ct root-ansh-ct added the waiting waiting on person who opened the issue label Jan 21, 2022
@ankit-g-rapido
Copy link
Author

hey @root-ansh-ct
We did not call following block before super.onCreate()
ActivityLifecycleCallback.register(this)

And we for default Instance we are somewhere using Instance at Activity level and not Application level.

@root-ansh-ct
Copy link
Contributor

root-ansh-ct commented Jan 24, 2022

@ankit-g-rapido This is an essential function call for the proper working of in-app notifications. Can you please try adding this in your custom application class and internally check if this exception is still replicable?

@ankit-g-rapido
Copy link
Author

Thanks @root-ansh-ct for the quick response. We made the changes and will be observing any crashes. Thanks

@root-ansh-ct root-ansh-ct removed the waiting waiting on person who opened the issue label Jan 25, 2022
@Naveenchandan-GP
Copy link

Hi @root-ansh-ct , we made the changes mentioned above and released them but still, we are observing the crashes. Please check this on priority

@sachinsingh15
Copy link

@root-ansh-ct any updates on this?

@root-ansh-ct
Copy link
Contributor

@sachinsingh15 we are still looking into this issue and trying to reproduce this on our end. We will update here once we push the fixes . For now , you can stop sending the in-app notifications to android 6 or below to reduce the number of crashes for your app(s)

@mahendra-rapido
Copy link

@root-ansh-ct though isolating Android 6 & below users is a sure temporary solution, the Product & Marketing team won't accept this as it has a direct impact on the business.

This issue was reported by our team, first, on 17 Jan 2022 and it's over two months now. Two questions:

  1. What's your usual SLA?
  2. Do you've a tentative ETA for this?

Would really appreciate if this can be expedited!

Regards,
Mahendra Liya
Engineering Manager - Mobile

@darshanclevertap
Copy link
Collaborator

@mahendra-rapido

We understand that this is a temporary solution but it is not unreasonable as globally the percentage of users on Android 6 and below are approximately less than 5%.

We suggested this workaround to reduce the crashes for your app so that your overall App health is not affected. This is a tough crash to reproduce in the first place. There is very vague documentation on the internet for this particular crash as to why and how it occurs. We are still spending considerable resources to reproduce this on our end. But a proper solution cannot be formulated till we figure out what is causing this crash in the first place.

Regarding your question on SLA, Github issues do not have any inherent way of tracking SLAs. Hence issues that are high priority should ideally not be raised here. For urgent issues, you can raise a support ticket via the Dashboard and we have a proper SLA mechanism for those tickets. You can mention this Github issue in that ticket and we will expedite it on our end.

Thanks,
Darshan

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

7 participants