Notification issue upon update to 5.1

Pat2 years ago

Hi all,

Upon update to 5.1 I haven't been receiving notifications through firebase as I previously was (both on traccar apps and custom apps & on both platforms).
I was hoping version 5.2 would fix this but unfortuently looks like the error is somewere in my setup.
There was no ability to test notification in 5.1 but as that now exists I am able to to 'test notification' and produce the below error message, and I am hoping that someone is able to make sense of it :)

"NullPointerException (NotificatorFirebase:55 < <gener:-1 < *:-1 < ... < NotificatorManager:73 < ...)"

Thanks in advance, Pat

Anton Tananaev2 years ago
j atilano2 years ago

no puedo integrar firebase en version 5.2 arroja lo siguiente

Use JsonReader.setLenient(true) to accept malformed JSON at line 4 column 6 path $.type - MalformedJsonException (... < NotificatorFirebase:58 < <gener:-1 < *:-1 < ... < NotificatorManager:73 < ...)
Pat2 years ago

Hi Anton,
Thanks for your reply.

I have added the following lines into config (while removing the firebase key that the old version used) and can verify that the official app notifications are now working.
Upon checking the documentation it's not clear what details need to be changed for the firebase config for my custom apps (as this is still throwing an error).
I have the firebase service account email address handy, I just need to confirm where exactly to input this and if any other details are required from the firebase account in order to make this work.

firebase key for app notifications traccar manager official

<entry key='notificator.traccar.key'>xxxxxxxxoyNjM3N30uZ0lGb1RIODBOWDZwaEJ0dkJ5QmN2RTN2S0hRenNDOURFNjRucE95WFRLNA</entry>

firebase key for app notifications custom apps

<entry key='notificator.firebase.serviceAccount'>
  {
    "type": "service_account",
    ...
  }
</entry>

Kind Reagrds,

Pat

cristian2 years ago

Hello anton and Pat, could yo please gave us an examble on how firebase must be configured, I donĀ“t understand where to find Json firebase part. before traccar updates I juste used the api key from firebase

Anton Tananaev2 years ago
cristian2 years ago

Thans so much anton Its working now!!