SnapDrop/snapdrop · error

PERMISSION_ERROR

PERMISSION_ERROR

Error message

Notifications permission has been blocked as the user has dismissed the permission prompt several times. This can be reset in Page Info which can be accessed by clicking the lock icon next to the URL.

What it means

Error "Notifications permission has been blocked as the user has dismissed the permission prompt several times. This can be reset in Page Info which can be accessed by clicking the lock icon next to the URL." thrown in SnapDrop/snapdrop.

Source

Thrown at client/scripts/ui.js:634

    let loading = true;

    function animate() {
        if (loading || step % dw < dw - 5) {
            requestAnimationFrame(function() {
                drawCircles();
                animate();
            });
        }
    }
    window.animateBackground = function(l) {
        loading = l;
        animate();
    };
    init();
    animate();
});

Notifications.PERMISSION_ERROR = `
Notifications permission has been blocked
as the user has dismissed the permission prompt several times.
This can be reset in Page Info
which can be accessed by clicking the lock icon next to the URL.`;

document.body.onclick = e => { // safari hack to fix audio
    document.body.onclick = null;
    if (!(/.*Version.*Safari.*/.test(navigator.userAgent))) return;
    blop.play();
}

View on GitHub (pinned to b8b78cc22a)

Solutions

  1. Detect err.name === 'NotAllowedError' (or permission 'denied') in _requestPermission and display this PERMISSION_ERROR text to the user
  2. Tell the user to click the lock icon next to the URL, open Page Info, reset the Notifications permission, and retry
  3. Direct the user to browser site-permission settings to re-enable notifications when the prompt is permanently dismissed
  4. Hide or disable the notification button once permission is blocked so the flow fails gracefully
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at client/scripts/ui.js:634 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of SnapDrop/snapdrop@b8b78cc22a (2026-09-02). Data as JSON: /api/errors/4283a1364165a4ad. Report an issue: GitHub.