leaguevine / leaguevine-ultistats

MIT License
18 stars 4 forks source link

Data isn't always sent back when memory usage becomes large on iPhone 3GS #98

Closed mliu7 closed 11 years ago

mliu7 commented 11 years ago

I took full stats for the sockeye half of this game:

https://www.leaguevine.com/games/84247/playbyplay

It worked just fine for a while, and then my iPhone said this app needs to use more than 10MB of memory and gave me a prompt to increase my memory. I said ok, but it seems that for some reason events were not sent back to the Leaguevine server ok... I am not exactly sure on the timing of when this memory error happened and when stats stopped being sent back, but I am guessing the two were related.

cboulay commented 11 years ago

Was it a warning for 5MB or 10MB? We can create the store with 10.1 MB so it asks you right away if you want to increase the memory, then either it will never work (good for debugging) or it will never prompt you again (in case that was the problem). assets/js/plugins/backbone.websqlajax.js Line 131

mliu7 commented 11 years ago

Hmm, I just reset my cache and data and everything and events are still not being sent back to the servers.

The warning was for 10mb.

Do you think I accidentally hit the wrong response and that's why it's not working anymore?

On Oct 25, 2012, at 11:16 PM, Chadwick Boulay notifications@github.com wrote:

Was it a warning for 5MB or 10MB? We can create the store with 10.1 MB so it asks you right away if you want to increase the memory, then either it will never work (good for debugging) or it will never prompt you again (in case that was the problem). assets/js/plugins/backbone.websqlajax.js Line 131

— Reply to this email directly or view it on GitHub.

cboulay commented 11 years ago

I'm surprised resetting your data didn't do it. Does safari mobile have a place to clear local storage or user data? Does it have an incognito mode? Worst case, you could edit the app to remove the model and collection definitions for store, update the manifest, then go to online-only mode. On Oct 27, 2012 2:18 AM, "Mark Liu" notifications@github.com wrote:

Hmm, I just reset my cache and data and everything and events are still not being sent back to the servers.

The warning was for 10mb.

Do you think I accidentally hit the wrong response and that's why it's not working anymore?

On Oct 25, 2012, at 11:16 PM, Chadwick Boulay notifications@github.com wrote:

Was it a warning for 5MB or 10MB? We can create the store with 10.1 MB so it asks you right away if you want to increase the memory, then either it will never work (good for debugging) or it will never prompt you again (in case that was the problem). assets/js/plugins/backbone.websqlajax.js Line 131

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/leaguevine/leaguevine-ultistats/issues/98#issuecomment-9820307.

mliu7 commented 11 years ago

Yeah, I'm surprised that didn't fix it too. The data was definitely reset, as the amount of user data associated with ultistats.leaguevine.com decreased to zero after doing it.

I couldn't run ultistats in private browsing mode for some reason either.

I downloaded Google Chrome for iPhone and ultistats works great right now for me.

Let me know if you can think of any things I can try on my phone that will help me diagnose why it's not working on safari. I feel like if I'm having these problems others might encounter them as well.

cboulay commented 11 years ago

Now that you reminded me it was called "private mode" I remember that I tried it before and it never worked. I think Safari's private mode completely blocks local storage, whereas Chrome's incognito mode is fully functional but in an anonymous sandbox that is purged when the window is closed.

If you brought your macbook with you, there should be a way to remotely debug it. You're on a 3GS which doesn't support a version of iOS with it built-in, so you'll have to use a third-party tool. http://www.iwebinspector.com/

While finding that, I also found this little gem that seems interesting: http://curiousmind.at/2012/06/ios-6-home-screen-webapps-behave-even-more-like-native-apps/

mliu7 commented 11 years ago

Ok, I'll try to diagnose it that way.

FYI, after some successful stat keeping on chrome for today's first game, it didn't work at all for the 2nd game. I didn't check if it wasn't working and recorded the whole game before noticing it wasn't working...

There's another open issue about handling errors and informing the user and I think that needs to be the highest priority now... If I weren't so invested in this app, taking stats for 2.5 hours to find they aren't there would easily be enough to make me never want to use it again.

On Oct 27, 2012, at 10:10 AM, Chadwick Boulay notifications@github.com wrote:

Now that you reminded me it was called "private mode" I remember that I tried it before and it never worked. I think Safari's private mode completely blocks local storage, whereas Chrome's incognito mode is fully functional but in an anonymous sandbox that is purged when the window is closed.

If you brought your macbook with you, there should be a way to remotely debug it. You're on a 3GS which doesn't support a version of iOS with it built-in, so you'll have to use a third-party tool. http://www.iwebinspector.com/

While finding that, I also found this little gem that seems interesting: http://curiousmind.at/2012/06/ios-6-home-screen-webapps-behave-even-more-like-native-apps/ — Reply to this email directly or view it on GitHub.

mliu7 commented 11 years ago

Closing this issue because Chad fixed it 3 months ago. It had to do with the phone losing connectivity and then not working properly after regaining connectivity.