What is this: Error in response to storage.get: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

Error in response to storage.get: SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at Object.eval [as callback] (eval at <anonymous> (chrome-extension://ddiblodcpaaieoopolanaoecbhicgjfo/content.js:1:5883), <anonymous>:60:337)
at eval (eval at <anonymous> (chrome-extension://ddiblodcpaaieoopolanaoecbhicgjfo/content.js:1:5883), <anonymous>:60:297)
at eval (eval at <anonymous> (chrome-extension://ddiblodcpaaieoopolanaoecbhicgjfo/content.js:1:5883), <anonymous>:60:866)
at eval (eval at <anonymous> (chrome-extension://ddiblodcpaaieoopolanaoecbhicgjfo/content.js:1:5883), <anonymous>:60:15850)
at chrome-extension://ddiblodcpaaieoopolanaoecbhicgjfo/content.js:1:5878

Open in new window

LVL 5
Tom KnowltonWeb developerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OriNetworksCommented:
Temporarily you may want to enable third party cookies for this to work although I'm not sure this would be the best solution in your case. chrome://settings enter third-party in the search box, click content settings, UNcheck "Block third party..."

If this is something you are developing I would recommend adding permissions in your manifest.json for storage to prevent users of your extension from encountering the same problem.
Tom KnowltonWeb developerAuthor Commented:
The error only shows up in the F12 developer tools (which displays javascript errors).

It happens when I try to run a program I am writing in JavaScript -- but nothing in the JavaScript explains this problem.

I am not developing or using any extensions.

I've removed all superfluous extensions.  Still the error.

I'll consider enabling the third party stuff.


Where do I find the manifest.json file?
Tom KnowltonWeb developerAuthor Commented:
screenshot of my F12 dev tools when this error occurs:
unition

This error is happening when I run the following code (just an HTML page with embedded JavaScript) for some HTML5 canvas drawing I am learning how to do:

<!DOCTYPE html>
<html>
  <head>
  <title></title>
    <style type="text/css">
      body {
        margin: 0px;
        padding: 0px;
      }
    </style>
  </head>
  <body>
    <canvas id="myCanvas" width="578" height="400"></canvas>
    <script type="text/javascript">

        var i = 0;
        var canvas = document.getElementById('myCanvas');
        var context = canvas.getContext('2d'); 

        var one = {
            x: 300,
            y: 300,
            color: '#aff',
            useletter: 'G'
        };

        var two = {
            x: 120,
            y: 120,
            color: '#eee',
            useletter: 'T'
        };   

        _myCircleArray = [one,two];

        window.requestAnimFrame = (function (callback) {
            return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
        function (callback) {
            window.setTimeout(callback, 1000 / 60);
        };
        })();

    function drawTextBubble(myCircle, context) {    
//            radius: 50,
//            startAngle: 0,
//            endAngle: Math.PI * 2,
//            counterClockwise: false,       
//            
            context.beginPath();
            context.arc(myCircle.x, myCircle.y, 50, 0, Math.PI * 2, false);
            context.fillStyle = myCircle.color;
            context.fill();             
            context.strokeStyle = '#000';
            context.stroke();

            context.beginPath();
            context.fillStyle = '#000';
            context.fill();
            context.font = "40px Georgia";
            context.fillText(myCircle.useletter, myCircle.x - 10, myCircle.y + 10);
            context.strokeStyle = '#000';
            context.stroke();

            context.beginPath();
            context.fillStyle = '#000';
            context.fill();
            context.font = "40px Georgia";
            context.fillText('n', myCircle.x + 50, myCircle.y + 50);
            context.strokeStyle = '#000';
            context.stroke();                    
        }

       

        function animate(canvas, context, startTime) {
            var time = (new Date()).getTime() - startTime;
            context.clearRect(0, 0, canvas.width, canvas.height); // only clear once
            for (var a = 0; a < _myCircleArray.length; a++) {
                var myCircle = _myCircleArray[a];
                var amplitude = 150;
                var period = 3000;
                var centerX = (canvas.width / 2) - ((myCircle.radius * 2) / 2);
                var nextX = amplitude * Math.sin(time * 2 * Math.PI / period) + centerX;
                myCircle.x = nextX;
                drawTextBubble(myCircle, context);            
            }
            requestAnimFrame(function () {
                animate(canvas, context, startTime);
            });
        }

        // wait one second before starting animation
        setTimeout(function () {
            var startTime = (new Date()).getTime();
            animate(canvas, context, startTime);
        }, 1000);       

    </script>
  </body>
</html> 

Open in new window

Webinar: Cyber Crime Becomes Big Business

The rising threat of malware-as-a-service is not one to be overlooked. Malware-as-a-service is growing and easily purchased from a full-service cyber-criminal store in a “Virus Depot” fashion. Join us in our upcoming webinar as we discuss how to best defend against these attacks!

OriNetworksCommented:
A third-party extension exists in your browser that is causing this rather than your code. Try disabling extensions then try again.

The access denied message is related to third party cookies as a result of the extension. Since you are not the extension developer, you will not have that manifest.json file anyway.
Tom KnowltonWeb developerAuthor Commented:
Are 3rd party extensions able to just install themselves without my permission?

This is always happening to me at home and at work.

I want the browser to always ask me before installing 3rd party extensions.
Tom KnowltonWeb developerAuthor Commented:
I removed ALL of my extensions...I still have the problem.  : (

What is unition.org?
COBOLdinosaurCommented:
unition.org looks like it is malware based on what I see here:

https://productforums.google.com/forum/#!msg/chrome/ATlclZczEjY/n_e7yiOYqYcJ

Looks like something new; I have not see it before.

Cd&
lenamtlCommented:
This is  a browser setting.

In chrome :
Under Settings > Privacy > Content settings
change the cookies settings to "Allow local data to be set"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tom KnowltonWeb developerAuthor Commented:
Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.