Push notifications to Traccar Manager

Gargia year ago

Hello, I am unable to make push notifications working.

this is my traccar.xml 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>
        <entry key='notificator.types'>traccar,web</entry>
        <entry key='notificator.traccar.key'>eyjpbegFz0fzgziIPCiwQW:APA91bG5TzvASNmRcH21SjAb0r-Gcyf3N6fsRLqNeQYR4y_FsJjdH3Go2TC7G1UZRDTAyy00IFYS7olFIGweuDWpA3oAJLnQLV3_IMg8kPlC5weo-73cT-9sb1ls4RvQJv91y5yk1CJ5,dG_M_IXfLEnzvy-Q54Agmx:APA91bEQbi6Nngo1_YNDA5aCIMsgtfXR0QNgdTwefYIxOs8XJmiagHzIzcabqlPzoMC_VlY4hldKh7kd6_niBM31XX1qNx_s5tvLRB7BMjkDBABJgDn8YvkDn8YvkdtRmvU9wsov2tJx-nKq5C,dipHlyLJbkuVgsrpbU3DVn:APA91bGxQ6I4DfW12Tzhzhta9QadMTyMDrt_IoqGSngxFbbGUh1pNtffbxytXvTLxjnO-8ZTtuaRV_Yrm2u-3pDJiS5DHLyG_6Tb_b17LU3QE6-9ogBp2uINUvkcP52w44bMDo5Phw7m</entry>

        <entry key='notificator.traccar.key'>RjBEAiBM32K9x5ssco2RDFqKomTgolZSZHwB7RTS2ijvFhx0rgIgTh5FpRo87zz4U7UCUpqOkRZjeP0xJTKFo1-84JVGpQ57InUiOjEsImUiOiIyMDIzLTA3LTAxVDIyOjAwOjAwLjAwMCswMDowMCJ9</entry>

I have added two keys for two different devices but non of them are working. When I try to test channels on the web I get this 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 < NotificationResource:96 < ... < OverrideFilter:50 < ...)

I am hosting my own server on raspberry PI and I am not a programmer. Can you please direct me to where can be a problem?

Thank you!

Anton Tananaeva year ago

I have added two keys for two different device

This is definitely wrong. I'm also not sure how server keys are related to devices.

Gargia year ago

Yes, I can uderstand that. I have tried with one key only before and again and it is giving me the same 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 < NotificationResource:96 < ... < OverrideFilter:50 < ...)
Anton Tananaeva year ago

Which key did you use? From what I can tell, both keys are wrong.

Gargia year ago

This one:

eyjpbegFz0fzgziIPCiwQW:APA91bG5TzvASNmRcH21SjAb0r-Gcyf3N6fsRLqNeQYR4y_FsJjdH3Go2TC7G1UZRDTAyy00IFYS7olFIGweuDWpA3oAJLnQLV3_IMg8kPlC5weo-73cT-9sb1ls4RvQJv91y5yk1CJ5,dG_M_IXfLEnzvy-Q54Agmx:APA91bEQbi6Nngo1_YNDA5aCIMsgtfXR0QNgdTwefYIxOs8XJmiagHzIzcabqlPzoMC_VlY4hldKh7kd6_niBM31XX1qNx_s5tvLRB7BMjkDBABJgDn8YvkdtRmvU9wsov2tJx-nKq5C,dipHlyLJbkuVgsrpbU3DVn:APA91bGxQ6I4DfW12Tzhzhta9QadMTyMDrt_IoqGSngxFbbGUh1pNtffbxytXvTLxjnO-8ZTtuaRV_Yrm2u-3pDJiS5DHLyG_6Tb_b17LU3QE6-9ogBp2uINUvkcP52w44bMDo5Phw7m

Is key copied from my mobile phone, under Account -> Account -> Atributes -> Notification Tokens

Thank you.

Anton Tananaeva year ago

And why are you using this token? That's not the right token. You should probably carefully read the documentation first:

https://www.traccar.org/notifications/#push

Gargia year ago

I am sorry. My bad. Thank you very much, it is now working! :)