Skip to content

[📚] What to use if a Firebase product is not supported by Dart-only initialization on Android #8778

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

Closed
georges-ph opened this issue May 26, 2022 · 4 comments
Labels
good first issue Good for newcomers plugin: analytics plugin: performance resolution: solution-provided A solution has been provided in the issue. type: documentation Improvements or additions to documentation type: question A question where further information is requested

Comments

@georges-ph
Copy link

Okay so I wanted to add Performance Monitoring to my Android app. But the app was crashing before even launching.
I followed this to add it. I used to follow guides on firebase.flutter.dev but it was redirecting to firebase.google.com.
A few days later, firebase.flutter.dev wasn't redirecting anymore It was opening as normal but it's showing the page archived notice. But in that page there was a caution saying:

Dart-only initialization is currently not supported with firebase_performance on Android, please follow the Platform Setup section from the manual installation guide.

This is not shown on firebase.google.com/docs/perf-mon/flutter/get-started.

So I removed the performance dependency from by app because I've already initialized the app with dart so why to manually initialize it? But now I want to add Firebase Analytics. No page is showing the previous caution. I've added the dependency normally and the app ran normally. But I'm getting Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI error message in the console. And I still cannot see any data in the analytics dashbord. I found some issues here with the same error message. And I guess the solution is to go with the manual installation which FlutterFire does not recommend as stated here.

My question is: If I need to add some firebase products that are not supported with Dart, should I not use the dart-only initialization at all and just use the manual installation for everything? or should I do both?

Sorry for the long story but I think it was worth it. There is nothing clear.

@georges-ph georges-ph added good first issue Good for newcomers type: documentation Improvements or additions to documentation labels May 26, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label May 26, 2022
@darshankawar
Copy link

I think the documentation was updated using this PR : https://github.com/firebase/flutterfire/pull/8167/files#diff-05306871b6455e35b29d52cc9f3abfe3c03eec90d8da9156c7b0c8d6953ba833 but I think the confusion is that this information is not available in the newly migrated firebase.google.com domain.

I knew that before 3.0, there were some plugins like performance-monitoring, analytics which didn't support dart-only initialization, but I am not sure if this situation has changed after 3.0 or not. Since you and another issue reporter have raised same / similar issue regarding which plugins are supported by dart-only initialization and which are not, the same is not documented in firebase.google.com.

Same issue was raised #8767
Another similar issue for your reference: #8098

Keeping this issue open and labeling for further insights from team. I'll try to raise this with team for their attention.

@darshankawar darshankawar added plugin: analytics plugin: performance type: question A question where further information is requested and removed triage Issue is currently being triaged. labels May 26, 2022
@PaulRudin
Copy link

This is perhaps also relevant for the appcheck debug provider. This requires fiddling around with kotlin and swift sources, and it's really not clear from the docs (to me at least), how this interacts with configuring the firebase app in flutter dart sources.

https://firebase.google.com/docs/app-check/flutter/debug-provider
https://firebase.google.com/docs/app-check/ios/debug-provider
https://firebase.google.com/docs/app-check/android/debug-provider#kotlin+ktx

@Charlinjoeaht
Copy link

@darshankawar Please ask the team to fix this issue to support Dart-only initialisation on Android as soon as possible

If there are any workaround without going for manual installations, they are welcome too. This is really taking out our time

@russellwheatley
Copy link
Member

If you run flutterfire configure in your project directory, it will automatically write your android & iOS config files to the relevant directory for each platform. So there are no manual steps left.

@darshankawar darshankawar added the resolution: solution-provided A solution has been provided in the issue. label Jul 27, 2022
@firebase firebase locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers plugin: analytics plugin: performance resolution: solution-provided A solution has been provided in the issue. type: documentation Improvements or additions to documentation type: question A question where further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants