Meteor + Firefox + Cookie settings = SecurityError

I first noticed these symptoms last week, and had this in the back of my mind to track down. I deployed our Meteor app to an internal server last week, and started having problems with Firefox. Firefox is still my default browser (yes, I’ve heard ALL THE THINGS about Chrome, but I haven’t changed), so it was a little sad to discover that my app didn’t work. In particular, my first page ended up being completely blank because a JavaScript exception was being thrown and no rendering was taking place.

Looking into the JavaScript log, I found this error:

SecurityError? The operation is insecure? Wuh?

Making matters worse, my colleague seemed to have no problems using Firefox. But I was consistently reproducing the problem on two different work machines, and on my home machine.

Eventually tracked the root problem down: the issue is because of my default cookie settings:

I’m a total weirdo. I like to know who’s trying to set cookies on my browser, so I tell the browser to prompt me every time some new site tries to set a cookie. In the Meteor JavaScript, they store stuff in the browser session storage, which is like ubercookies. The first time Meteor tried to do this, Firefox decided to try to prompt me, but I guess that you can’t get to there from here, and so it threw a SecurityError instead.

Easy problem to solve once you know what’s going on, and I suspect that not many people configure their Firefox the way I do, so I don’t think it’s too big a deal. But I’m also pretty sure that there aren’t any web pages that describe this problem because I kinda searched.

Comments are closed.