Open creativecreatorormaybenot opened 3 years ago
@creativecreatorormaybenot Thanks for reporting this issue. I'll take a look and hopefully send out a fix today.
Hi @creativecreatorormaybenot ,
Thank you for your report! Since this issue was opened, the implementation details have changed significantly. If you feel that this issue is still relevant, please feel free to open a new issue with updated context. We appreciate your understanding and support.
Bug report
The recent change by @yalunqin to introduce web support (see https://github.com/FirebaseExtended/flutterfire/pull/6920) introduced a (for us severe actually) regression that does not allow you to use Firebase performance on startup anymore.
What we did before the recent changes were to start a trace as soon as the
main
function of our app is called. The same code now produces:I had manually implemented web support and both web and mobile did work perfectly when using them as the first actions in
main
.Sample code
Having to call
await Firebase.initializeApp
breaks this because it would delay the tracking by ~0.2 seconds at least and way more in some cases.Expected behavior
It should be possible to use Firebase Performance without having to wait for
Firebase.initializeApp
, like it was possible prior to https://github.com/FirebaseExtended/flutterfire/pull/6851.Workaround
We are downgrading back to
firebase_performance: 0.7.0
with our custom web implementation that works immediately when the app is started.