DOMException: Failed to read the 'localstorage'

  • Hi there,

    I am getting the following console error when viewing a tour with chrome dev tools open:

    Code
    Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    https://d8d913s460fub.cloudfront.net/krpanocloud/webvr_localstorage.html?v=4:1:167

    You can see our tours here

    I am currently using 1.19-pr16, have been creating tours for a couple of years and do not recall seeing this error before. FWIW, some older tours may have used pr14, 6, 5 or 4...

    Could it be a browser update? I am running Chrome 71.0.3578.98

    Hopefully someone can point me in the right direction.

    Many thanks,
    Olly

  • Hi,

    I can't reproduce that with a Chrome with default settings...

    That message should only come when 'third pary site data' is disabled in Chrome like shown here:
    https://www.chromium.org/for-testers/bu…r-this-document

    The reason here is the 'global localstorage trick' that the webvr plugin is using to store the 'MobileVR settings' across several pages. That means when you change and save the VR settings in any krpano pano (yours or the one from anyone else), the new settings will be available also in all other krpano pano - but only in the same browser and device - the information itself is only stored locally in the browsers localstorage memory.

    Basically that message could be ignored, it will cause no problem, only the cross-page-shareing of the WebVR setting will not work, but if you want to avoid that message change in the webvr.xml this line:

    Code
    webvr.loadsettings();

    to this one:

    Code
    webvr.loadsettings('local');


    and this one:

    Code
    webvr.saveSettings();

    to this one:

    Code
    webvr.saveSettings('local');

    See also here for more information:
    https://krpano.com/plugins/webvr/#loadsettings

    Best regards,
    Klaus

  • Hi Klaus,

    Thank you for replying.

    I forgot to mention the error only shows when using the dev tools to emulate a mobile device. Is it anything to worry about in that context?

    Thanks,
    Olly

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!