I think I "broke" my Local Storage...

Discussion and feedback on Construct 2

Post » Sun Jan 24, 2016 4:06 pm

My online app has been coming along well but today I added a button to reset Local Storage and now I can't seem to access it anymore. (At least when previewing with LocalHost.) I may have caused the problem by clearing storage and then immediately trying to save to it. (Unfortunately, I didn't find the "On Storage Cleared" condition until later.)

When I look at Local Storage in the debugger I see "(loading...)" in both the Key and Value fields. Pressing the Reset button has no effect. I tried doing a Reset in my "Start of layout" event. That didn't help either, nor did rebooting my computer.

I found out how to manually delete my Local Storage (using "F12" in Google and going to the Resources tab) and it was instantly removed, but my game still seems to think the data is there and is locked up trying to load it.

Any suggestions on how to fix this?
B
11
S
3
Posts: 79
Reputation: 854

Post » Sun Jan 24, 2016 4:42 pm

No idea, but does it work in other browsers? (To tell if it is indeed the local storage, or maybe a hang up in the code.)

Did you try making a new name for what you are storing, and abandon the original?

Um, anybody else have something to try to dig up more clues?
B
226
S
60
G
33
Posts: 902
Reputation: 39,975

Post » Sun Jan 24, 2016 5:14 pm

Thanks, Paradox. Tried renaming the app but that didn't work. In fact, I tried loading a version from a week ago and that isn't working now either.

Went into Preferences and changed the Preview Browser to "Edge" but it's still using Google. (Finally got "Edge" working from the Project Properties. That's kind of confusing...)

My Local Storage is fixed in "Edge"! Unfortunately, that browser doesn't support Speech Synthesis or Recognition... which I need. Downloading Firefox. Man, I hope I'm not locked out of Google for my previews. Seems like it's not going to work for *any* app or game I try to create... (Would uninstalling Chrome and re-installing it help? Guess there's one way to find out...)
B
11
S
3
Posts: 79
Reputation: 854

Post » Sun Jan 24, 2016 7:48 pm

Well, Local Storage is working fine in Edge and Firefox, but still broken in Chrome. Unfortunately, those other two browsers don't support speech recognition OR speech synthesis... and I need those for my app so I have to get Chrome working again.

Will try uninstalling Chrome and reinstalling it. Hopefully, that will work. :-)

UPDATE: Reinstalling Chrome was a failure. And to make matters worse Chrome is now ignoring the voice I picked for speech synthesis. It's trying to use an American voice for all my French words and phrases. (That feature has been working perfectly since day one -- not sure what changed.)

I've been working on this app night and day for two solid weeks and I was just wrapping up the last few details today. Instead of taking a few small steps across the finish line I've taken two HUGE steps backward. Kind of frustrated at the moment...

I'm pretty sure this is only a problem on MY computer, but here's my .capx file:
http://jmcdesign.orgfree.com/BuggedStorage.capx
B
11
S
3
Posts: 79
Reputation: 854

Post » Mon Jan 25, 2016 12:05 am

Hi... in event 60 in the MyOptions group you're setting three localstorage values every tick. Apparently Chrome doesn't like you writing to localstorage 180 times a second :)
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Mon Jan 25, 2016 12:23 am

I apparently changed something and lost the event! Thanks for catching that ramones! It doesn't seem to be in perpetual "loading..." mode now! Will have to look at it some more tomorrow.
B
11
S
3
Posts: 79
Reputation: 854


Return to Construct 2 General

Who is online

Users browsing this forum: Colludium and 5 guests