-
Notifications
You must be signed in to change notification settings - Fork 916
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
Populate FIREBASE_CONFIG environment variable for scripts executed via emulators:exec
#5536
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hey, I just updated our dependencies from v3 to v4 and we are seeing the same. Is there any way we can help? @ReonaN could you solved it? |
@unxavi Not yet. |
@ReonaN @unxavi Thanks for surfacing the issue. Can I ask under what setting you are running your code? I can think of 2 situations where FIREBASE_CONFIG will be populated:
In other situations, I can see that |
hi @taeold for me this happening when running my tests on the Firebase emulator suite. however with the version 3 of firebase functions it's there, but when updating to version 4, I have a piece of code complaining that's undefined.
we are hitting the line
i'm running the tests with the following command:
|
@unxavi Thanks for sharing more detail. I inspected the code we removed in v3 → v4 unintentionally populated Now I recognized that this behavior has existed for a long time, and I don't think breaking your setup is okay. I'm going to propose that Firebase CLI always injects In the meantime, if Stay tuned on a longer term fix for this issue! |
emulators:exec
Related issues
no
[REQUIRED] Version info
node: 16.18.0
firebase-functions: 4.2.0
firebase-tools: 11.15.0
firebase-admin: 11.2.0
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
I upgraded firebase-functions from v3.24.1 to v4.2.0.
After upgrading this package, I had an error in testing, and I noticed
FIREBASE_CONFIG
is missing.There are console logs after running the above test case.
Also, I successfully got the
GCLOUD_PROJECT
environment variable.[REQUIRED] Expected behavior
We can get the
FIREBASE_CONFIG
environment variable after initializing an app.[REQUIRED] Actual behavior
FIREBASE_CONFIG
environment variable is missing.We got
undefined
when we referred toprocess.env.FIREBASE_CONFIG
.Were you able to successfully deploy your functions?
yes
The text was updated successfully, but these errors were encountered: