-
Notifications
You must be signed in to change notification settings - Fork 285
FIREBASE_STORAGE_EMULATOR_HOST Environment Variable does not work with Admin SDK #874
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
Comments
To use the firebase storage emulator with the admin sdk use |
@marknesh this does not work for me. I've set STORAGE_EMULATOR_HOST to |
Looks like this PR allows setting the host explicitly #826 |
@marknesh that ENV var doesn't work either, but thanks
…On Fri, Jan 31, 2025 at 2:56 PM marknesh ***@***.***> wrote:
@JaredEzz <https://github.com/JaredEzz> The docs were updated to use export
FIREBASE_STORAGE_EMULATOR_HOST="127.0.0.1:9199"
See the docs
<https://firebase.google.com/docs/emulator-suite/connect_storage#node.js-admin-sdk>
—
Reply to this email directly, view it on GitHub
<#874 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIQLIP5AIJDKFYOX3BR4C32NPWPLAVCNFSM6AAAAABWDWSUAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRYGQ3DKNZYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Looking at firebase/firebase-tools#3508 and googleapis/java-storage#875, there is currently no storage emulator support for googleapis/java-storage. Setting the host through I suggest raising your request in firebase/firebase-tools#3508. |
My environment:
The problem:
When setting the environment variable "FIREBASE_STORAGE_EMULATOR_HOST" to 127.0.0.1:9199 (the default Storage Emulator Port and IP) to use the Firebase Storage Emulator the Admin SDK does not detect this environment variable.
Other Environment variables such as "FIREBASE_DATABASE_EMULATOR_HOST" and "FIRESTORE_EMULATOR_HOST" do work perfectly fine and as expected. They make a connection to emulators on the device.
I have gone as far to test and see if this issue is persistent on other Admin SDK's such as the Node.Js SDK. It is NOT an issue that persists on the SDK for Node.js.
As see here, this was previously an issue filed for the Firebase Admin SDKin the GO Repository for the Admin SDK (see here) and was fixed here (see here) and has been since claimed to be fixed and the logic used in the Node Admin SDK project will be implemented.
The same issue previously on the Go Repo, appears to be present on the Admin Java SDK. Even using the "STORAGE_EMULATOR_HOST" environment variable as it was changed to in the GO repo, does not work.
Documentation on the Firebase Admin SDK docs is also incorrect if this is the case.
Steps to reproduce:
Set either environment variable "STORAGE_EMULATOR_HOST" or "FIREBASE_STORAGE_EMULATOR_HOST" to your Emulator host address and port (the default is 127.0.0.1:9199)
Use the Java Admin SDK to try and make a call like normal.
See it fail and use the production Cloud Storage instance.
Relevant Code:
Environment Variable Set via Intellij Run Configuration
The text was updated successfully, but these errors were encountered: