Skip to content

🐛 [firebase_analytics] Android: Does not work with dart only initialization of firebase, ios works #8098

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
neiljaywarner opened this issue Feb 16, 2022 · 19 comments
Labels
platform: android Issues / PRs which are specifically for Android. plugin: analytics resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working type: documentation Improvements or additions to documentation

Comments

@neiljaywarner
Copy link

Expected: Events can be uploaded to Google Analytics
Actual: iOS works, Android does not (even after delay, even with debug enabled, etc)
--- getting E/FA ( 5950): Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI

  • The documentation page for cli has a "? indicating it works but behaviour is different. There is no link explaining that different behaviour means iOS broken
  • Analytics in firebase in my opinion is so common that imho dart only initialization should definitely not be the recommended way until this is fixed.
@neiljaywarner neiljaywarner added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Feb 16, 2022
@neiljaywarner
Copy link
Author

@darshankawar I understand that the docs give a '?' but say 'Indicates your app will build and run but plugin behavior may be different.' but if it doesn't work there should be
1a) a link for the question mark clarifying like hte other question marks
1b) an X for Android since it doesnt' work at all
2) this issue escalated bc flavors and bc analytics very high usage.
see #7639

@darshankawar darshankawar added the triage Issue is currently being triaged. label Feb 17, 2022
@darshankawar
Copy link

@neiljaywarner
Thanks for the report and feedback. I looked at the PR again which fixed the original issue: #7639.

The PR added following section:

Screenshot 2022-02-17 at 4 45 29 PM

Looking at it, analytics for Android is X, but somehow in the CLI document, it shows up as ? which could be the cause of confusion.

Screenshot 2022-02-17 at 4 51 21 PM

Also, not sure, but X in the PR fix also seems to be showing up as ? for other plugin status too.

I'll keep this open for further insights to know if ? need to be updated as X to show clear and correct status.

/cc @pr-Mais since you fixed and added the document part.

@darshankawar darshankawar added plugin: analytics type: documentation Improvements or additions to documentation platform: android Issues / PRs which are specifically for Android. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Feb 17, 2022
@pr-Mais
Copy link
Member

pr-Mais commented Feb 17, 2022

Analytics on Android has issues with Dart-only initialization, but the app compiles that's why the question mark is used instead. Crashlytics has links because there is further platform integration that is required, but in case of Analytics on Android, there isn't any, just fallback to the manual installation temporarily until all issues are resolved.

@krishnashetty0
Copy link

krishnashetty0 commented Feb 28, 2022

Hi, when will Analytics on Android be supported with with Dart-only initialization?
Is there any alternative to Analytics which we can use in Flutter app?

For me only Dart-only initialization works(manual initialisation doesn't work). And I need Analytics, is there any workaround?

@neiljaywarner
Copy link
Author

@darshankawar any update please?

@adg-mh
Copy link

adg-mh commented May 5, 2022

Does anyone know the status on this?

@neiljaywarner
Copy link
Author

@darshankawar the entire table is gone making it seem like everything is fixed, but I think my colleague says that it still doesn't work. any update?

@neiljaywarner
Copy link
Author

@puf @darshankawar @RedBrogdon this should definitely be fixed after i/o announcing flutter is first class citizen with firebase right?

@carlosfiori
Copy link

There is nothing in the new docs about this right?

@darshankawar
Copy link

Please check this new document and see if it helps.

@TheCarpetMerchant
Copy link

@darshankawar The link provided doesn't help.
Personally, I followed this doc and it works perfectly for crashlytics, but not analytics. Which is really weird, honestly.
Moreover, said doc specifies that analytics is supposed to work and need to be amended :
image

@RedBrogdon
Copy link
Contributor

CC @ericwindmill

@Charlinjoeaht
Copy link

I agree to @TheCarpetMerchant. The document says it supports android.
These documentation are confusing. I have not seen any other document. If there are any please share those documents too.

When will you start supporting dart only initialisation?

@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

@darshankawar
Copy link

/cc @Salakar

@kinex
Copy link

kinex commented Jul 14, 2022

I just realized that Analytics has stopped working in my Android production app. I guess it must be related to this "Dart-only" mess. I don't even get any related build warnings, but it just doesn't work anymore.

@pr-Mais So your guidance is to "fallback to the manual installation temporarily until all issues are resolved"? So how is that done? I have already google_services.json file installed as it was earlier. But nothing works still. Should I remove parameters from the await Firebase.initializeApp(options: ...) call or how do I get rid of this "Dart-only" initialization?

Or is it so that the latest version of the Analytics plugin does not support Android at all?

@pr-Mais
Copy link
Member

pr-Mais commented Jul 14, 2022

You need to remove the options from initializeApp in order to use the native Json file.

@russellwheatley
Copy link
Member

Please install the latest FlutterFire CLI (dart pub global activate flutterfire_cli) and run flutterfire configure, it will write the config files for android & iOS. We've experienced issues where some Firebase products still expect the config files to be used during runtime.

You can still also pass in the FiresbaseOptions (needed for web platform) as default Firebase app will always initialize from config files first.

@darshankawar darshankawar added the resolution: solution-provided A solution has been provided in the issue. label Jul 27, 2022
@Charlinjoeaht
Copy link

I have Apps with Flavors. Each flavors has different firebase configuration. Current solution is not working for Apps with Flavors. This solution works only for the app with one android configuration and one ios configuration

@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
platform: android Issues / PRs which are specifically for Android. plugin: analytics resolution: solution-provided A solution has been provided in the issue. type: bug Something isn't working type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests