berkayk / laravel-onesignal

OneSignal Push Notifications for Laravel
506 stars 176 forks source link

Argument 4 passed to Berkayk\OneSignal\OneSignalClient::Berkayk\OneSignal\{closure}() must be an instance of GuzzleHttp\Exception\RequestException or null, instance of GuzzleHttp\Exception\ConnectException given, called in RetryMiddleware.php on line 101 #141

Closed jsd21 closed 4 years ago

jsd21 commented 4 years ago

Current Versions of the packages being used

Laravel 8.6.0 onesignal-laravel 1.0.6 Php 7.4 Guzzle 7.0.1

namespace App\Http\Controllers\v2;

use App\Http\Controllers\Controller; use Carbon\Carbon; use OneSignal;

class TestController extends Controller { public function dispatchNotificationToUser() { OneSignal::addParams(['priority' => 10])->sendNotificationToAll( "Some Message", $url = null, $data = null, $buttons = null, $schedule = Carbon::now()->addMinutes(1) );

    return response('Sent');
}

}

Screenshot 2020-09-29 at 10 52 14 PM

MostafaRabia commented 3 years ago

How to fix it?