Websocket on google chrome Error

Alijah 3 years ago

Hi,

I am developing a website using traccar api and your websocket api. But when i connect in google chrome it displays error and im having a Error: WebSocket connection to 'ws://TraccarLocalIp:8082/api/socket' failed: Error during WebSocket handshake: Unexpected response code: 503. And if i opened it on Firefox it works fine.

Anton Tananaev 3 years ago

Does it work in the official app? Is the API accessible on the same host as your website?

Alijah 3 years ago

You mean the traccar app.? Yes it works im sending my location using that app and it sends successfully. And the apis like http://TraccarLocalIp:8082/api/server works fine.

Anton Tananaev 3 years ago

I'm talking about the official web app, of course. It doesn't send any location.

Alijah 3 years ago

Oh. Yes that one works fine.

Anton Tananaev 3 years ago

If your app is not on the same host as the API, try adding a proxy, so that they are on the same host