laravel-fcm icon indicating copy to clipboard operation
laravel-fcm copied to clipboard

not receiving notification while running in production server

Open kyien opened this issue 5 years ago • 5 comments

kyien avatar Oct 21 '19 06:10 kyien

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 avatar Oct 21 '19 07:10 erlangparasu

try add ->timeToLive(0) sir

erlangparasu avatar Nov 04 '19 09:11 erlangparasu

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 avatar Sep 01 '20 11:09 godiez

Solved!

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

godiez avatar Sep 01 '20 13:09 godiez

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

erlangparasu avatar Apr 22 '23 00:04 erlangparasu