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

Wss connection works on WebGL builds but not on mobile or editor for some URLs #74

Open
Woody4618 opened this issue Dec 18, 2022 · 2 comments

Comments

@Woody4618
Copy link

Woody4618 commented Dec 18, 2022

Hey,
when i try to connect to this url, it works fine in the WebGL builds but not in editor or mobile builds:
wss://api.devnet.solana.com/

The error is:
Error! Unable to connect to the remote server

This URL works in Editor:
wss://devnet.genesysgo.net/

Any Ideas how I can solve the problem? Or in which direction I need to look?
When I use BestHTTP package it works, so I assume there should be some way this can be fixed in this package hopefully.

This is the Stacktrace:
at System.Net.WebSockets.WebSocketHandle.ParseAndValidateConnectResponseAsync (System.IO.Stream stream, System.Net.WebSockets.ClientWebSocketOptions options, System.String expectedSecWebSocketAccept, System.Threading.CancellationToken cancellationToken) [0x0010a] in <35e40e3005db46479c17ef7dd12bbfe4>:0
at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore (System.Uri uri, System.Threading.CancellationToken cancellationToken, System.Net.WebSockets.ClientWebSocketOptions options) [0x00383] in <35e40e3005db46479c17ef7dd12bbfe4>:0
at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore (System.Uri uri, System.Threading.CancellationToken cancellationToken) [0x000d1] in <35e40e3005db46479c17ef7dd12bbfe4>:0
at NativeWebSocket.WebSocket.Connect () [0x001a5] in /Assets/WebSockets/WebSocket.cs:471

@J0m1ty
Copy link

J0m1ty commented Dec 21, 2022

I have a similar problem 👍

EDIT: Nevermind, I just had to wait for DNS to propagate. It now works everywhere.

@Woody4618
Copy link
Author

I "solved" it by using this repository for WebGL then creating a common interface and using socket sharp for the other platt forms and use a compiler flag to choose depending on the platt form. Sadly I couldn't figure out what the cause of the problem was.

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