I got this error for some minutes and them all start to working again, but I think it makes sense to inform you anyway:
TypeError: Kreait\Firebase\Messaging::Kreait\Firebase{closure}(): Argument #1 ($reason) must be of type GuzzleHttp\Exception\RequestException, GuzzleHttp\Exception\ConnectException given, called in /app/vendor/guzzlehttp/promises/src/EachPromise.php on line 183 and defined in /app/vendor/kreait/firebase-php/src/Firebase/Messaging.php:100
### Steps to reproduce the issue.
The notification that was sent is a Queueable notification that implements the ShouldQueueAfterCommit interface:
```php
public function toFcm(): FcmMessage
{
return (new FcmMessage(notification: new FcmNotification(
title: 'Nova Proposta de Parceria',
body: "Você recebeu uma nova proposta da marca {$this->data['company_name']}. Veja os detalhes agora.",
)))
->data([
'company_name' => $this->data['company_name'],
'influencer_id' => $this->data['influencer_id'],
])
->custom([
'android' => [
'notification' => [
'color' => '#0A0A0A',
],
'fcm_options' => [
'analytics_label' => 'analytics',
],
],
'apns' => [
'fcm_options' => [
'analytics_label' => 'analytics',
],
],
]);
}
Error message/Stack trace
TypeError: Kreait\Firebase\Messaging::Kreait\Firebase\{closure}(): Argument #1 ($reason) must be of type GuzzleHttp\Exception\RequestException, GuzzleHttp\Exception\ConnectException given, called in /app/vendor/guzzlehttp/promises/src/EachPromise.php on line 183 and defined in /app/vendor/kreait/firebase-php/src/Firebase/Messaging.php:100
Stack trace:
#0 /app/vendor/guzzlehttp/promises/src/EachPromise.php(183): Kreait\Firebase\Messaging->Kreait\Firebase\{closure}(Object(GuzzleHttp\Exception\ConnectException), 2, Object(GuzzleHttp\Promise\Promise))
#1 /app/vendor/guzzlehttp/promises/src/Promise.php(209): GuzzleHttp\Promise\EachPromise->GuzzleHttp\Promise\{closure}(Object(GuzzleHttp\Exception\ConnectException))
#2 /app/vendor/guzzlehttp/promises/src/Promise.php(158): GuzzleHttp\Promise\Promise::callHandler(2, Object(GuzzleHttp\Exception\ConnectException), NULL)
#3 /app/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#4 /app/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(163): GuzzleHttp\Promise\TaskQueue->run()
#5 /app/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(189): GuzzleHttp\Handler\CurlMultiHandler->tick()
#6 /app/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Handler\CurlMultiHandler->execute(true)
#7 /app/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
#8 /app/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending()
#9 /app/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList()
#10 /app/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
#11 /app/vendor/guzzlehttp/promises/src/EachPromise.php(109): GuzzleHttp\Promise\Promise->wait()
#12 /app/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Promise\EachPromise->GuzzleHttp\Promise\{closure}(true)
#13 /app/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn()
#14 /app/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending()
#15 /app/vendor/kreait/firebase-php/src/Firebase/Messaging.php(109): GuzzleHttp\Promise\Promise->wait()
#16 /app/vendor/kreait/firebase-php/src/Firebase/Messaging.php(83): Kreait\Firebase\Messaging->sendAll(Array, false)
#17 /app/vendor/laravel-notification-channels/fcm/src/FcmChannel.php(46): Kreait\Firebase\Messaging->sendMulticast(Object(Kreait\Firebase\Messaging\CloudMessage), Object(Kreait\Firebase\Messaging\RegistrationTokens))
#18 [internal function]: NotificationChannels\Fcm\FcmChannel->NotificationChannels\Fcm\{closure}(Object(Illuminate\Support\Collection), 0)
#19 /app/vendor/laravel/framework/src/Illuminate/Collections/Arr.php(605): array_map(Object(Closure), Array, Array)
#20 /app/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(777): Illuminate\Support\Arr::map(Array, Object(Closure))
#21 /app/vendor/laravel-notification-channels/fcm/src/FcmChannel.php(46): Illuminate\Support\Collection->map(Object(Closure))
Describe the bug
I got this error for some minutes and them all start to working again, but I think it makes sense to inform you anyway:
TypeError: Kreait\Firebase\Messaging::Kreait\Firebase{closure}(): Argument #1 ($reason) must be of type GuzzleHttp\Exception\RequestException, GuzzleHttp\Exception\ConnectException given, called in /app/vendor/guzzlehttp/promises/src/EachPromise.php on line 183 and defined in /app/vendor/kreait/firebase-php/src/Firebase/Messaging.php:100
https://github.com/kreait/firebase-php/blob/7.x/src/Firebase/Messaging.php#L100
The reject callback received a
ConnectException
instead of aRequestException
Installed packages
PHP version and extensions
Error message/Stack trace