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

fix: add underlyingException to FirebaseJsonException when projectId or appId are missing #364

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Leedwon
Copy link

@Leedwon Leedwon commented Jan 16, 2025

Description

This is a follow up to #354. It improves the error message for misconfigured firebase.json file.

  • feat -- New feature (non-breaking change which adds functionality)
  • 🛠️ fix -- Bug fix (non-breaking change which fixes an issue)
  • ! -- Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 refactor -- Code refactor
  • ci -- Build configuration change
  • 📝 docs -- Documentation
  • 🗑️ chore -- Chore

@CLAassistant
Copy link

CLAassistant commented Jan 16, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the Needs Attention OP created or responded to issue and it needs attention. label Jan 16, 2025
@Leedwon
Copy link
Author

Leedwon commented Jan 16, 2025

Hi @russellwheatley, I’ve opened a PR for the small improvement we discussed in #354. While testing it locally in my Flutter app, I noticed the underlyingException != null ? '' : underlyingException condition seemed inverted, so I fixed it in a7b0a4f.

However, even with this fix, I couldn't see the exception when building my app. I followed the README and ran dart pub global activate --source="path" . --executable="flutterfire" --overwrite in my fork but still no luck. I also tried using dependency_overrides in my app without success. Could you point me in the right direction on how to properly use the local flutterfire_cli version in my project?

@@ -313,7 +313,10 @@ class UploadCrashlyticsSymbols extends FlutterFireCommand {
}

if (projectId == null || appId == null) {
throw FirebaseJsonException();
final underlyingException =
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also thinking about adding a separate message for a case when both projectId and appId is missing, but I'm not sure if it's needed - worst case user will first see projectId is missing and then appId is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention OP created or responded to issue and it needs attention.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants