{"record":{"id":"4283a1364165a4ad","repo":"SnapDrop/snapdrop","slug":"permission-error","errorCode":"PERMISSION_ERROR","errorMessage":"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.","messagePattern":"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\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/scripts/ui.js","lineNumber":634,"sourceCode":"    let loading = true;\n\n    function animate() {\n        if (loading || step % dw < dw - 5) {\n            requestAnimationFrame(function() {\n                drawCircles();\n                animate();\n            });\n        }\n    }\n    window.animateBackground = function(l) {\n        loading = l;\n        animate();\n    };\n    init();\n    animate();\n});\n\nNotifications.PERMISSION_ERROR = `\nNotifications permission has been blocked\nas the user has dismissed the permission prompt several times.\nThis can be reset in Page Info\nwhich can be accessed by clicking the lock icon next to the URL.`;\n\ndocument.body.onclick = e => { // safari hack to fix audio\n    document.body.onclick = null;\n    if (!(/.*Version.*Safari.*/.test(navigator.userAgent))) return;\n    blop.play();\n}\n","sourceCodeStart":616,"sourceCodeEnd":645,"githubUrl":"https://github.com/SnapDrop/snapdrop/blob/b8b78cc22a672fd7c442f5a4866a8d9b0c05362e/client/scripts/ui.js#L616-L645","documentation":"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.","triggerScenarios":"Thrown at client/scripts/ui.js:634 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Detect err.name === 'NotAllowedError' (or permission 'denied') in _requestPermission and display this PERMISSION_ERROR text to the user","Tell the user to click the lock icon next to the URL, open Page Info, reset the Notifications permission, and retry","Direct the user to browser site-permission settings to re-enable notifications when the prompt is permanently dismissed","Hide or disable the notification button once permission is blocked so the flow fails gracefully"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b8b78cc22a672fd7c442f5a4866a8d9b0c05362e","analyzedAt":"2026-09-02T16:11:56.727Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}