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

Flutter Web - can not authorized #354

Open
mrleesin opened this issue Dec 4, 2023 · 3 comments
Open

Flutter Web - can not authorized #354

mrleesin opened this issue Dec 4, 2023 · 3 comments
Labels

Comments

@mrleesin
Copy link

mrleesin commented Dec 4, 2023

Flutter web connected, but w/o authorisation. Tying everything ((
the same code working good on iOS and android

@MarceloRab
Copy link

MarceloRab commented Feb 24, 2024

Exactly the same thing that happens to me. I've been trying for 8 hours and nothing. 😒. Web app on localHost and Android works perfectly.

Only on flutter web and with server it doesn't work..❗

Site = > https://.... (Vercel)
Server = > https://... (Render)

My versions.
Flutter 3.19.0
Dart 3.3.0
socket_io_client 2.0.3+1

All these measures did not work.

  1. Downgrade Socket.io node from 4.7.4 => 4.6.2. 👉 Doesn't work

  2. Flutter = >

IO.io(socketUrl, <String, dynamic>{ 'autoConnect': false, 'transports': ['websocket'], 'rejectUnauthorized': false, 'withCredentials': false, });

👉 Doesn't work

  1. Node Server = >

this.io = new socketIo.Server(this.server, { colors: { origin: [ ''my_cors", //"*", ], credentials: false,

👉 Doesn't work

Error thrown ▶ timeout in all states.

@kartik-dcx
Copy link

kartik-dcx commented Nov 14, 2024

@MarceloRab Can you please tell me or send me the configuration(web app side) on how you connected socket in flutter web? For me, the socket doesn't work on localhost too. I am getting xhr poll error and the request URL is not wss but https (with transport as polling). Specifying transport as websocket doesn't work in Flutter Web.

@MarceloRab
Copy link

MarceloRab commented Nov 14, 2024

@kartik-dcx This project is already 6 months old. I don't know if the dependencies have been updated. Today I use firebase and have had no problems with real time.

Flutter side

https://gist.github.com/MarceloRab/9100a31439219fa045f0278a2d4427ef

TS side

https://gist.github.com/MarceloRab/c0deff2a3db0d96ae72baa84830ae278

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

No branches or pull requests

4 participants