Javascript error on preview when cookies disabled

Bugs will be moved here once resolved.

Post » Wed Dec 16, 2015 12:59 pm

Problem Description
If the LocalStorage plugin is part of your project and cookies are disabled in Firefox 43.0 (x86/x64) and onwards then C2 will throw a javascript error on preview. The error can be acknowledged and the preview will then work.

This was reported to Mozilla back in 2012 and is still being shown as a new bug in Bugzilla.

Attach a Capx

Description of Capx
This is just an empty .capx that has the LocalStorage plugin as part of the project.

Steps to Reproduce Bug

    Load .capx in FF 43.0 or newer
    Go to Options/Privacy/ 'History' change Firefox dropdown to 'Use custom settings for history'
    remove tick from 'Accept cookies from sites'
    run preview - javascript error
    Put tick back in the 'Accept cookies from sites' Privacy option
    run preview - no javascript error

Observed Result

Code: Select all
Javascript error!
SecurityError: The operation is insecure., line 40 (col 0)

Followed by an assertion error.

Expected Result
No error

Affected Browsers
  • Chrome: (NO)
  • FireFox: (YES)
  • Internet Explorer: (NO)

Operating System and Service Pack
Windows 7 Pro x64 SP1

Construct 2 Version ID
r 218
If your vision so exceeds your ability, then look to something closer.
Posts: 5,809
Reputation: 62,212

Post » Wed Dec 16, 2015 5:23 pm

Should be fixed in the next build. Because of the way Firefox handles this, in this case every attempt to access local storage will simply trigger "on error". At least it avoids the game crashing.
Scirra Founder
Posts: 25,082
Reputation: 199,732

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest