Firebase Crashlytics崩溃未在Flatter中报告给Firebase控制台

Firebase Crashlytics崩溃未在Flatter中报告给Firebase控制台,firebase,flutter,dart,crashlytics,Firebase,Flutter,Dart,Crashlytics,我试着为Flitter应用程序的iOS部分设置Firebase Crashlytics。我在控制台中收到以下消息,但在Firebase仪表板中看不到任何内容 2019-08-23 14:31:33.648772+0530转轮[87816:826824]颤振:由Crashlytics插件捕获的颤振错误: 2019-08-23 14:31:33.734996+0530转轮[87816:826824]颤振:向Crashlytics报告错误 1) Pubspec.yaml 添加了firebase\u c

我试着为Flitter应用程序的iOS部分设置Firebase Crashlytics。我在控制台中收到以下消息,但在Firebase仪表板中看不到任何内容

2019-08-23 14:31:33.648772+0530转轮[87816:826824]颤振:由Crashlytics插件捕获的颤振错误:

2019-08-23 14:31:33.734996+0530转轮[87816:826824]颤振:向Crashlytics报告错误

1)
Pubspec.yaml

添加了
firebase\u crashlytics:^0.1.0+2
添加到依赖项列表

2) 主飞镖

import 'package:firebase_crashlytics/firebase_crashlytics.dart';

void main() async {
  Crashlytics.instance.enableInDevMode = true;

  // Pass all uncaught errors from the framework to Crashlytics.
  FlutterError.onError = Crashlytics.instance.recordFlutterError;
  runApp(MyApp());
}

3) 在构建阶段添加了运行脚本

脚本-
${PROJECT\u DIR}/Fabric.framework/run
输入文件-
$(SRCROOT)/$(内置产品目录)/$(INFOPLIST路径)

4) 单击dart中的按钮,将以下内容添加到崩溃测试中

throw exception ("This is a test crash");
5) 我还尝试在模拟器上安装应用程序,停止调试,强制崩溃,然后重新启动

这是我的日志:

2019-08-23 14:31:29.162211+0530 Runner[87816:826814]  - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2019-08-23 14:31:29.321000+0530 Runner[87816:826819] 6.7.0 - [Firebase/Core][I-COR000001] Configuring the default app.
2019-08-23 14:31:29.339518+0530 Runner[87816:826819] 6.7.0 - [Firebase/Core][I-COR000033] Data Collection flag is not set.
2019-08-23 14:31:29.343569+0530 Runner[87816:826779] [Crashlytics] Version 3.13.4 (143)
2019-08-23 14:31:29.344190+0530 Runner[87816:826779] [Crashlytics] Running on iOS Simulator (iPhone), 12.2.0 (18F132)
2019-08-23 14:31:29.351346+0530 Runner[87816:826779] [Crashlytics:Crash:Reports:Event] Registered Firebase Analytics event listener
2019-08-23 14:31:29.352626+0530 Runner[87816:826779] [Answers] Initialized
2019-08-23 14:31:29.374874+0530 Runner[87816:826779] [Fabric] 
    Initialized with kit versions: {
    "com.twitter.answers.ios" = "1.4.1";
    "com.twitter.crashlytics.ios" = "3.13.4";
    "io.fabric.sdk.ios" = "1.10.2";
    }
2019-08-23 14:31:29.441898+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID023000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    acct = "com.vts.vtsMobileCloud";
    class = genp;
    gena = "com.google.iid";
    "m_Limit" = "m_LimitAll";
    "r_Attributes" = 1;
    "r_Data" = 1;
    svce = "com.google.iid.checkin";
}
2019-08-23 14:31:29.459396+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID023000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    atag = <636f6d2e 676f6f67 6c652e69 69642d7c 4b7c>;
    class = keys;
    "r_Ref" = 1;
    type = 42;
}
2019-08-23 14:31:29.467260+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID023000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    atag = <636f6d2e 676f6f67 6c652e69 69642d7c 507c>;
    class = keys;
    "r_Ref" = 1;
    type = 42;
}
2019-08-23 14:31:29.469687+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID009000] No keypair info is found with tag com.google.iid-|K|
2019-08-23 14:31:29.470959+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID009006] There's no legacy keypair so no need to do migration.
2019-08-23 14:31:29.473193+0530 Runner[87816:826819] 6.7.0 - [Firebase/InstanceID][I-IID023000] Info is not found in Keychain. OSStatus: -25300. Keychain query: {
    acct = "com.vts.vtsMobileCloud";
    class = genp;
    gena = "com.google.iid-tokens";
    "m_Limit" = "m_LimitAll";
    "r_Attributes" = 1;
    "r_Data" = 1;
    svce = "346036413985:*";
}
2019-08-23 14:31:29.475434+0530 Runner[87816:826819] 6.7.0 - [GULReachability][I-REA902003] Monitoring the network status
2019-08-23 14:31:29.475923+0530 Runner[87816:826831] flutter: Observatory listening on http://127.0.0.1:59771/SLPgRYC-GPQ=/
2019-08-23 14:31:29.477698+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS024000] Debug mode is on
2019-08-23 14:31:29.478350+0530 Runner[87816:826819] 6.7.0 - 
2019-08-23 14:31:29.478853+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60101000 started
2019-08-23 14:31:29.480269+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS023008] To disable debug logging set the following application argument: -noFIRAnalyticsDebugEnabled (see http:)
2019-08-23 14:31:29.480999+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS023009] Debug logging enabled
2019-08-23 14:31:29.550095+0530 Runner[87816:826819] [Answers] Answers is disabled. Cleaning up.
2019-08-23 14:31:29.689894+0530 Runner[87816:826814] 6.7.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001008] Successfully created App Delegate Proxy automatically. To disable the proxy, set the flag GoogleUtilitiesAppDelegateProxyEnabled to NO (Boolean) in the Info.plist
2019-08-23 14:31:29.692544+0530 Runner[87816:826814] 6.7.0 - [GULReachability][I-REA902004] Network status has changed. Code:2, status:Connected
2019-08-23 14:31:29.694005+0530 Runner[87816:826814] 6.7.0 - [Firebase/Analytics][I-ACS031010] Tracking view controller. Class, ID: FlutterViewController, -5765211381914463904
2019-08-23 14:31:29.696012+0530 Runner[87816:826814] 6.7.0 - [Firebase/Analytics][I-ACS031013] Screen view event not logged. App is not active.
2019-08-23 14:31:29.821624+0530 Runner[87816:826814] 6.7.0 - [Firebase/Analytics][I-ACS029014] Successfully parsed a configuration. Version: 1566456169535025
2019-08-23 14:31:29.826523+0530 Runner[87816:826814] 6.7.0 - [Firebase/Analytics][I-ACS023016] Analytics is ready to receive events
2019-08-23 14:31:29.946190+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS032003] iAd framework is not linked. Search Ad Attribution Reporter is disabled.
2019-08-23 14:31:29.947722+0530 Runner[87816:826814] 6.7.0 - [Firebase/Analytics][I-ACS023024] No data to upload. Upload task will not be scheduled
2019-08-23 14:31:29.948368+0530 Runner[87816:826819] 6.7.0 - [Firebase/Analytics][I-ACS023012] Analytics enabled
2019-08-23 14:31:30.414665+0530 Runner[87816:826814] [Fabric] settings downloaded successfully
2019-08-23 14:31:30.415103+0530 Runner[87816:826814] [Fabric] Settings are available for consumption
2019-08-23 14:31:30.511026+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS033003] Scheduling user engagement timer
2019-08-23 14:31:30.513147+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS002002] Engagement timer scheduled to fire in approx. (s): 3600
2019-08-23 14:31:30.513984+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS023051] Logging event: origin, name, params: auto, screen_view (_vs), {
    ga_event_origin (_o) = auto;
    ga_screen_class (_sc) = FlutterViewController;
    ga_screen_id (_si) = -5765211381914463904;
}
2019-08-23 14:31:30.514647+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS023073] Debug mode is enabled. Marking event as debug and real-time. Event name, parameters: screen_view (_vs), {

        ga_debug (_dbg) = 1;
        ga_event_origin (_o) = auto;
        ga_realtime (_r) = 1;
        ga_screen_class (_sc) = FlutterViewController;
        ga_screen_id (_si) = -5765211381914463904;
    }
    2019-08-23 14:31:30.703851+0530 Runner[87816:826824] flutter: addToOverlay
    2019-08-23 14:31:31.040103+0530 Runner[87816:826835] 6.7.0 - [Firebase/Analytics][I-ACS023072] Event logged. Event name, event 
    params: screen_view (_vs), {
    ga_debug (_dbg) = 1;
    ga_event_origin (_o) = auto;
    ga_realtime (_r) = 1;
    ga_screen_class (_sc) = FlutterViewController;
    ga_screen_id (_si) = -5765211381914463904;
    }

2019-08-23 14:31:31.766716+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.2573471069335938
2019-08-23 14:31:31.792724+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS023028] Upload task scheduled to be executed in approx. (s): -0.2573471069335938
2019-08-23 14:31:31.796034+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS002001] Measurement timer fired
2019-08-23 14:31:31.798589+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS002003] Measurement timer canceled
2019-08-23 14:31:31.799467+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS023033] Starting data upload
2019-08-23 14:31:31.799862+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, 
   parameters: screen_view (_vs), {
    ga_debug (_dbg) = 1;
    ga_event_origin (_o) = auto;
    ga_realtime (_r) = 1;
    ga_screen_class (_sc) = FlutterViewController;
    ga_screen_id (_si) = -5765211381914463904;
    }
2019-08-23 14:31:31.801179+0530 Runner[87816:826844] 6.7.0 - [Firebase/Analytics][I-ACS012018] Saving bundle. size (bytes): 425
2019-08-23 14:31:31.802492+0530 Runner[87816:826844] 6.7.0 - [Firebase/Analytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 61, 1566550890505
2019-08-23 14:31:32.035619+0530 Runner[87816:826844] 6.7.0 - [Firebase/Analytics][I-ACS023038] Uploading events. Elapsed time since last successful upload (s): 242.4702870845795
2019-08-23 14:31:32.037031+0530 Runner[87816:826844] 6.7.0 - [Firebase/Analytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1566550892032, <APMPBMeasurementBatch: 0x600000252560>
2019-08-23 14:31:32.050976+0530 Runner[87816:826840] 6.7.0 - [Firebase/Analytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a
2019-08-23 14:31:32.170464+0530 Runner[87816:826844] 6.7.0 - [Firebase/Analytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a
2019-08-23 14:31:32.262611+0530 Runner[87816:826835] 6.7.0 - [Firebase/Analytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, -1
2019-08-23 14:31:32.265501+0530 Runner[87816:826821] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x7fd16a4875c0] get output frames failed, state 8196
2019-08-23 14:31:32.265647+0530 Runner[87816:826821] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x7fd16a4875c0] get output frames failed, state 8196
2019-08-23 14:31:32.266164+0530 Runner[87816:826821] TIC Read Status [2:0x0]: 1:57
2019-08-23 14:31:32.266553+0530 Runner[87816:826821] TIC Read Status [2:0x0]: 1:57
2019-08-23 14:31:32.268991+0530 Runner[87816:826835] 6.7.0 - [Firebase/Analytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.7637839317321777
2019-08-23 14:31:32.269088+0530 Runner[87816:826835] 6.7.0 - [Firebase/Analytics][I-ACS023028] Upload task scheduled to be executed in approx. (s): -0.7637839317321777
2019-08-23 14:31:32.358056+0530 Runner[87816:826821] 6.7.0 - [Firebase/Analytics][I-ACS023024] No data to upload. Upload task will not be scheduled
2019-08-23 14:31:32.358229+0530 Runner[87816:826821] 6.7.0 - [Firebase/Analytics][I-ACS002003] Measurement timer canceled
2019-08-23 14:31:33.648772+0530 Runner[87816:826824] flutter: Flutter error caught by Crashlytics plugin:
2019-08-23 14:31:33.734996+0530 Runner[87816:826824] flutter: Error reported to Crashlytics.
2019-08-23 14:35:59.541939+0530 Runner[87816:830344] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C3.1:2][0x7fd16a486530] get output frames failed, state 8196
2019-08-23 14:35:59.542135+0530 Runner[87816:830344] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C3.1:2][0x7fd16a486530] get output frames failed, state 8196
2019-08-23 14:35:59.542630+0530 Runner[87816:830344] TIC Read Status [3:0x0]: 1:57
2019-08-23 14:35:59.542764+0530 Runner[87816:830344] TIC Read Status [3:0x0]: 1:57
2019-08-2314:31:29.162211+0530跑步者[87816:826814]


打开Firebase Crashlytics页面时,默认情况下会应用“事件类型=“崩溃”过滤器。从技术上讲,flatter中未处理的异常不是崩溃——Android活动仍在运行,因为本机UI线程上没有发生异常。因此,所有颤振异常都记录为非致命性碰撞


只需删除默认过滤器即可查看致命和非致命碰撞。

颤振中的错误不是碰撞,因此不会记录为碰撞

  • 将过滤器转到
    非致命性

  • app/build.gradle
    中的2条apply plugin语句应该放在dependencies部分下面


  • 确保这一点,你就可以走了

    确保您没有在调试模式下崩溃

    我在一篇文章中读到了这一点:在android中,该应用程序不使用debug APK报告崩溃类型事件

    在构建发布版本并将其安装到我的设备上后,viola报告了第一次崩溃

    flutter build apk --release && flutter install 
    

    我也有同样的问题[但在Android上]。Firebase控制台中的屏幕被卡在“我们将监听您的应用程序以与我们的服务器通信”上。我通过执行以下操作使其正常工作:

  • 按照FlatterFire文档中的说明设置Crashlytics,但更改以下内容。在app/build.gradle中添加如下依赖项:

    implementation platform('com.google.firebase:firebase-bom:26.1.0')
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.android.support:multidex:2.0.1'
    
  • 这就是我在main.dart中初始化Crashlytics实例的方式

     Function originalOnError = FlutterError.onError;
     FlutterError.onError = (FlutterErrorDetails errorDetails) async {
        await FirebaseCrashlytics.instance.recordFlutterError(errorDetails);
     originalOnError(errorDetails);
    };
    
  • 如果要在调试模式下进行测试,还应添加以下内容:

    await FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true);
    

  • 你在Firebase找对地方了吗?您提到您在Firebase仪表板上看不到任何内容,但这不是报告崩溃的地方-您需要从侧菜单转到Crashlytics页面。另一方面,您是否可以在Firebase Dashboard上看到分析,还是这些分析都不起作用?获取分析将指示一个正确的json配置文件。是的,我是。我已经为Crashlytics和Analytics仪表板编辑了几张图片,供您查看。我还注意到错误日志中有以下内容。这是我应该关心的事情吗?2019-08-23 14:35:59.542135+0530 Runner[87816:830344][BoringSSL]nw_协议_BoringSSL_获取输出帧(1301)[C3.1:2][0x7fd16a486530]获取输出帧失败,状态8196您是否尝试通过在Firebase Crashlytics页面上单击其旁边的小X来删除的默认筛选器?@Ovidiu-就是这样!我必须删除默认的过滤器。非常感谢你!你能解释更多吗?删除firebase crashlytics仪表板中的过滤器解决了我看不到非致命错误的问题!