-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such file or directory for service account json #7
Comments
Possible solution is to use base_path() in the config file:
|
Sorry for the late reply! This is probably something that I should investigate in the main SDK - it seems to be a Windows issue, I just tried it with a relative path like yours, and it works on my machine(™). |
After having begun to implement GitHub Actions, I can now confirm the issue 🎉 (see e.g. https://github.com/kreait/firebase-php/runs/378003314). As soon as I have finished the GitHub Actions setup, I will look for a way to fix the problem. 🤞 Update: I can confirm that there is an issue 😅, it's not the same as you described :) |
Modifying the config file doesn't help. Currently, the only way to make it work is to specify the full path in the |
@chimit @ulver2812 Could you please try the two following alternatives?
or
Please also make sure that, if on Windows, you use |
Both don't work. Apparently, this |
It's not - (or) have you step-debugged the package's service provider to be able to see what the issue is/that this is the issue? |
Ah, sorry! My mistake! Just realized that I forgot to apply config in the $app->configure('firebase'); So yes, this config works: 'credentials' => [
'file' => base_path(env('FIREBASE_CREDENTIALS')), |
Yes, apparently, it's working with Lumen 6.3. Just want to finish push notifications to make sure there are no other problems. Will confirm it separately on that issue page. Thanks a lot! 👍 |
Hi @jeromegamez, sorry for the late reply (I didn't receive the github notification).
On Windows it works, I didn't investigate further... |
@ulver2812 I updated Lumen instructions (#11). Do we need to add |
Unfortunately, it's not as easy. So, while this might work on your local machine, where you put the service account file in the project directory, it might break on a production machine where the file could be outside the project directory. Also, on one machine you could be on Windows, on the other on Linux... I'll try to come up with something, but I need it to be a stable solution 😅 |
So, at the end the best thing to do is to use absolute paths 🤷♂️ |
Could you please check out and try #13 to see if this works for you on Windows? |
Sorry but I can't check right now, I will try as soon as possible. Thanks |
Using absolute paths is not very convenient when you deploy your project to many environments or change them. As for me, a relative path should be a default. |
It's been long enough, I will merge #13 and if something doesn't work, someone will let me know for sure :) |
If somebody of you guys is still having this issue in Laravel 5.8. You can use the php function
|
Hi,
I'm trying to use this package but I get this error:
I set the firebase service account json path in the env file in this way
FIREBASE_CREDENTIALS=google-service-account.json
and
FIREBASE_CREDENTIALS=/google-service-account.json
but it doesn't work, I'm trying to run this code in a HTTP Controller class
FirebaseAuth::listUsers();
The google-service-account.json file is in the Laravel project root folder along with composer.json etc.
What's the issue ?
Thanks
UPDATE: I'm on windows 10 and if I give the full path like so
FIREBASE_CREDENTIALS="C:\\xampp\\htdocs\\my-laravel-app\\google-service-account.json"
It works, how do I make it work with relative path ?
The text was updated successfully, but these errors were encountered: