Websocket on google chrome Error

Alijah2 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 Tananaev2 years ago

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

Alijah2 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 Tananaev2 years ago

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

Alijah2 years ago

Oh. Yes that one works fine.

Anton Tananaev2 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