Forum General PlayerIO and WebGL, too much recursion?

Any issues or discussions relating to Unity development are welcome here.

PlayerIO and WebGL, too much recursion?

Postby AwesometacularGames » August 25th, 2017, 2:28 am

Me and a buddy have made a game using PlayeIO, and Unity, targeting the webgl platform. Works great, in a standalone build and on a local webgl build.

But when I upload it to kongregate, or itch.io. And interact with anything playerio related (Join game, enter message etc) I get a browser error "too much recursion" in firefox and "Uncaught RangeError: Maximum call stack size exceeded"...

Any idea what's up?
AwesometacularGames
 
Posts: 3
Joined: August 2nd, 2017, 3:44 am

Re: PlayerIO and WebGL, too much recursion?

Postby Henrik » August 25th, 2017, 5:58 am

Do you get any stack traces or hints about where in the code you get stack overflows?

Are you getting these errors when you call methods like Authenticate, or only when you call methods in the Multiplayer part, e.g. JoinRoom or in your message handlers?
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: PlayerIO and WebGL, too much recursion?

Postby AwesometacularGames » August 25th, 2017, 2:03 pm

You mean the browser logs? Seems authenticate works fine, and the browser gets all the "Successfully connected to Player.IO" and "Create ServerEndpoint" messages. Then after a CreateJoinRoom (which shows up in the browser console) to a service room. This pops up.

VM58:161 Mixed Content: The page at 'https://awesometaculargames.itch.io/howlerstreetweb?secret=dnsfWVFaNuLBOQFBVmW0wI3uins' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://108.178.26.138/'. This request has been blocked; this endpoint must be available over WSS.


And

DOMException: Blocked a frame with origin "https://v6p9d9t4.ssl.hwcdn.net" from accessing a cross-origin frame.
at Object.callback (eval at _JS_Eval_EvalJS (blob:https://v6p9d9t4.ssl.hwcdn.net/40100103-996b-4829-9e0c-2e660f52e063:2:184768), <anonymous>:6:28)
at eval (eval at _JS_Eval_EvalJS (blob:https://v6p9d9t4.ssl.hwcdn.net/40100103-996b-4829-9e0c-2e660f52e063:2:184768), <anonymous>:88:54)
at _JS_Eval_EvalJS (blob:https://v6p9d9t4.ssl.hwcdn.net/40100103-996b-4829-9e0c-2e660f52e063:2:184768)
at Array.jkc (blob:


with a lot more "at Array" and "at xxx" messages.

Then clicking room browser, which calls listrooms. Works perfectly, it's just sending messages to playerio (chat), creating a room, and joining a random room, or joining a room from the room list. Get's the "Too much recursion" error.

Here's the entire firefox console log, which is tiny compared to chrome.
https://pastebin.com/KFYDLUT3

And the entire chrome console log.
https://pastebin.com/bnTpwgMD

Thanks for the help :)
AwesometacularGames
 
Posts: 3
Joined: August 2nd, 2017, 3:44 am

Re: PlayerIO and WebGL, too much recursion?

Postby Zenithin » August 25th, 2017, 5:41 pm

I am also facing somewhat same issue.
The game works fine on my domain but once it is iframed on some other page(other domain), it throws this cross origin frame error.

I have detailed the issue on this post.
viewtopic.php?f=4&t=36448
Zenithin
 
Posts: 8
Joined: August 17th, 2017, 10:52 am

Re: PlayerIO and WebGL, too much recursion?

Postby Henrik » August 25th, 2017, 9:15 pm

If you load the game over https, you must also make the multiplayer websocket connection securely. Set this to true:

https://playerio.com/documentation/refe ... onnections
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: PlayerIO and WebGL, too much recursion?

Postby AwesometacularGames » August 25th, 2017, 11:13 pm

I already set that to true... I did it in the start method on my gamemanger script within unity, is that the right way to do it?

I think before I did that, listing rooms by the room browser didn't work. After it did, but creating rooms, joining them, or anything else still doesn't work.
AwesometacularGames
 
Posts: 3
Joined: August 2nd, 2017, 3:44 am


Return to General



cron