tinode / chat

Instant messaging platform. Backend in Go. Clients: Swift iOS, Java Android, JS webapp, scriptable command line; chatbots
GNU General Public License v3.0
12.07k stars 1.88k forks source link

Connection error in react native #147

Closed sramezani closed 6 years ago

sramezani commented 6 years ago

I am try to connect Tinode Websocket with react native app, but i get error:

WebSocketEvent {type: "error", target: WebSocket, currentTarget: WebSocket, eventPhase: 2, bubbles: false…}

like this image:

screenshot from 2018-09-10 18-33-55

I am test Tinode Websocket connection in web and not problem with this and easily connect and login.

even i am try connect directly with react native websocket to tinode like below images but again i get error.

screenshot from 2018-09-10 18-41-42 screenshot from 2018-09-10 18-40-26

or-else commented 6 years ago

It seems like the problem is due to a network timeout. Does the webapp work when you connect to it with a web browser from the same host? In other words, if you are running the app in an emulator, can you connect to the internet from the emulator?

or-else commented 6 years ago

Any update on this?

sramezani commented 6 years ago

hi sorry for late answer.

we found the problem. actually it was very silly. we are living in iran and we think either tinode server or iran government have blocked our requests.

so, we have fixed this issue by vpn.

thank you very much

or-else commented 6 years ago

Great.

Tinode server does not block any IPs.