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

Method Not implemented #707

Closed
elhe26 opened this issue Jun 10, 2023 · 3 comments
Closed

Method Not implemented #707

elhe26 opened this issue Jun 10, 2023 · 3 comments
Assignees

Comments

@elhe26
Copy link

elhe26 commented Jun 10, 2023

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

This error is happening while using storage from firebase_admin

[REQUIRED] Step 2: Describe your environment

  • Operating System version: MacOS 13.4
  • Firebase SDK version: 6.1.0
  • Firebase Product: storage
  • Python version: 3.11
  • Pip version: 23.1.2

[REQUIRED] Step 3: Describe the problem

I'm using firebase-tools and I have configured STORAGE_EMULATOR_HOST=http://localhost:9199 but I'm getting this error:

google.api_core.exceptions.MethodNotImplemented: 501 POST http://localhost:9199/storage/v1/b?project=test-dev&prettyPrint=false: Not Implemented

Steps to reproduce:

I executed the code below.

Relevant Code:

from firebase_admin import firestore
from firebase_admin import storage
from firebase_admin.exceptions import NotFoundError, ConflictError

# Cloud Storage Instantiation

BUCKET_NAME = "administrative"
bucket = storage.bucket(BUCKET_NAME)

if not bucket.exists():
    try:
        bucket.create()
        bucket.labels = {
            "type": "internal",
            "name": "administrative",
        }
    except NotFoundError:
        print("Not Found Error")
    except ConflictError:
        print("Conflict Error")
@lahirumaramba
Copy link
Member

Could you try setting STORAGE_EMULATOR_HOST to 127.0.0.1:9199?

@jonathanedey
Copy link
Contributor

Closing due to inactivity. Please open a new issue if you are still facing problems.

@falk-stefan
Copy link

falk-stefan commented Oct 16, 2024

I can confirm that it works with

STORAGE_EMULATOR_HOST=http://127.0.0.1:9199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants