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

Firebase Admin SDK breaks with some service account keys #2056

Closed
dkbast opened this issue Mar 25, 2024 · 4 comments
Closed

Firebase Admin SDK breaks with some service account keys #2056

dkbast opened this issue Mar 25, 2024 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@dkbast
Copy link
Contributor

dkbast commented Mar 25, 2024

Describe the bug
Apparently the Firebase SDK used by serverpod_auth_firebase_flutter has an issue where some service account keys cannot be read. This bug appsup-dart/firebase_admin#7 and this here appsup-dart/firebase_admin#21 probably describe what is going on.
Finding this solutions was difficult, because it was not clear where the issue was coming from (in this case the admin SDK) - maybe there needs to be a way to prefix log output of dependencies to properly trace issues. This might be possible with Zones.

For me generating the key 3 times did the trick because I came across these issues when diving into the dependencies of the auth package.

To Reproduce
Follow the steps in https://docs.serverpod.dev/concepts/authentication/providers/firebase and create a service account key firebase_service_account_key.json - since this is a flaky bug, you might need to generate a couple of files until you encounter the issue :)

Expected behavior
An error message which tells me that my keyfile could not be read (or an error message which suggests that this could be the case).

Screenshots
image

Serverpod versions

  • CLI Version: 1.2.5
  • Library version: 1.2.5

Platform information
Macos arm64

Additional context
An alternative implementation for the firebase admin sdk could be the implementation by Invertase https://github.com/invertase/dart_firebase_admin

@SandPod SandPod added the documentation Improvements or additions to documentation label Mar 26, 2024
@SandPod
Copy link
Contributor

SandPod commented Mar 26, 2024

Thanks for the report @dkbast!

If I understand the issue correctly, we can't really fix the issue from our side. But what we can do is to improve our documentation so that users are aware of this issue.

Does that sound like an acceptable action based on the bug report?

@dkbast
Copy link
Contributor Author

dkbast commented Mar 26, 2024

Yes - I think mentioning it in the tutorial should be enough, maybe add a reminder in the future to reinvestigate this once either of the firebase SDKs leaves alpha?

@SandPod
Copy link
Contributor

SandPod commented Jul 22, 2024

We no longer depend on the firebase_admin package. We never got around to updating the documentation but my question is if this could be closed now instead?

@dkbast
Copy link
Contributor Author

dkbast commented Jul 22, 2024

If you no longer depend upon the this package this can probably be closed, as it was mostly an upstream issue :)

@dkbast dkbast closed this as completed Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants