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

Crash on startup due to notifications check #27982

Closed
SergeyZhukovsky opened this issue Jan 23, 2023 · 2 comments · Fixed by brave/brave-core#16807
Closed

Crash on startup due to notifications check #27982

SergeyZhukovsky opened this issue Jan 23, 2023 · 2 comments · Fixed by brave/brave-core#16807
Assignees
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Test-All-Platforms QA/Yes release-notes/include

Comments

@SergeyZhukovsky
Copy link
Member

SergeyZhukovsky commented Jan 23, 2023

Details are here https://community.brave.com/t/mobile-app-crash-on-start-up-since-1-47-175/464048/18
It looks like some users don't have an ads notification channel group created and we try to access it on app start without checking on its existence. Not sure how to replicate this, but a simple check would be just to make sure app starts without any problems.

Crash stack:

01-23 03:04:12.497 19252 19252 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean android.app.NotificationChannelGroup.isBlocked()’ on a null object reference
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.notifications.BravePermissionUtils.channeGroupIsBlocked(BravePermissionUtils.java:65)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.notifications.BravePermissionUtils.isBraveAdsNotificationPermissionBlocked(BravePermissionUtils.java:72)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.notifications.BraveNotificationWarningDialog.shouldShowRewardWarningDialog(BraveNotificationWarningDialog.java:94)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.notifications.BraveNotificationWarningDialog.shouldShowNotificationWarningDialog(BraveNotificationWarningDialog.java:86)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.app.BraveActivity.checkAndshowNotificationWarningDialog(BraveActivity.java:1258)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.app.BraveActivity.finishNativeInitialization(BraveActivity.java:872)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.chrome.browser.ChromeTabbedActivity.finishNativeInitialization(ChromeTabbedActivity.java:1037)
01-23 03:04:12.498 19252 19252 W System.err: at org.chromium.base.CallbackController$CancelableRunnable.run(CallbackController.java:130)
01-23 03:04:12.498 19252 19252 W System.err: at android.os.MessageQueue.nativePollOnce(Native Method)
01-23 03:04:12.498 19252 19252 W System.err: at android.os.MessageQueue.next(MessageQueue.java:335)
01-23 03:04:12.498 19252 19252 W System.err: at android.os.Looper.loop(Looper.java:206)
01-23 03:04:12.498 19252 19252 W System.err: at android.app.ActivityThread.main(ActivityThread.java:7843)
01-23 03:04:12.498 19252 19252 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-23 03:04:12.498 19252 19252 W System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
01-23 03:04:12.498 19252 19252 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
01-23 03:04:12.499 19252 19252 F chromium: [FATAL:jni_android.cc(315)] Please include Java exception stack in crash report
01-23 03:04:12.500 0 0 F KERNEL : [111144.139550] Unhandled debug exception: aarch32 BKPT (0xe0000000) at 0x00000000b91ed004
01-23 03:04:12.606 19430 19430 E libc : Access denied finding property “vendor.audio.hal.boot.timeout.ms”
01-23 03:04:12.603 19430 19430 W linker : type=1400 audit(0.0:57439): avc: denied { read } for name=“u:object_r:vendor_audio_prop:s0” dev=“tmpfs” ino=17797 scontext=u:r:untrusted_app:s0:c188,c256,c512,c768 tcontext=u:object_r:vendor_audio_prop:s0 tclass=file permissive=0 app=com.brave.browser
01-23 03:04:12.673 19252 19252 F libc : Fatal signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0xb91ed004 in tid 19252 (m.brave.browser), pid 19252 (m.brave.browser)
@kjozwiak
Copy link
Member

kjozwiak commented Jan 24, 2023

@Uni-verse @srirambv this might be the issue that Google is experiencing regarding crashing on launch as per the earlier discussion on Slack. Can find the STR/Cases outlined via brave/brave-core#16807 (comment). Basically ensure that Brave doesn't crash on the third restart (without interacting with Playlist/Rewards nor any of the notification warning modals).

The above requires 1.47.182 or higher for 1.47.x verification 👍

@Uni-verse
Copy link
Contributor

Uni-verse commented Jan 24, 2023

Verified on Samsung GS 21 & Samsung Tab S7 using version(s):

Brave	1.47.182 Chromium: 109.0.5414.87 (Official Build) (64-bit) 
Revision	2dc18eb511c56e012081b4abc9e38c81c885f7d4-refs/branch-heads/5414@{#1241}
OS	Android 13; Build/TP1A.220624.014

(Tablet)

Brave	1.47.182 Chromium: 109.0.5414.87 (Official Build) (64-bit) 
Revision	2dc18eb511c56e012081b4abc9e38c81c885f7d4-refs/branch-heads/5414@{#1241}
OS	Android 12; Build/SP2A.220305.013
  • Ensured that brave does not crash when relaunching the browser many times on a fresh profile
  • Ensured notifications / warning modals are presented on fresh profile
Example Example Example
screenshot-1674575329083 screenshot-1674575907066 screenshot-1674577057654
screenshot-1674576493226 screenshot-1674576538226 screenshot-1674576995886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Test-All-Platforms QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants