when I call Crashlytics.instance.crash(); or div by 0... I don't see any report in console
โโโโโโโโ Exception caught by gesture โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following StateError was thrown while handling a gesture:
Bad state: Error thrown by Crashlytics plugin
When the exception was thrown, this was the stack:
#0 Crashlytics.crash (package:firebase_crashlytics/src/firebase_crashlytics.dart:54:5)
#1 _MyHomePageState._incrementCounter.<anonymous closure> (package:firebase_crashlytics_test/main.dart:50:30)
#2 State.setState (package:flutter/src/widgets/framework.dart:1141:30)
#3 _MyHomePageState._incrementCounter (package:firebase_crashlytics_test/main.dart:47:5)
#4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:654:14)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#1a99a
debugOwner: GestureDetector
state: ready
won arena
finalPosition: Offset(342.9, 710.9)
finalLocalPosition: Offset(22.2, 23.6)
sent tap down
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
my repo firebase_crashlytics_test
doctor -v
[โ] Flutter (Channel stable, v1.9.1+hotfix.6, on Linux, locale en_US.UTF-8)
โข Flutter version 1.9.1+hotfix.6 at /home/tbm98/Documents/FLUTTER_SDK/flutter
โข Framework revision 68587a0916 (9 weeks ago), 2019-09-13 19:46:58 -0700
โข Engine revision b863200c37
โข Dart version 2.5.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
โข Android SDK at /home/tbm98/Android/Sdk
โข Android NDK location not configured (optional; useful for native profiling support)
โข Platform android-29, build-tools 29.0.2
โข Java binary at: /home/tbm98/Documents/android-studio/jre/bin/java
โข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[โ] Android Studio (version 3.5)
โข Android Studio at /home/tbm98/Documents/android-studio
โข Flutter plugin version 41.1.2
โข Dart plugin version 191.8593
โข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[โ] Connected device (1 available)
โข AOSP on IA Emulator โข emulator-5554 โข android-x86 โข Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
Have the same issue. Did you find any solution?
@olga0 it is not a bug, It will display on the console within 24 hours
I still do not see any reports in console even after 3 days.
@olga0 what did you do ?
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.26.1'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
firebase_crashlytics: ^0.1.0+3
to my pubspec.yaml file and run "Packages get".
import 'dart:async';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';
import 'package:kids_development/levels/main_page.dart';
void main() {
Crashlytics.instance.enableInDevMode = true;
FlutterError.onError = Crashlytics.instance.recordFlutterError;
runZoned<Future<void>>(() async {
runApp(MyApp());
}, onError: Crashlytics.instance.recordError);
}
class MyApp extends StatefulWidget {
@override
State<StatefulWidget> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.amber,
),
home: MainPage(),
);
}
}
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';
class MainPage extends StatefulWidget {
final String _locale;
MainPage(this._locale);
@override
State<StatefulWidget> createState() {
return MainPageState();
}
}
class MainPageState extends State<MainPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Kids Development'),
),
body: Container(
width: double.infinity,
margin: EdgeInsets.all(15.0),
child: RaisedButton(
child: Text('Crash!'),
onPressed: () {
Crashlytics.instance.crash();
},
),
),
);
}
}
I created a project in Firebase Console and added my app there.
I run my app on my Android phone and the app was connected to Firebase Console.
When I click "Crash" button I got this logs:
โโโโโโโโ Exception caught by gesture โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The following StateError was thrown while handling a gesture:
Bad state: Error thrown by Crashlytics plugin
When the exception was thrown, this was the stack:
#0 Crashlytics.crash (package:firebase_crashlytics/src/firebase_crashlytics.dart:50:5)
#1 MainPageState.build.<anonymous closure> (package:kids_development/levels/main_page.dart:150:38)
#2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:654:14)
#3 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:729:32)
#4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#b4911
debugOwner: GestureDetector
state: possible
won arena
finalPosition: Offset(182.2, 527.5)
finalLocalPosition: Offset(46.2, 26.5)
sent tap down
Flutter doctor:
[โ] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.476], locale en-US)
โข Flutter version 1.9.1+hotfix.6 at C:\Users\olgam\source\flutter
โข Framework revision 68587a0916 (10 weeks ago), 2019-09-13 19:46:58 -0700
โข Engine revision b863200c37
โข Dart version 2.5.0
[โ] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
โข Android SDK at C:\Users\olgam\AppData\Local\Android\sdk
โข Android NDK location not configured (optional; useful for native profiling support)
โข Platform android-28, build-tools 28.0.3
โข Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
โข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
โข All Android licenses accepted.
[โ] Android Studio (version 3.5)
โข Android Studio at C:\Program Files\Android\Android Studio
โข Flutter plugin version 41.1.2
โข Dart plugin version 191.8593
โข Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[โ] Connected device (2 available)
โข SM G930U โข d77c5f0b โข android-arm64 โข Android 8.0.0 (API 26)
โข AOSP on IA Emulator โข emulator-5554 โข android-x86 โข Android 9 (API 28) (emulator)
โข No issues found!
Also experiencing this. No fatal or non-fatal crash reports are appearing in Firebase console's crashlytics tab. The version string for the flutter app is also unsearchable in the filters on the crashlytics tab.
default console set filter like this

after cancel all filter

let try cancel all filter :D
I cancelled all filters. Still nothing.
probably wait for flutter team :D
I have the same problem
Is there any way to fix this?
I can't get it to work for iOS, see full description of the issue here.
StackOverflow #60111182
Someone who got it to work for iOS?
@olga0 You seem to have done everything as per the documentation. Note Crashlytics seems to have never been right. See the long standing issue https://github.com/FirebaseExtended/flutterfire/issues/1147
I'd recommend using something else like Sentry.
I am also seeing this issue. But I don't want to use sentry, because firebase has much better pricing (Free). Sentry wants 26$ a month if I want more than one user on my team - i'm sure people here know there are alternatives @workerbee22 but would rather not use them particularly once the flutter version matures
@ChaseGuru Sounds like you are we many of us have been. All setup correctly as per the doco, but nothing comes through.
But btw I have two older projects (pre flutter v1.12 setup) that work fully and correctly, which makes this even more frustrating, because newer projects I just cannot get to work and spent man-weeks trying.
So if/when you can't get it working because of this issue, I just suggested Sentry for the time being if you need something right now.
You are having the same issues as so many others but try this to try and debug your issues:
https://firebase.google.com/docs/crashlytics/force-a-crash?platform=android#enable_debug_logging
Or follow the progress of the new Beta SDK PR which hopefully will fix this issue: https://github.com/FirebaseExtended/flutterfire/pull/2288
A new Crashlytics plugin has now landed on master which should solve this issue.
Checkout the migration guide to get started on upgrading to the new Crashlytics plugin: https://firebase.flutter.dev/docs/migration/
I have the same probolem. Just migrated by instruction but still nothing shows up in the console.
EDIT: Nevermind, it works now.
Forgot to enable FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
Most helpful comment
I have the same problem