-
Notifications
You must be signed in to change notification settings - Fork 370
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
STORAGE_EMULATOR_HOST getting TypeError: Only HTTP(S) protocols are supported #2158
Comments
Hi @Ridermansb the recommendation currently is to use |
Hey @ddelgrosso1 .. I tried as well.. get the same results :( |
@Ridermansb I setup and ran some tests against the Firebase emulator today. Unfortunately I did not get any errors. The code I used is below: const s = new Storage({projectId: 'MY-PROJECT', apiEndpoint: 'http://127.0.0.1:9199'});
const b = s.bucket("gs://MY-PROJECT.appspot.com")
const f = b.file('MY-FILE');
async function testLargeResumable() {
try {
await f.save("hell world", {
public: true,
metadata: {
cacheControl: "public, max-age=31536000",
metadata: {
someThing: 'http://blah.com'
}
}}); Is there any other information that might be helpful in debugging / reproducing this? |
Going to close this as I am unable to reproduce locally. If more information on recreating this becomes available please feel free to reopen with the additional info. |
At least in my case, root cause appears to be that the storage library is passing the IP address into the protocol property when it calls Like OP, this happens even when using the
|
I solved this issue by changing the environment variable of STORAGE_EMULATOR_HOST to use http
|
To reproduce it's simple.
If you run the API under HTTP, you will not be able to reproduce it. |
I have my firebase local emulator running with storage on port 9199
I set the
STORAGE_EMULATOR_HOST=localhost:9199
I initialize my cloud storage as this..
When I tried to upload the file to my local storage emulator using this code..
I'm getting this error:
Some environment variables are set
The text was updated successfully, but these errors were encountered: