Javascript error on preview when cookies disabled

  • 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

    https://dl.dropboxusercontent.com/u/34306693/bouncyplatform.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

    Javascript error!
    SecurityError: The operation is insecure.
    

    192.168.0.6/LocalStorage_plugin.js, line 40 (col 0)[/code:1xhk18zo][/p] [/p] Followed by an assertion error.[/p] [/p] [b]Expected Result[/b][/p] No error[/p] [/p] [b]Affected Browsers[/b][/p] [ul][/p] [li] Chrome: (NO)[/p] [/li][li] FireFox: (YES)[/p] [/li][li] Internet Explorer: (NO)[/li][/ul][/p] [/p] [b]Operating System and Service Pack[/b][/p] Windows 7 Pro x64 SP1[/p] [/p] [b]Construct 2 Version ID[/b][/p] r 218

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)