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

Online content not working cross-domain in Emscripten #9233

Closed
embeddedt opened this issue May 10, 2021 · 3 comments
Closed

Online content not working cross-domain in Emscripten #9233

embeddedt opened this issue May 10, 2021 · 3 comments

Comments

@embeddedt
Copy link
Contributor

embeddedt commented May 10, 2021

Version of OpenTTD

Emscripten, 176d65b

Expected result

I expected to successfully open the "Check Online Content" window and see the list from BaNaNaS.

Actual result

image

In Chrome DevTools, the message shown is that "WebSocket is closed before the connection is established."

Steps to reproduce

  1. Compile an Emscripten version of OpenTTD locally.
  2. Serve it using any basic HTTP server on 127.0.0.1.
  3. Browse to 127.0.0.1.
  4. Click "Check Online Content".

I'm guessing that this is caused by the recent networking revamp. Interestingly, the compiled previews of recent PRs like #9043 seem to not have this issue.

I don't think this is caused by a lack of HTTPS, as my fork with JGRPP applied uses HTTPS and has the same issue.

@TrueBrain
Copy link
Member

Sad news: it does work fine for me. Tested with latest master (8f4a612), on both FireFox and Chrome.

As you tried a commit from 6 days ago, and there have been many commits since then in master, would you mind trying the latest? Who knows we might have fixed it along the way.

@embeddedt
Copy link
Contributor Author

I've retried with master and it does work properly there. I'll close this since it's not really a bug.

I noticed that with JGRPP, there has not been a full upstream merge since the networking changes were introduced (instead, all upstream commits seem to be cherry-picked now). The issue there will probably be resolved once a full merge is done.

@TrueBrain
Copy link
Member

Yeah, we talked it over with JGR, and we suggested he doesn't merge the new networking stuff till we are done. It is pretty likely we break it a few more times before we got all the kinks worked out :D

Let me know if you find any other issues!

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

2 participants