MessageBodyReader error

Daniel Höldera year ago

Hi, I have a weird problem:

Since yesterday, the notifier hangs up if a device (Traccar client on iPhone or iPad) enters or exits a geofence and generates notifications. After the event the notifications are send again and again every 15-30 secs. That doesn't stop. It stops if I switch off the client or unlink the geofence.

The client reports then "transfer error" (not sure about the English message, in German: Übertragungsfehler), but does further positions updates as well.

I reviewed the server log. It reports a MessageBodyReader error.

2023-07-03 10:52:12  INFO: [Tfebc506c] error - MessageBodyReader not found for media type=text/plain;charset=utf-8, type=interface javax.json.JsonObject, genericType=interface javax.json.JsonObject. - MessageBodyProviderNotFoundException (... < NotificatorTraccar:106 < NotificationManager:110 < ... < *:107 < ... < *:106 < *:148 < BaseEventHandler:40 < ...)

The traccar.xml looks as follows (replaced credentials by xxx):

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

    <!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->

    <entry key='database.driver'>org.h2.Driver</entry>
    <entry key='database.url'>jdbc:h2:./data/database</entry>
    <entry key='database.user'>sa</entry>
    <entry key='database.password'></entry>

   <!-- notification config -->
    <entry key='notificator.types'>traccar,web,mail,telegram</entry>

    <!-- Traccar push notrification config -->
    <entry key='notificator.traccar.key'>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</entry>

    <!-- E-Mail notification config -->
    <entry key='mail.smtp.host'>smtp.xxx.xx</entry>
    <entry key='mail.smtp.port'>465</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.from'>xxx@xxx.xx</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>xxx@xxx.xx</entry>
    <entry key='mail.smtp.password'>xxxxxxxxxxxxxxxxx</entry>

    <!-- Telegram config -->
    <entry key='notificator.telegram.key'>xxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</entry>
    <entry key='notificator.telegram.chatId'>-xxxxxxxx</entry>

</properties>

The problem occurred yesterday for the first time but persists since then.

What can I do?

Anton Tananaeva year ago

Check the push notifications API response.

Daniel Höldera year ago

How can I do this?

Anton Tananaeva year ago

Probably something like Wireshark is the easiest option.

Daniel Höldera year ago

Hm, I'm not a IT pro. Maybe, that goes beyond my capabilities.

Daniel Höldera year ago

I deactivated Traccar Push and the problem is gone.

Daniel Höldera year ago

When I re-activated push notifications the problem occurred again.

I solved the problem by setting up the server newly. Not an elegant way but quicker than wasting days on investigating the malfunction.

Anton Tananaeva year ago

You probably could've just removed the notification tokens from the user that's failing.