Search code examples
unity-game-engineairconsole

Can't connect real phones with connection code (AirConsole, Unity)


Im developing a game for AirConsole in Unity and i am having issues with testing it on my phone.

Everything works as expected when running the game with airconsole Browser start mode: Virtual Controllers, EXCEPT connecting with my real phone. The virtual controllers view

Connecting real phones is not available through the AirConsole app so i have to use a browser. The issue is that with my (Samsung) phone i can't connect to the game because it redirects me instantly to the "Download App" screen: enter image description here

This same problem is also ocurring with any of the provided AirConsole examples such a the pong example.

When i tested it with my friends who have iPhones and used Safari, they were able to connect succesfully. I have tried 4 different browsers on my samsung phone with no luck.

Also when i go to http://192.168.3.10:7842/controller.html on my phone, it loads the controllers no problem. (I am for sure on the same WiFi and there is no problem with client separation) I also tried using ngrok and there was no difference.. as it seems the problem is with the forced rederect and not the actual connections.

When i checked the network calls by remotely debugging the phones browser i get this call sequence: enter image description here This is the stuff that loads right after when i press the green checkmark button after inputing the connection code.. Then this all dissapears when the ?http=1 is loaded and then i am redirected to the download app screen again.

Another thing that might be connected with this issue is that when i start the game with AirConsole Browser Start Mode: Normal/Debug, i get CONNECTION_REFUSED in the browser.

I am developing on a M1 Mac and using AirConsole unity plugin v2.13 and Unity 2021.3.24f1.


Solution

  • Thank you for reaching out :)

    I am actually preparing a new releases that addresses this and the related bug (https://github.com/AirConsole/airconsole-unity-plugin/issues/8). The release is expected to go live tomorrow (Nov 2nd, 2023) with the Unity AssetStore release as soon after as their review process allows for.

    You can visit our discord at https://discord.gg/8tQgS2ZJ to be kept up to date or revisit https://github.com/airconsole/airconsole-unity-plugin later this week