chinloyal / pusher_client

A Pusher Channels Client for Fluttter (Fully supports Android and iOS)
https://pusher.com/channels
MIT License
42 stars 175 forks source link

connect failed: ETIMEDOUT (Connection timed out) #54

Closed DevTiago closed 2 years ago

DevTiago commented 2 years ago

Hello there,

This isn't a package error because the package is working in all devices except on a Xiaomi Redmi Note 7.

the 'onConnectionError' method catch this error:

message: An exception was thrown by the websocket
code: null
Exception: failed to connect to websockets.************.pt/2001:bc8:4700:2300::29:503 (port 443) from /:: (port 42860): connect failed: ETIMEDOUT (Connection timed out)

Anyone has faced the same problem? Any guess?

YassineChe commented 2 years ago

Bizarre! for me i'm getting java.security.cert.CertPathValidatorException: Trust anchor for certification path not found. You didn't face it ?

DevTiago commented 2 years ago

Well, this can be closed... it's a problem with the connection between some devices (eg: Xiaomi) and the server.

Usually devices use IPV4 to connect to server and apparently Xiaomi uses IPV6... and the IPV6 of the server i use was changed so that was the problem.

YassineChe commented 2 years ago

@DevTiago,

I solved the problem, still on it ?