traccar-web
traccar-web copied to clipboard
New devices not showing up in web UI
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?
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
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).
@oliv3, it's not possible to fix this issue just on the web app side.
@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 !
I'm not talking about moving it. I'm just saying that it has nothing to do with new web app.
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 ?
Yes, WebSocket solution would definitely require both back-end and web app.
Fine. Let's go with this title if you don't mind ?
Sure.
There, https://github.com/traccar/traccar/issues/4044.