You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bugsnag does not report List and Map types of metadata for native crashes. The issue does not appear for JVM crashes.
For example, if I specify the following set of metadata in Java/Kotlin:
Bugsnag.addMetadata(TEST_TAB, "int", 42)
Bugsnag.addMetadata(TEST_TAB, "string", "value")
Bugsnag.addMetadata(TEST_TAB, "list", listOf("1", "2"))
Bugsnag.addMetadata(TEST_TAB, "map", mapOf("key1" to 1, "key2" to 2))
For native crashes, only two of them will be reported: int and string, while list and map will be ignored.
For JVM crashes - all 4 will be reported.
If I try to intercept the metadata before sending in Configuration#addOnSend method, the List and Map metadata are also missing for native crashes.
Steps to reproduce
I've created a sample Android project to demonstrate the issue. It is completely based Bugsnag example project but with slight modifications in ExampleApplication.kt file.
(set API key in manifest)
Check test metadata in ExampleApplication.kt file. There are 4 items: int, string, list and map.
Launch the app
Click TRIGGER A FATAL CRASH and launch the app again.
Check TEST TAB tab on a dashboard or see logs with TEST_LOG tag in logcat. All 4 metadata items were sent.
Now, click TRIGGER A NATIVE CRASH and launch the app again.
Check dashboard or logs again. Only two metadata items are sent but List and Map ones are skipped.
Currently for native NDK crashes the only types of metadata which are supported are boolean, number, and string values. Although more complex metadata types such as List and Map can be added to JVM crashes, this metadata won't appear on NDK crashes.
We do have plans on our roadmap to support more complex metadata types on NDK crashes as well, but there is significant work to support this reliably across all cases and ensure that metadata added or modified in either layer is included in all crashes. We don't have a planned timeline for this yet but we'll be sure to provide an update here when this becomes available.
The most common use case for adding List metadata to crashes is to provide sets of feature flags or experiments active when the crash occurred. This is now supported by bugsnag-android using the addFeatureFlags API, and although feature flags / experiments can only be added in JVM code they will be included on all errors including native NDK crashes.
Hi @pavlos-lyft - just letting you know that we've released v5.24.0 of bugsnag-android, which includes some enhancements to now allow reporting of complex metadata (including Lists and Maps) on NDK crashes 🎉
Describe the bug
Bugsnag does not report
List
andMap
types of metadata for native crashes. The issue does not appear for JVM crashes.For example, if I specify the following set of metadata in Java/Kotlin:
int
andstring
, whilelist
andmap
will be ignored.If I try to intercept the metadata before sending in
Configuration#addOnSend
method, theList
andMap
metadata are also missing for native crashes.Steps to reproduce
I've created a sample Android project to demonstrate the issue. It is completely based Bugsnag example project but with slight modifications in
ExampleApplication.kt
file.ExampleApplication.kt
file. There are 4 items:int
,string
,list
andmap
.TRIGGER A FATAL CRASH
and launch the app again.TEST TAB
tab on a dashboard or see logs withTEST_LOG
tag in logcat. All 4 metadata items were sent.TRIGGER A NATIVE CRASH
and launch the app again.List
andMap
ones are skipped.Environment
Example Repo
https://github.com/pavlos-lyft/bugsnag-android-issue-demo
The text was updated successfully, but these errors were encountered: