kawankoding/laravel-fcm

not receiving notification while running in production server

kyien opened this issue · 5 comments

kyien commented
not receiving notification while running in production server

The default timeout is four weeks, unless the time_to_live flag is set.
https://firebase.google.com/docs/cloud-messaging/concept-options#lifetime

may be need to set time_to_live

try add ->timeToLive(0) sir

Hi,

I got this error. I'm trying to set different values to 'time_to_live' field (0, 60, 100 seconds) but it does not work.

Any ideas?

Solved!

The problem was curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, CURL_IPRESOLVE_V4); here, I put my certificate files as describe on stackoverflow

Hi, @kyien.. maybe you can try to enable debug response. then check the firebase log in the laravel.log file.

fcm()
    ->to($recipients)
    // ...
    ->enableResponseLog()
    ->send();

if you like, please share the response log here so we can see the problem