firebase-admin-java icon indicating copy to clipboard operation
firebase-admin-java copied to clipboard

Connect to Firebase Storage Emulator?

Open ScottPierce opened this issue 4 years ago • 8 comments

[READ] Step 1: Are you in the right place?

  • For issues or feature requests related to the code in this repository file a Github issue.
    • If this is a feature request make sure the issue title starts with "FR:".
  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Operating System version: MacOS 10.15.7
  • Firebase SDK version: latest
  • Library version: 7.3.0
  • Firebase Product: Storage

[REQUIRED] Step 3: Describe the problem

I'm using this library and I'm trying to use the environment variable FIREBASE_STORAGE_EMULATOR_HOST to get it to point to the local emulator that I'm running. It doesn't seem to work. However, when I search for FIREBASE_STORAGE_EMULATOR_HOST in this project, I can't seem to find it either. The documentation lead me to believe that I can manipulate the SDK to use the emulator by setting this environment variable, but that doesn't seem to be the case for Java.

  1. Can someone confirm this?
  2. How should I be connecting my development server to the storage emulator? I detail how I tried to use the google cloud storage sdk to do that and failed here: https://github.com/googleapis/java-storage/issues/875

ScottPierce avatar Jun 13 '21 22:06 ScottPierce

This is how the Node.js Admin SDK does it: https://github.com/firebase/firebase-admin-node/blob/bf959e31ef0e04f7039db1c8f41c2fb70605757f/src/storage/storage.ts#L61

You should be able to do the same in Java by manually setting the STORAGE_EMULATOR_HOST environment variable.

hiranya911 avatar Jul 02 '21 21:07 hiranya911

@hiranya911 I don't see this environment variable used anywhere in the project - https://github.com/firebase/firebase-admin-java/search?q=STORAGE_EMULATOR_HOST

What is your confidence level that this will work?

ScottPierce avatar Jul 09 '21 05:07 ScottPierce

That's an environment variable supported by the google-cloud-storage library.firebase-admin-java doesn't have any Storage implementation code.

Update: It looks like only the Node.js Storage client supports the emulator as of now. Java and other languages do not support it at all.

hiranya911 avatar Jul 09 '21 16:07 hiranya911

@hiranya911 Is there any updated news regarding this?

ScottPierce avatar Jan 23 '22 15:01 ScottPierce

@hiranya911 the PR https://github.com/firebase/firebase-admin-java/pull/523 and the issue https://github.com/firebase/firebase-admin-java/issues/452 lead me to believe otherwise. Can you state whether this is a feature you, or more specifically the Admin SDK, support?

mitschwimmer avatar Jan 25 '22 16:01 mitschwimmer

The Admin Java SDK currently does not support the storage emulator. Please refer to the Admin SDK emulator availability for more information. We do not currently have immediate plans to add storage support. I will update this issue if there are any updates.

@mitschwimmer You are correct, the Admin Java SDK supports the Auth emulator since the v7.2.0 release. Looks like it is missing from the above availability matrix. We will get that page updated soon. Thanks!

lahirumaramba avatar Jan 25 '22 18:01 lahirumaramba

This is out of date. Java supports Auth Emulator now.

On Tue, Jan 25, 2022 at 1:05 PM Lahiru Maramba @.***> wrote:

The Admin Java SDK currently does not support the storage emulator. Please refer to the Admin SDK emulator availability https://firebase.google.com/docs/emulator-suite/install_and_configure#admin_sdk_availability for more information. We do not currently have immediate plans to add storage support. I will update this issue if there are any updates.

@mitschwimmer https://github.com/mitschwimmer You are correct, the Admin Java SDK supports the Auth emulator since the v7.2.0 release. Looks like it is missing from the above availability matrix. We will get that page updated soon. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/firebase/firebase-admin-java/issues/570#issuecomment-1021464687, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUWAIU7SXPAFBIK4SGLNTUX3Q4XANCNFSM46UEJTIA . You are receiving this because you authored the thread.Message ID: @.***>

ScottPierce avatar Jan 25 '22 19:01 ScottPierce

Any updates on this issue? We would like to use the Storage Emulator in our project.

cvb941 avatar Feb 10 '23 17:02 cvb941