eclipse-paho / eclipse-paho/paho.mqtt.javascript

access denied error thrown when cookies disabled

Open
#240 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

**Environment:**
Chrome browser on MacOS

**Reproduce Steps**

1. In incognito window mode of chrome browser
2. toggle "disable cookies" button
3. try loading the script , it fails accessing localStorage since the localStorage property exists but access is restricted

the handling in the current code is checking if property exists instead it should gracefully handle it by catching the exception and polyfill it.

**Error**
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.