Javascript error on preview when cookies disabled

Bugs will be moved here once resolved.

Post » Mon Nov 16, 2015 1:19 pm

Problem Description
If cookies are disabled in Firefox 42.0 and onwards - even the latest nightly builds - then C2 will throw a javascript error on preview. The error can be acknowledged and the preview will then work.

Attach a Capx
https://dl.dropboxusercontent.com/u/343 ... tform.capx

Description of Capx
This is just a .capx - not relevant, as any .capx would throw an error.

Steps to Reproduce Bug
  • Load .capx in FF 42.0 or newer
  • Go to Privacy settings in Options and 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
You receive the following error:
Image
This refers to the following in 'preview_prelude.js':
Code: Select all
watch = JSON.parse(localStorage.getItem("__c2_watch") || "{}");


REMming the line allows FF to preview without the security error.

Expected Result
No error.

Affected Browsers
  • Chrome: (NO)
  • FireFox: (YES - 42.0 and newer)
  • Internet Explorer: (NO)

Operating System and Service Pack
Windows 7 Pro SP1

Construct 2 Version ID
r217. Version has no relevance as 'preview_prelude.js' hasn't changed since Feb 2015.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Post » Mon Nov 16, 2015 8:04 pm

I've seen this error before in Firefox mobile:
r167-2-webstorage-issue-in-firefox-on-mobile-android_t101856
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Mon Nov 16, 2015 8:31 pm

ramones wrote:I've seen this error before in Firefox mobile:
r167-2-webstorage-issue-in-firefox-on-mobile-android_t101856


Ashley asked me to post this here to remind him.
He is going to try and make this
...storage exception-proof.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Post » Mon Nov 16, 2015 9:05 pm

Does local storage work if you add the address to the cookies exceptions list?
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Mon Nov 16, 2015 9:16 pm

I've always used the exception list - I like to be the one in control.

It just seems that firefox now no longer takes note of the exception list for this case but just checks for the tick in 'Allow cookies'.

This wasn't the case prior to release 42.0 and onwards.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Post » Tue Nov 24, 2015 3:28 pm

I don't see a "Accept cookies from sites" checkbox in Firefox's privacy settings: https://dl.dropboxusercontent.com/u/15217362/firefoxprivacy.png

Are you using an extension that adds it?
Scirra Founder
B
399
S
236
G
89
Posts: 24,530
Reputation: 195,402

Post » Tue Nov 24, 2015 3:36 pm

Ashley wrote:I don't see a "Accept cookies from sites" checkbox in Firefox's privacy settings: https://dl.dropboxusercontent.com/u/15217362/firefoxprivacy.png

Are you using an extension that adds it?


Your settings show the default option of 'Remember History'. It needs to be changed to 'Use Custome settings for history' - https://support.mozilla.org/en-US/kb/settings-privacy-browsing-history-do-not-track
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Post » Tue Nov 24, 2015 4:57 pm

Ah, got it. It's stupid that Firefox throws exceptions there, it will break lots of sites when it could just pretend it worked and then throw away the storage. Anyway, I've exception-proofed the storage for the next build.
Scirra Founder
B
399
S
236
G
89
Posts: 24,530
Reputation: 195,402

Post » Wed Nov 25, 2015 3:01 pm

@Ashley

Many, many thanks. Latest r218 beta works a treat.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Post » Wed Dec 16, 2015 12:11 pm

@Ashley

Firefox 43.0 64/32-bit is now throwing a localstorage error - stupid Mozilla!

Code: Select all
Javascript error!
SecurityError: The operation is insecure.
http://192.168.0.6:50000/LocalStorage_plugin.js, line 40 (col 0)


This seems to be ongoing since at lease 2012 http://meyerweb.com/eric/thoughts/2012/04/25/firefox-failing-localstorage/.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,490
Reputation: 59,766

Next

Return to Closed bugs

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests