Android 应用程序 firebase crashlytics 调试信息:如何排除故障?
Android app firebase crashlytics debugging info: how to troubleshoot?
我按照 Google 的说明设置了 Firebase crashlytics(https://firebase.google.com/docs/crashlytics/get-started?platform=android&authuser=1#add-sdk), then I purposely crashed the app in order to see something in the firebase console, as per https://firebase.google.com/docs/crashlytics/test-implementation?authuser=1&platform=android.; 此页面还建议打开 crashlytics 调试日志记录,我也这样做了。日志记录以:
D/FirebaseCrashlytics(23841): Crashlytics is handling uncaught exception "java.lang.RuntimeException: Unable to start activity ComponentInfo{com. ... .TabActivity}: java.lang.NumberFormatException: Invalid int: "abc"" from thread main
D/FirebaseCrashlytics(23841): Persisting fatal event for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Finalizing report for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Opening a new session with ID 603B9693009B00025D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics automatic data collection ENABLED by global Firebase setting.
D/FirebaseCrashlytics(23841): Logging Crashlytics event to Firebase
D/FirebaseCrashlytics(23841): Awaiting app exception callback from FA...
D/FirebaseCrashlytics(23841): Received Analytics message: 3 Bundle[{params=Bundle[{_o=clx, _r=1, timestamp=1614517907044, fatal=1}], name=_ae, timestampInMillis=1614517907169}]
D/FirebaseCrashlytics(23841): App exception callback received from FA listener.
D/FirebaseCrashlytics(23841): Crashlytics report successfully enqueued to DataTransport: 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics completed exception processing. Invoking default exception handler.
根据 this SO post,我应该预料到,在“Crashlytics 报告成功排队到 DataTransport”之后,一些行如
TransportRuntime.CctTransportBackend: Making request to with subsequent
TransportRuntime.CctTransportBackend: Status Code: 200
但它不在那里。
人们还说崩溃数据需要 24-48 小时才能显示在控制台中,而不是像 Google 所说的“最多 5 分钟”。但是现在已经超过48小时了
尽管这是针对 Android 的,但在有关强制崩溃测试的 iOS 说明中发现了一条重要线索,即应用程序应 运行 足够长的时间下次,或者在随后的 运行 中,它有时间将崩溃日志发送到 Firebase。如果您出于测试目的在应用程序生命周期的早期伪造自动崩溃,它可能没有时间在再次崩溃之前再次启动时发送有关早期崩溃的数据。
我按照 Google 的说明设置了 Firebase crashlytics(https://firebase.google.com/docs/crashlytics/get-started?platform=android&authuser=1#add-sdk), then I purposely crashed the app in order to see something in the firebase console, as per https://firebase.google.com/docs/crashlytics/test-implementation?authuser=1&platform=android.; 此页面还建议打开 crashlytics 调试日志记录,我也这样做了。日志记录以:
D/FirebaseCrashlytics(23841): Crashlytics is handling uncaught exception "java.lang.RuntimeException: Unable to start activity ComponentInfo{com. ... .TabActivity}: java.lang.NumberFormatException: Invalid int: "abc"" from thread main
D/FirebaseCrashlytics(23841): Persisting fatal event for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Finalizing report for session 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Opening a new session with ID 603B9693009B00025D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics automatic data collection ENABLED by global Firebase setting.
D/FirebaseCrashlytics(23841): Logging Crashlytics event to Firebase
D/FirebaseCrashlytics(23841): Awaiting app exception callback from FA...
D/FirebaseCrashlytics(23841): Received Analytics message: 3 Bundle[{params=Bundle[{_o=clx, _r=1, timestamp=1614517907044, fatal=1}], name=_ae, timestampInMillis=1614517907169}]
D/FirebaseCrashlytics(23841): App exception callback received from FA listener.
D/FirebaseCrashlytics(23841): Crashlytics report successfully enqueued to DataTransport: 603B968F001F00015D21614184AB1DFB
D/FirebaseCrashlytics(23841): Crashlytics completed exception processing. Invoking default exception handler.
根据 this SO post,我应该预料到,在“Crashlytics 报告成功排队到 DataTransport”之后,一些行如
TransportRuntime.CctTransportBackend: Making request to with subsequent
TransportRuntime.CctTransportBackend: Status Code: 200
但它不在那里。
人们还说崩溃数据需要 24-48 小时才能显示在控制台中,而不是像 Google 所说的“最多 5 分钟”。但是现在已经超过48小时了
尽管这是针对 Android 的,但在有关强制崩溃测试的 iOS 说明中发现了一条重要线索,即应用程序应 运行 足够长的时间下次,或者在随后的 运行 中,它有时间将崩溃日志发送到 Firebase。如果您出于测试目的在应用程序生命周期的早期伪造自动崩溃,它可能没有时间在再次崩溃之前再次启动时发送有关早期崩溃的数据。