Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AirConsole does not work with itch.io app browser #53

Closed
joemicmc opened this issue Oct 13, 2018 · 3 comments
Closed

AirConsole does not work with itch.io app browser #53

joemicmc opened this issue Oct 13, 2018 · 3 comments

Comments

@joemicmc
Copy link

I'm not sure if this is something you want to support, but embedded games don't run correctly in the itch.io app browser. Behind the scenes it uses Chrome, but for some reason the the client closes the websockets prematurely and it never manages to communicate with server.

Details

Description

When the game is launched, websocket connections are closed:
WebSocket connection to 'wss://server-url' failed: WebSocket is closed before the connection is established.

As a workaround, i display a splash screen of sorts that allows the user to launch the AirConsole game in their default browser:

image

@fasterthanlime
Copy link

fasterthanlime commented Oct 14, 2018

A few notes on the itch app:

  • There are some troubleshooting notes in the manual: https://itch.io/docs/itch/integrating/troubleshooting-guide.html
  • If you're on Windows, it installs to %LOCALAPPDATA%/itch/app-25.3.0
  • If you set IMMEDIATE_NOSE_DIVE=1 (as an environment variable) before starting itch.exe, it'll open developer tools before launching an HTML5 game, which might give you more details than starting the game and only then pressing Shift+F12
  • Games are served from a custom protocol, itch-cave://, but it's registered as a "secure" protocol within chrome, so, for example, the Fetch API works, Websocket works, see https://fasterthanlime.itch.io/ws-test

Here are the versions it currently ships with (tl;dr Chrome 61)

image


I'm not familiar with how AirConsole works, so if anyone posts a few details about it I might be able to figure out what makes them not play together nice.

@andrin-n-dream
Copy link
Contributor

itch-cave:// is a problem. We require everything to be served over https or http.

@fasterthanlime
Copy link

itch-cave:// is a problem. We require everything to be served over https or http.

Can you expand on that a little bit? What are the technical reasons that make it so that games won't work unless the protocol happens to be http or https?

As I mentioned, that protocol, in the app, behaves exactly like https - all features are enabled for it (including WebSockets, Fetch, Web workers, anything https allows you to do in Chrome). It just happens to have a different name. I'm having a hard time understanding how that makes any difference to the AirConsole runtime (or how it's related to the error trace posted in the original message!)

(We cannot serve games over a protocol named "https", because it would either interfere with the actual https protocol, or would involve generating+trusting a local certificate, which has proved problematic in the past).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants