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

Temporary fix for notification permission checker #1325

Merged

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Aug 31, 2023

Description

This includes a temporary fix for https://a8c.sentry.io/share/issue/a00791f201394715be1cdffda7814fda/

Warning
Targets release/7.46

Testing Instructions

I have not been able to reproduce the issue. I have converted notificationPermissionChecker to be nullable, and attempted notify(...) even when notificationPermissionChecker is null to bring back the original implementation. I have also added logs to Sentry and LogBuffer if it still fails.

@ashiagr ashiagr requested a review from a team as a code owner August 31, 2023 12:02
Copy link
Contributor

@mchowning mchowning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. I made a small tweak so I'll approve but hold off on merging until you can take a look.

The change I made was just to make it clearer that the ?: is responding to the notificationPermissionChecker being null and not to the checkNotificationPermission function returning null (what you had was totally fine, I just found this easier to read). Then I added a log message and a Sentry breadcrumb if the notificationPermissionChecker is null. Since that means we're in some unexpected state I thought the extra logging would be nice. You can see what the breadcrumb looks like here.

image

* ignore the RuntimeException: breadcrumb test exception line, I just hardcoded that exception to see what the breadcrumb (shown on the next line) would look like in Sentry.

Comment on lines +1728 to +1729
LogBuffer.e(LogBuffer.TAG_PLAYBACK, message)
SentryHelper.recordException(message, e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the extra logging you've added here. 👍

@ashiagr
Copy link
Contributor Author

ashiagr commented Sep 2, 2023

Thanks for the extra logging, it looks fine to me. 👍

@ashiagr ashiagr merged commit 5d936d0 into release/7.46 Sep 2, 2023
@ashiagr ashiagr deleted the fix/notification-permission-chcker-init-exception branch September 2, 2023 05:56
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

Successfully merging this pull request may close these issues.

2 participants