arbaaz khan
arbaaz khan

Reputation: 23

Pusher\Pusher::__construct(): Argument #1 ($auth_key) must be of type string, null given,

i have cloned my project from github when i try to composer install on laragon terminal i get this following error

Pusher\Pusher::__construct(): Argument #1 ($auth_key) must be of type string, null given

my php these are my versions

"require": {
    "php": "^8.0",
    "guzzlehttp/guzzle": "^7.0.1",
    "hisorange/browser-detect": "^5.0",
    "laravel/framework": "^10.0",
    "laravel/sanctum": "^3.3",
    "laravel/tinker": "^2.0",
    "maatwebsite/excel": "^3.1",
    "pusher/pusher-php-server": "^7.2",
    "stancl/tenancy": "^3.4"
},

i tried composer update and composer dump-autoload i want to have all the dependices for my project please help

Upvotes: 2

Views: 5120

Answers (2)

Chan Yung Keat
Chan Yung Keat

Reputation: 715

In my case, it was because I commented out PUSHER_APP_ID, PUSHER_APP_KEY and PUSHER_APP_SECRET in my .env file, adding them back (even without value) solved the issue.

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=

Upvotes: 0

James
James

Reputation: 16339

Somewhere you are using the Pusher library and it is likely loaded as part of a service provider or something.

Whatever .env variable you have for Pusher is missing, which is causing the value to be null rather than a string.

If you add the values to your .env file, it should make the error go away.

Below is an example of what I mean you should add:

PUSHER_APP_ID=xxx
PUSHER_KEY=xxx
PUSHER_SECRET=xxx

Upvotes: 2

Related Questions