Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

[Android] Crash when trying to leave non-string breadcrumbs #32

Closed
cooperka opened this issue Nov 30, 2016 · 0 comments
Closed

[Android] Crash when trying to leave non-string breadcrumbs #32

cooperka opened this issue Nov 30, 2016 · 0 comments

Comments

@cooperka
Copy link
Contributor

cooperka commented Nov 30, 2016

Current behavior

leaveBreadcrumb on Android can't process non-string data types.

For example, each of the following lines:

client.leaveBreadcrumb('some type', { foo: 1 });
client.leaveBreadcrumb('some type', { foo: true });
client.leaveBreadcrumb('some type', { foo: {} });

Leads to a crash with the errors:

TypeError: expected dynamic type `string', but had type `int64'
TypeError: expected dynamic type `string', but had type `boolean'
TypeError: expected dynamic type `string', but had type `object'

They work fine on iOS, and strings do work on Android (e.g. { foo: 'bar' }). The crash itself happens in readStringMap trying to execute pair.getString("value").

Repro steps

You can repro successfully with the current example app, using the code above.

Expected behavior

According to allowedMapObjectTypes in lib/Bugsnag.js, int and boolean should be accepted, and Object should be recursively processed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant