kawankoding / laravel-fcm

Firebase Cloud Messaging (FCM) sender for Laravel
172 stars 56 forks source link

not receiving notification while running in production server #34

Open kyien opened 4 years ago

erlangparasu commented 4 years ago

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

erlangparasu commented 4 years ago

try add ->timeToLive(0) sir

godiez commented 3 years ago

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?

godiez commented 3 years ago

Solved!

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

erlangparasu commented 1 year ago

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