kreait / laravel-firebase

A Laravel package for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
1.05k stars 169 forks source link

Not Send Push Notification #26

Closed ketanmprajapati closed 4 years ago

ketanmprajapati commented 4 years ago

Hello Kreait i have setup all the thing but i got error like

Kreait\Firebase\ServiceAccount\Discovery\FromEnvironmentVariable: The environment variable \"FIREBASE_CREDENTIALS\" is not set.\nKreait\Firebase\ServiceAccount\Discovery\FromEnvironmentVariable: The environment variable \"GOOGLE_APPLICATION_CREDENTIALS\" is not set.\nKreait\Firebase\ServiceAccount\Discovery\FromGoogleWellKnownFile: The well known file is not readable or invalid\ncURL error 6: Could not resolve host: metadata.google.internal; Unknown error (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

can you please give me some solution.

jeromegamez commented 4 years ago

Please read the README of the library and the contents of the error: You need to define the variable FIREBASE_CREDENTIALS in your .env file and set it to the path to your credentials file.

ketanmprajapati commented 4 years ago

Dear jeromegamez I have already defined the variable on .env file and give to the path for my credentials file but still, I got the same error tempsnip

And Also can you please give some sample demo for firebase_credentials.json file..? And I have put firebase_credentials.json file on /public_html/Project_Name/Folder_Name/Firebase.json

jeromegamez commented 4 years ago

Based on the only information you gave me, this is the only solution I can give you.

Without real code, file names and file paths I can only guess what the problem might be. What is the code you‘ve written that caused the error? Have you changed Firebase related settings?