fcm icon indicating copy to clipboard operation
fcm copied to clipboard

Some of my notification show me errors

Open depixedprojects opened this issue 4 years ago • 2 comments

I am getting this error for notification. I followed all the step. and worked for some of my notification.

 return FcmMessage::create()
        // ->setData([
        //     'status' => $status,
        //     'link' => $link,
        //     'id' => $id,
        // ])
            ->setNotification(\NotificationChannels\Fcm\Resources\Notification::create()
                    ->setTitle($subject)
                    ->setBody($body)
                    ->setImage($icon));

Screenshot 2020-06-19 at 3 45 40 PM

depixedprojects avatar Jun 19 '20 10:06 depixedprojects

Looks like I have been, maybe the error in mothed routeNotificationForFcm() on User model: public function routeNotificationForFcm() { return $this->deviceFCMs()->pluck('token')->toArray(); //or return 'string token'; }

khacnha avatar Jun 30 '20 08:06 khacnha

The reason for this error is Passing of integer value.

The text in the error (TYPE_STRING), 121 describes that error is due to value integer 121 (while it is expecting a string) in your data somewhere. When you convert the value in string, it won't occur.

This is most likely due to data in FCM accepts string only.

nikhilbhatia22 avatar Jul 12 '20 12:07 nikhilbhatia22