traccar-web icon indicating copy to clipboard operation
traccar-web copied to clipboard

New devices not showing up in web UI

Open Camperor opened this issue 7 years ago • 10 comments

I have two admin users that occasionally create devices. Both users have access to all devices and groups. If both users are logged in and User1 creates a device, User2 doesn't see the device until he refreshes the web UI and vice versa. I monitored the websocket traffic in the users' browsers and when User1 creates a device there is no websocket traffic in User2's browser.

I also tried having User1 logged into the web UI while I created a device via the REST API. The device was created but didn't show up in User1's browser until he refreshed.

When creating the devices I made sure that they were added to a group that both users have access to.

Is this expected behavior or could it be a bug?

Camperor avatar Jun 21 '18 16:06 Camperor

Hi,

Short answer: not a bug, it's just not implemented (WebSocket is just used to push location updates and events)

To me, that's definitely a bug. See https://www.traccar.org/forums/topic/device-updates-through-the-api-dont-appear-un-the-web-interface-unless-its-reloaded/

So yes, any change done via the web interface with two different users won't show up until refresh. Same goes for updates done through the API.

You have to reload the page to see the changes. HTH

oliv3 avatar Jun 21 '18 19:06 oliv3

Would be a very nice feature to have. Especially since we use the "database.registerUnknown" config variable (devices will auto-register but we won't know about them until we refresh).

dudududodododedede avatar Aug 29 '18 20:08 dudududodododedede

@oliv3, it's not possible to fix this issue just on the web app side.

tananaev avatar Sep 05 '18 09:09 tananaev

@tananaev Sorry to bother you, but this particular issue is not mine, but @Camperor first, then @dudududodododedede, and also others. But fine, I'll open an issue in traccar/traccar. Thanks !

oliv3 avatar Sep 05 '18 09:09 oliv3

I'm not talking about moving it. I'm just saying that it has nothing to do with new web app.

tananaev avatar Sep 05 '18 09:09 tananaev

Understood - What about something like "[WebSockets] Better reflect changes done using the API in the web interface" ? For the server-side issue, I mean. Also because this probably involve the websocket part, am I right ?

oliv3 avatar Sep 05 '18 09:09 oliv3

Yes, WebSocket solution would definitely require both back-end and web app.

tananaev avatar Sep 05 '18 10:09 tananaev

Fine. Let's go with this title if you don't mind ?

oliv3 avatar Sep 05 '18 10:09 oliv3

Sure.

tananaev avatar Sep 05 '18 10:09 tananaev

There, https://github.com/traccar/traccar/issues/4044.

oliv3 avatar Sep 05 '18 12:09 oliv3