C2 Javascript error on Firefox 42.0

For developers using the Construct 2 Javascript SDK

Post » Sun Nov 15, 2015 9:05 am

Not sure where to post this, but it needs a javascript gurus eye, so........

When recently updated FF to 42.0 (also latest Nightly build), C2 throws an error every time I tried to run preview in C2.

Image

The error is in 'preview_prelude.js' line 189:
Code: Select all
watch = JSON.parse(localStorage.getItem("__c2_watch") || "{}");


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

Rolling back to previous version of FireFox gets rid of error.

Anyone have any ideas?

Using r217, but tried r216 and same problem. Considering that the datestamp on 'preview_prelude.js' is 26 Feb 2015, then it's obvious that this hasn't changed.

*Edit*

Ok. It's cookie related.

I have always had cookies 'unticked' in firefox, and only allow those that I deem acceptable. This is now causing a problem with FF.

If I allow all cookies, then the error is gone. Not cool.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Sun Nov 15, 2015 9:13 am

R217 or r216? If it's the former then it might be associated with the NW.js save problem - there's nothing in the changelog about a local storage update in the beta though.... I'm not a JavaScript guru, however...
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,193

Post » Sun Nov 15, 2015 10:41 am

Good point. Should really add more relevant info :/

Edited OP.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630

Post » Mon Nov 16, 2015 11:32 am

So it sounds like if you disable cookies in Firefox, accessing storage throws exceptions. (I don't know why they'd do that - returning empty results would be easier to support!) That line is the debugger trying to load from storage which items you added to the watch, which throws an exception. Post it to the bugs forum and I can try and make storage exception-proof.
Scirra Founder
B
387
S
230
G
88
Posts: 24,251
Reputation: 192,454

Post » Mon Nov 16, 2015 12:39 pm

Will do, Ashley.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
131
S
29
G
81
Posts: 5,328
Reputation: 56,630


Return to Javascript SDK

Who is online

Users browsing this forum: rexrainbow and 1 guest