Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

GoogleException in ClientTrait.php line 114: Given keyfile path does not exist on heroku #12

Closed
wapnen opened this issue Apr 6, 2017 · 6 comments

Comments

@wapnen
Copy link

wapnen commented Apr 6, 2017

everything works fine on my local server however when i deploy to heroku i get the following error "GoogleException in ClientTrait.php line 114:
Given keyfile path does not exist"

i do not want to add my key file to git for security reasons. how else do i upload the key file to heroku and set the path ?

@wapnen wapnen changed the title GoogleException in ClientTrait.php line 114: Given keyfile path does not exist GoogleException in ClientTrait.php line 114: Given keyfile path does not exist on heroku Apr 6, 2017
@wapnen
Copy link
Author

wapnen commented Apr 7, 2017

UPDATE: ive found a way to set the key file as a config variable in heroku, however the contents exceed the character limit of 255. any way to change the limit?

@matthewgoslett
Copy link
Contributor

I can't really advise on how this should work with Heroku.

As a general principle, have the key (or secret) deployed to the server or container.
Set the GOOGLE_APPLICATION_CREDENTIALS env var to the path of that key file.

@rslhdyt
Copy link

rslhdyt commented Sep 26, 2017

this problem happened to me, when applications run in continous integrations for build and testing purpose. I get same error exceptions like @wapnen

"GoogleException in ClientTrait.php line 114: Given keyfile path does not exist"

@hosquiat
Copy link

hosquiat commented May 4, 2018

Where are you supposed to place this json. No matter where I place it, it can't be found.

@rensphilipsen
Copy link

Same problem as @sogeniusio. Any solution?

@rensphilipsen
Copy link

As I am using Laravel Homestead with Vagrant, I had to put the .json within the VM of Laravel Homestead.

So make sure you have this json on your VM instead of your local machine and specify the path to the file based on your VM (in my case: /home/vagrant/service-account.json)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants