Game not loading on ipad. How to debug?

Hi all, rookie here. I have a prototype simple game. I’m trying to make it usable on desktop as well as android/iphone/ipad, in the browser. The game works well on desktop/laoptop (including Imac) and android, but when I try to load the page on an Ipad I see nothing. I tried both safari and chrome. Javascript is enabled in the ipad. I don’t have a desktop/laptop I can use to see the console output there at the moment. Is there any way to debug just on the ipad itself?

A draft version of the game can be found at snacke by rattias

on chrome on ipad/iphone/tablets you can go into “chrome://inspect” and see the log, very limited but that’s pretty much the only way without a mac

Thanks! I tried it, and I don’t see any output on the console at all, not even the initial one usually printed by phaser itself. I tested with one of the phaser3 official examples, and I do see such message in the chrome://inspect console.

Any ideas?

it only shows what gets console.log 'ed, works on my end

I see

SyntaxError: Unexpected token ‘=’. Expected an opening ‘(’ before a method’s parameter list.

It may be your use of field declarations.

thansks samme, that might help. Can you tell me where you saw those errors? I don’t see them in the chrome://inspect window…

I managed to get it to work, but it was painful. As it may help others:

  • I removed all class field declarations, as suggested by samme. According to some such declarations should be supported in Safari 14, which is what I’m running, but apparently such support is only partial.

  • the next obscure error was reported about a null on which a destroy was called deep inside phaser.js. Had to look up the stack trace line numbers on my desktop, as whenever I clicked on the error reported on the web inspector the session would apparently disconnect. I realized the error was when trying to destroy an audio object. Some googling took me to Audio works on web but not iOS. Adding

    audio: { disableWebAudio: true },


    to my game config, as suggested there, worked. The odd thing is that I did not see any error or warning on the console for the audio objects not being loaded. Go figure.

It was in Safari console. No trace though so I guessed. :slight_smile: