Can't see device position in UI when [Event] forwarding is on

exaucae2 years ago

My scenario is that I want to forward some device events and still see their positions in traccar UI. Current I have setup traccar 5.7 event forwarding. But devices positions are not visible in Web UI, let alone API.

Does Traccar display real time device positions when we configure (event/position) forwarding? Or does it forward events/positions without storing them?

This might be a non issue. It's still worth asking for confirmation.

Anton Tananaev2 years ago

Have you checked logs for errors?

exaucae2 years ago

TL;DR: There's a lot to unpack here. If I've lost you in my thinking, please, only consider the second paragraph in the answer below.

answer

An IndexOutOfBoundException is logged. I postulate it's related to the forwarding setup being problematic. Perhaps server being unreachable. In fact, removing it shows correct device positions in the UI. I'm okay with that, it costs nothing to fix.

But here's where I want to drive the focus of our discussion: does event forwarding result prevent the device positions from being visble in the UI/API?

I like to think that forwarding acts like a webhook: successfull or unsuccessfull (event) forwarding shouldn't have consequence in Traccar showing device current position in the UI/API. Unless the reality is that forwarding makes traccar act like a forward proxy. It's unlikely to me since we get ids in the event forwarding payload. I wouldn't mind being corrected here.

Anton Tananaev2 years ago

does event forwarding result prevent the device positions from being visble in the UI/API?

It should not. But you should probably provide full error, including the stack trace.

exaucae2 years ago

Sounds like a plan. I'll share that as soon as possible. Thanks for the godspeed answer.

exaucae2 years ago

Small update. Turns out the error goes away when the option disableHealthCheck is true. So I went with it and moved on.