Handle push-notification.js being blocked by ad blocker
- Dominant language
- C#
- Stars
- 6
- Forks
- 2
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 4
Description
uBlock Origin's EasyList/Annoyances/Notifications blocks `/push-notifications.js`, causing its functions to be unavailable to the Blazor code.
We should show a warning when this happens.
## Firefox DevTools Log:
```cs
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'subscribeToPushNotifications' ('subscribeToPushNotifications' was undefined).
findFunction/<@https://start.alb1.hu/_framework/blazor.web.js:1:734
findFunction@https://start.alb1.hu/_framework/blazor.web.js:1:702
b@https://start.alb1.hu/_framework/blazor.web.js:1:5445
beginInvokeJSFromDotNet/i<@https://start.alb1.hu/_framework/blazor.web.js:1:3238
beginInvokeJSFromDotNet@https://start.alb1.hu/_framework/blazor.web.js:1:3201
oi@https://start.alb1.hu/_framework/blazor.web.js:1:165225
Tld__16`1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at StartSch.Wasm.Components.PushSubscriptionManager.Subscribe()
at StartSch.Wasm.Components.InteractivePreferencesFormFields.UpdatePushSubscription()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task , ComponentState )
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing PushSubscriptionManager.Subscribe and InteractivePreferencesFormFields.UpdatePushSubscription, then inspect how the blocked push-notifications.js functions are invoked through JavaScript interop. The change is complete when a missing subscribeToPushNotifications function produces a user-facing warning instead of an unhandled rendering exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100