-
Notifications
You must be signed in to change notification settings - Fork 74
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
[Crash][Push Primer]Crash in Android 13 when prompting push push primer #393
[Crash][Push Primer]Crash in Android 13 when prompting push push primer #393
Comments
Hey @naveenchandan, Can you confirm are you calling RCA -
More info regarding initialising CleverTap SDK can be found here |
Hey @william-ct ,Thanks for you reply... And yes we are calling |
Hey @PiyushSinha-PS @naveenchandan
Ok. Thanks One more thing, can you move |
Hey, we can't try/check from our side, the issue is happening in the production and we are not able to reproduce it on Dev environment |
@PiyushSinha-PS Can you confirm in your code where have you called |
In OrderActivity onCreate.. |
@PiyushSinha-PS You will have to call |
Sure we are sending the hotfix and we are doing this change in hotfix.I will keep you update |
@william-ct we are facing the same crash in different place. Please check this on priority.
|
@naveenchandan Did you move |
How it will fix this crash by moving to onResume?, how can activity be null if we are calling |
@naveenchandan Can you let us know whether this crash is also happening when you moved the methods inside onResume()? If it's a bug we need to understand the root cause hence checking with you |
@william-ct will try this in our next app release and will update the status here after release. |
@naveenchandan Can you test it in your development build of your app and confirm whether it crashes with the same exception before releasing it in production? |
@william-ct We are facing the same on React Native prod app, Can you please help us out here as well? |
@Shanie1331 Can you explain in detail which push primer API are you using and also share the entire stack trace of the crash? |
@william-ct This happened when the application is not running at all and the user gets a notification. Clevertap is throwing this exception on background task and android 13 (where apiLevel is 33) reporting it as a crash on our logs. We are using "clevertap-react-native": "1.0.0" npm package Here is the stack trace
|
@Shanie1331 Can you explain in more detail how did you integrate the push primer in your app and from where you called
Can you explain the use case as to how did you integrate the above pushPermission() flow? |
@william-ct Use case: get notification permission for android>=13
@william-ct Can you suggest any documentation from clevertap how and where to integrate |
@satishbonam You can use the |
@william-ct we are using the |
@william-ct any update or progress on this issue? |
@satishbonam The crash is occurring because we require an activity instance of the app in order to show the push permission dialog. To obtain this instance, we use The To use this approach in your React Native component or Android activity, you should call In React Native, the equivalent of |
@PiyushSinha-PS Thankyou for detailed explanation. Please update react-native cleveratap documentation accordingly. |
This is happening in react native sdk as well Fatal Exception: java.lang.NullPointerException: |
Hi @AnkitM-Liv Please answer the following questions:
|
CoreMetaData.getCurrentActivity is is giving null value
We are using clevertap-react-native : 1.0.2 |
Describe the bug
Crash with push primer reported in Firebase
To Reproduce
Steps to reproduce the behavior:
Expected behavior
App should not crash when prompting push primer.
Screenshots/Logs
Environment (please complete the following information):
Additional context
Crash is happening when we prompting push primer dialog in Android 13, seems like crash is happening inside the class InAppController,
boolean shouldShowRequestPermissionRationale = ActivityCompat.shouldShowRequestPermissionRationale(
Objects.requireNonNull(CoreMetaData.getCurrentActivity()),
ANDROID_PERMISSION_STRING);
The text was updated successfully, but these errors were encountered: