heroku-google-application-credentials-buildpack icon indicating copy to clipboard operation
heroku-google-application-credentials-buildpack copied to clipboard

No longer works on the heroku-16 stack

Open hult opened this issue 5 years ago • 8 comments

A few days ago, #1 was merged, and the compile script uses the syntax ${GOOGLE_CREDENTIALS@Q} which was introduced in bash 4.4.

The heroku-16 stack has bash 4.3.48, so this buildpack no longer works there (but on heroku-18 it works fine).

hult avatar Oct 29 '19 09:10 hult

What if I split this repo into another one supporting Heroku-16 with a commit before merging #1 ?

elishaterada avatar Oct 29 '19 17:10 elishaterada

I solved it for me by upgrading to heroku-18, so not for my sake. :)

hult avatar Oct 29 '19 19:10 hult

This was not solved by upgrading to heroku-18 for us.

The contents of .profile.d/google-credentials.sh is echo > /app/google-credentials.json.

sineraves avatar Oct 30 '19 10:10 sineraves

any update on this? I'm also getting contents of .profile.d/google-credentials.sh is echo > /app/google-credentials.json

mlennie avatar Jan 29 '20 23:01 mlennie

I believe I'm running into the same issue as others here on heroku-18. I'm seeing this in the heroku logs indicating that the file is created in the wrong directory:

Error: The file at google-credentials.json does not exist, or it is not a file. ENOENT: no such file or directory, lstat '/app/server/google-credentials.json'

amille14 avatar Jan 30 '20 04:01 amille14

We ended up resolving this without a buildpack.

We stored our raw credentials JSON in a GOOGLE_CREDENTIALS environment variable, and then added a .profile file to the root of our repository, containing:

echo ${GOOGLE_CREDENTIALS} > /app/google-credentials.json

Code in the .profile file is run on container startup, and will create /app/google-credentials.json with the contents of GOOGLE_CREDENTIALS at that time.

sineraves avatar Jan 30 '20 11:01 sineraves

@heavyperil that worked for me as well, thanks!

amille14 avatar Feb 01 '20 16:02 amille14

I probably won't update this repo since different solutions seem to work for different people and their respective Heroku stack versions.

I encourage forking or finding another solution since the repo itself only contains a few lines of code.

elishaterada avatar Mar 15 '20 04:03 elishaterada