Notificator error disconnect the device until restart the server

maclofin2 months ago

I'm having a problem with my server of Traccar, I have configured some notificators like Firebase,Traccar,web, for a while they works well but it stop working at random hour in the day, checking the logs, the notificator error disconnect the device.

2024-07-11 16:00:42  INFO: [T0ffbef8c] error - Failed to get notificator  - RuntimeException (NotificatorManager:75 < NotificationManager:140 < ... < *:133 < ... < *:132 < *:176 < ProcessingHandler:174 < ...)

After get the notificator error, it stop of reporting to server. (the last know location was reported at 16:00:32)

2024-07-11 16:00:42  WARN: Event forwarding failed - HTTP code 400 - RuntimeException (EventForwarderJson:57 < *:50 < ...)
2024-07-11 16:00:42  INFO: [T0ffbef8c] error - Failed to get notificator  - RuntimeException (NotificatorManager:75 < NotificationManager:140 < ... < *:133 < ... < *:132 < *:176 < ConnectionManager:256 < ...)
2024-07-11 16:00:49  INFO: [T66ecfbef: startek < 147.75.51.174] 2626643135392c3836353233353035373338303630382c3030302c302c2c3234303731313230303034392c412c31382e3439303836362c2d36392e3836383233302c31312c312e342c302c3234342c34342c323031303632322c3337307c317c304641427c30303032304530332c32372c30303030303033442c30302c30312c303445387c303139397c303030307c303030302c312c3031303030307c3032303030302c2c36430d0a
2024-07-11 16:00:49  INFO: [T66ecfbef] id: 865235057380608, time: 2024-07-11 16:00:49, lat: 18.49087, lon: -69.86823, course: 244.0
2024-07-11 16:00:54  INFO: [T8caf908f] connected
2024-07-11 16:00:54  INFO: [T8caf908f: startek < 147.75.51.167] 2626503135392c3836353233353035373337303830372c3030302c302c2c3234303731313230303035322c412c31382e3530333133352c2d36392e3838353138332c31382c302e372c32372c3233312c34372c3232323437332c3337307c327c324546357c30303035433630312c32382c30303030303031442c30322c30302c303539327c303139447c303031307c303030302c312c3031303030307c3032303030302c2c35410d0a
2024-07-11 16:00:54  INFO: Event id: 865235057370807, time: 2024-07-11 16:00:54, type: deviceOnline, notifications: 2

Nvm to event forwarding failed (that's expected, I deny this type of event in a webhook)

Then, I have two question.

1- Why the server stop receiving the device location until I restart the server? This type of error shouldn't stop of reporting the device.
2- Theres a option or way to just continue reporting even if it a notificator error? (I search in docs and don't find nothing)

I'll to debug about the notificator, I have firebase and all things well configured, I suspect that it could fails becuase some alarms/events don't have notificators (it is a default behaviour of an external mobile app that I'm develop).

Screenshot 2024-07-11 223525.png

Thanks in advance!

Anton Tananaev2 months ago

Why do you have notifications without any channels?

maclofin2 months ago

I'm develop a mobile application and when the user select "disable alarm" it delete the channels and leave the alarms, I'll to fix that but that's not the first time that it happened to me, when a notificator fails (for any reason) the server stop receiving data.

Anton Tananaev2 months ago

You cannot have a notification without channels. That's exactly your problem. You're misusing the API.

maclofin2 months ago

Ok, I'll fix it, but is there a way to continue reporting even if I have a bug? For example, if there are too many devices reporting maybe I would have devices disconnected until I notice the error and I'm creating a solution for end users who don't use the app much and wouldn't notice in time. There should be a way so that non-fatal errors such as the notification error do not prevent the device from continuing to report or notify the errors to a webhook (I think I can make a script to notify me of an error)