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

#1823 Get the push-notification working again #1828

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions frontend/model/contracts/shared/nativeNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ export async function requestNotificationPermission (force: boolean = false): Pr
}
}

// TODO FIXME: TEMPORARILY DISABLED AS IT CAUSES AN ERROR DURING THE TESTS
if (isNaN(1) && Notification.permission === 'granted') {
if (Notification.permission === 'granted') {
await sbp('service-worker/setup-push-subscription').catch((e) => {
// TODO: Temporary until this is better addressed. When running tests,
// it results in an AbortError.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, just removing that isNaN(1) made it start working again, and I didn't encounter any AbortError kind of error message while seeing it was running okay. My guess is that probably the similar issue was sorted out a while ago but then that fix didn't get merged to e2e-protocol branch and went to master instead.

console.error('Error setting up service worker', e)
})
}
Expand Down
Loading