heroku-google-application-credentials-buildpack
heroku-google-application-credentials-buildpack copied to clipboard
No longer works on the heroku-16 stack
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).
What if I split this repo into another one supporting Heroku-16 with a commit before merging #1 ?
I solved it for me by upgrading to heroku-18, so not for my sake. :)
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
.
any update on this? I'm also getting contents of .profile.d/google-credentials.sh is echo > /app/google-credentials.json
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'
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.
@heavyperil that worked for me as well, thanks!
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.