2

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

1
  • Have you tried to comment/ask author on GitHub? Commented Feb 20, 2024 at 11:26

2 Answers 2

5

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
Sign up to request clarification or add additional context in comments.

4 Comments

but as i mentioned i am cloning this project and these values are blank in my .env.example file ,Is it something related to my composer version ?@james
Blank values are null, I believe. Can you put a value against them in your .env file. Also, have you copied the .env.example into your .env file?
Yes, this was the problem, and it got solved. Thanks!
That's great @arbaazkhan. Please accept and upvote the answer so others know this was the solution.
0

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=

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.