Problem with Traccar 5.7 notifications

Cristiana year ago

Context: I have Traccar 5.7 and I use an API to receive notifications by WhatsApp, as a requirement for the API to work, the phone number must be registered on the API side. Everything works correctly.

Problem: if a client modifies his phone number for another one and this number is not registered in the WhatsApp API, when sending the notification Traccar stops working, the location of the device is not updated and the other devices go to unknown status.

the error is recorded in the log.

2023-05-18 13:48:24  INFO: [T57920c67] error - Unexpected end of file from server - SocketException (... < HttpSmsClient:94 < NotificatorSms:51 < NotificationManager:110 < ...)

If I delete the notifications assigned to the user, everything starts working again without any problem.

How do the notifications work when they are sent, are they queued?

So far I know "how" the error occurs but I don't know "why".

Anton Tananaeva year ago

Notifications are sent directly when the data is received and processed.

Nikolay a year ago

If WhatsApp API returns exception for non existent user or something like that, Traccar may not handle the response correctly.

Try to call WhatsApp API with external tool, Postman, Curl, etc. for nonexistent number.

Cristiana year ago

If the phone number is authorized, here is the answer
https://ibb.co/q5s5zQ9

If the phone number is not authorized, answer timeout
https://ibb.co/xLr0By9

Nikolay a year ago

Look here

It's look like the API reject request with non standard HTTP Status code.

1028 - A user_identity_changed system notification requires acknowledgement
You sent a message to a WhatsApp user who has potentially changed, and a user_identity_changed system notification was sent to you and is pending acknowledgement.
Cristiana year ago

Thanks for the answers, I will investigate what you tell me, from what I see it could be that the API blocks Traccar.