Closed Hamdan85 closed 2 years ago
@Hamdan85 Have you got any solution?
@bhavin-concetto user runZonedGuarded:
void main() async {
runZonedGuarded<Future<void>>(() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FlutterError.onError =
FirebaseCrashlytics.instance.recordFlutterFatalError;
runApp(MyApp());
}, (error, stack) =>
FirebaseCrashlytics.instance.recordError(error, stack, fatal: true));
}
from docs: https://firebase.google.com/docs/crashlytics/get-started?platform=flutter
Hey @Hamdan85 , did you solve your issue?
For the upcoming people that are going to face this problem in the next future: flutter_flavorizr doesn't know if you are using crashlytics in your Firebase configuration, that's why you should stick to the Firebase docs after the flavorizer prepared the environment.
So putting additional code in the main file is mandatory and it could be the main reason why things are not working
@AngeloAvv yeah...it wasn't flavorizr fault. Two things happened that made me think that it was:
@AngeloAvv I must add that flutter_flavorizr is an amazing package and helped me a lot. Thank you sir!
Hey @AngeloAvv ,
I've researched a lot and didn't see anything about it so Im opening the issue.
I've deleted android and ios folder, then run
flutter create -i swift -a kotlin .
, then; runflutter pub run flutter_flavorizr
using this pubspec config:
Then I run an exception but nothing is registered to crashlytics. I've checked (with breakpoints) and it seems that all is correctly set in the flutter part... correct firebase settings. But for some reason, no crashs are reported on firebase.
Do you have any idea of what might be happening?
Also, should I run flutterfire?? I did before but I think it got pretty messy and I've decided to start over, as I said, by cleaning everything.