laravel-notification-channels / fcm

Firebase Cloud Messaging (FCM) notifications channel for Laravel
https://laravel-notification-channels.com/
MIT License
495 stars 127 forks source link

Driver [NotificationChannels\Fcm\FcmChannel] not supported. #38

Closed vimalmistry closed 2 years ago

vimalmistry commented 4 years ago

I installed everything as mentioned in document. I am getting this error. Screenshot 2020-06-17 at 5 06 38 PM

dibs439 commented 4 years ago

Same issue is happening to me. it works in my local machine but not in AWS. Any solution?

atymic commented 4 years ago

Can you paste your composer.lock please?

dibs439 commented 4 years ago

Here it is attached. Thanks in advance. composer.lock.txt

istiyak-iroid commented 3 years ago

I'm having similar issue. Any updates?

msassa commented 3 years ago

Any update on this? Thanks

msassa commented 3 years ago

🤔

vimalmistry commented 3 years ago

I had no solution for this. So I triggered manually call on toMail function. I know it was bad practice but submitted project :)

msassa commented 3 years ago

@vimalmistry Hi, and thanks. Can you explain to me how you work around this?

vimalmistry commented 3 years ago

@msassa notification channel is not working. But if I send manually by using libarary. It's working. So I triggered libarary manually on toMail function of notification class.

blogui91 commented 3 years ago

Silly question, did you import it? use NotificationChannels\Fcm\FcmChannel;

I got the same error and this happened because i didn't import it, but it's weird because neither PHP nor my code editor marked "FcmChannel::class" as missing

vimalmistry commented 3 years ago

Silly question, did you import it? use NotificationChannels\Fcm\FcmChannel;

I got the same error and this happened because i didn't import it, but it's weird because neither PHP nor my code editor marked "FcmChannel::class" as missing

No. This library using kreait/laravel-firebase package. Use this

Taalaybek commented 3 years ago

possible solution is manually register FcmChannel in AppServiceProvider

joe94113 commented 3 years ago

Excuse me, has anyone solved it?

mofaruk commented 3 years ago

I am using Laravel 6. I faced the same problem, but after downgrading the laravel-notification-channels/fcm version to 2.0.4 (from 2.2.1) the issue resolved.

joe94113 commented 3 years ago

@MOfaruk Thank you, let me try

santilorenzo commented 2 years ago

As pointed out by @chuysb in #67 , in my case the problem occurs when the notification implements the ShouldQueue contract. I am using the channel in Lumen 8 and I registered the facade in the bootstrap/app.php file:

$app->register(Kreait\Laravel\Firebase\ServiceProvider::class);

$app->withFacades(true, [
    'Illuminate\Support\Facades\Notification' => 'Notification',
    'NotificationChannels\Fcm\FcmChannel' => 'FcmChannel',
]);

I am using Redis for my queues. It works fine when the notification is sent synchronously. What am I doing wrong?

santilorenzo commented 2 years ago

Solved. It turned out I didn't restart the queue worker after installing the library. The code loaded from the queue:work command didn't contain the FcmChannel class and it crashed.

ahmed-mohammed2 commented 2 months ago

i run this in server php artisan queue:restart and its work for me