Skip to content
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 longer works on the heroku-16 stack #2

Open
hult opened this issue Oct 29, 2019 · 8 comments
Open

No longer works on the heroku-16 stack #2

hult opened this issue Oct 29, 2019 · 8 comments

Comments

@hult
Copy link

hult commented Oct 29, 2019

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).

@elishaterada
Copy link
Owner

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

@hult
Copy link
Author

hult commented Oct 29, 2019

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

@sineraves
Copy link

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.

@mlennie
Copy link

mlennie commented Jan 29, 2020

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

@amille14
Copy link

amille14 commented Jan 30, 2020

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'

@sineraves
Copy link

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.

@amille14
Copy link

amille14 commented Feb 1, 2020

@heavyperil that worked for me as well, thanks!

@elishaterada
Copy link
Owner

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.

jrobsontull added a commit to jrobsontull/heroku-google-application-credentials-buildpack that referenced this issue Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants