fcm icon indicating copy to clipboard operation
fcm copied to clipboard

Driver [NotificationChannels\Fcm\FcmChannel] not supported.

Open vimalmistry opened this issue 4 years ago • 17 comments

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

vimalmistry avatar Jun 17 '20 11:06 vimalmistry

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

dibs439 avatar Jul 20 '20 21:07 dibs439

Can you paste your composer.lock please?

atymic avatar Jul 20 '20 23:07 atymic

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

dibs439 avatar Jul 21 '20 09:07 dibs439

I'm having similar issue. Any updates?

istiyak-iroid avatar Dec 23 '20 18:12 istiyak-iroid

Any update on this? Thanks

msassa avatar Jan 13 '21 18:01 msassa

🤔

msassa avatar Jan 18 '21 11:01 msassa

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

vimalmistry avatar Jan 21 '21 05:01 vimalmistry

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

msassa avatar Jan 22 '21 15:01 msassa

@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.

vimalmistry avatar Jan 22 '21 17:01 vimalmistry

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

blogui91 avatar May 15 '21 18:05 blogui91

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

vimalmistry avatar May 19 '21 16:05 vimalmistry

possible solution is manually register FcmChannel in AppServiceProvider

Taalaybek avatar Jun 04 '21 12:06 Taalaybek

Excuse me, has anyone solved it?

joe94113 avatar Oct 15 '21 07:10 joe94113

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.

mofaruk avatar Oct 28 '21 04:10 mofaruk

@MOfaruk Thank you, let me try

joe94113 avatar Oct 28 '21 05:10 joe94113

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 avatar Feb 14 '22 16:02 santilorenzo

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.

santilorenzo avatar Feb 14 '22 17:02 santilorenzo