Closed szalapski closed 9 years ago
... Then I cannot recover, even if I force down the Browser. This is on Android.
Refrshing doesn't work?
-----Original Message----- From: "szalapski" notifications@github.com Sent: 12/14/2014 17:45 To: "excaliburjs/sweep" sweep@noreply.github.com Subject: Re: [sweep] Viewing the credits houses everything up (#2)
... Then I cannot recover, even if I force down the Browser. This is on Android. — Reply to this email directly or view it on GitHub.=
I'm able to reproduce this, and refreshing doesn't resolve it. Worse, even closing the tab/brower and trying to revisit it doesn't fix the problem... once you've looked at the credit it gets stuck looking like the screenshot provided.
It looks likes something gets busted with the javascript somehow. Clicking to show the tutorial and clicking the megaphone icon are also not working for me after this.
I can reproduce as well. Something with detecting mobile size on the back action?
However a refresh does restore all functionality for me.
What phone model and mobile chrome version do you have? I'd like to check this out on Monday.
Oneplus one A0001, chrome 39.0
I set up remote debugging on my phone and this is what the script looked like where it's erroring for me:
basically it looks like somehow excalibur.js gets completely hosed. It breaks on the lack of assignment to this.sound and then just devolves into total chaos. The code in the comments just make no sense and is followed by a bunch more code that isn't comment that looks similar.
@eonarheim, I'll email you some directions on setting up remote debugging for android because it was actually a huge pain for me to set up.
One weird thing I noticed is that when you look at the source on github, the "this" keyword has different syntax highlighting at the same spot where the code breaks.
this issue doesn't occur for me on sweepgame.azuresites.net. Instead I experience what @eonarheim describes. The content isn't displayed correctly, but Javascript seems to work normally and the page works again as normal when I refresh.
There could be a missing paren or something messing up with the TSC compiler...
I think the different syntax highlight is because it's a function and the others are properties. I think.
@kamranayub there seems to be two problems here, one that i was experiencing and one that me/erik are now experiencing. I'm no longer experiencing my original problem and am instead now fetting what erik was.
The interesting thing is that my original problem resolved itself while i was looking at it yesterday. I actually confirmed by requesting the script directly that my desktop and phone were receiving two different versions of the script... Suddenly as i was messing around with this my phone just started getting the right version. Not sure what the explanation for this but I'm no longer locked out and am now experiencing the issue that Erik is describing.
I looked into this by debugging remotely again and it looks like for some reason your scaling logic produces a different number when the page is initially loaded/refreshed than it does when you hit the back button to go to it. Any idea why that would be?
Possibly, Chrome/Android might be doing something special. I think I remember something about how the back button was handled on Android.
@kamranayub @eonarheim I resolved this in the cordova branch by adding the viewport meta tag to the credits page, I'll probably go ahead and fix it in the edge/master branches as well. Not sure why that did the trick, it's almost like the main page was trying to use the (non-existent) viewport settings of the credits page if you had just viewed it.
Viewing the credits prevents me from playing the game any further. When I go back to the main screen, I get this: http://i.imgur.com/fyMuwNg.jpg