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

Failed to parse json credential #814

Open
Yangeok opened this issue Sep 25, 2024 · 0 comments
Open

Failed to parse json credential #814

Yangeok opened this issue Sep 25, 2024 · 0 comments

Comments

@Yangeok
Copy link

Yangeok commented Sep 25, 2024

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

  • For issues related to the code in this repository file a GitHub issue.
  • If the issue pertains to Cloud Firestore, report directly in the
    Python Firestore GitHub repo. Firestore
    bugs reported in this repo will be closed with a reference to the Python Firestore
    project.
  • 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 Sonoma 14.3.1
  • Firebase SDK version: 6.5.0
  • Firebase Product: auth
  • Python version: 3.11.0
  • Pip version: 24.0

[REQUIRED] Step 3: Describe the problem

When calling firebase_admin.credentials.Certificate, occurred error OSError, which used not credential file path, but parsed json dictionary. I expect returning function _is_file_path False if used parameter as dictionary.

Steps to reproduce:

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Relevant Code:

# firebase_admin/credentials.py
def _is_file_path(path):
    try:
        path_obj = pathlib.Path(path)
        return True
    except TypeError:
        return False
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

2 participants