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

The metadata recorded for key 'app' is not formatted as key/value pairs. Discarding #132

Closed
patlux opened this issue Aug 17, 2017 · 8 comments

Comments

@patlux
Copy link

patlux commented Aug 17, 2017

Hello,

in the ios logs I get the message

The metadata recorded for key 'app' is not formatted as key/value pairs. Discarding

My test error:

BugsnagClient.notify(new Error('ios test'), report => {
  console.log('report', report);
  return report;
});

The report looks like this:

screen shot 2017-08-17 at 12 07 42

What's wrong?

@kattrali
Copy link
Contributor

The data looks fine; which versions of react native and bugsnag-react-native are you using, @patlux?

@patlux
Copy link
Author

patlux commented Aug 17, 2017

react-native v0.45.1
bugsnag-react-native v2.3.1
@kattrali

@kattrali
Copy link
Contributor

Upon investigation, any nested object is now being serialised as a string instead of as JSON when crossing the native bridge. I'm investigating solutions where we do the serialisation/deserialisation within the library to fix this. So something like:

JS side of notify: metadata stringified using JSON.stringify
Native side of notify: converts metadata to Map/NSDictionary via JSONObject/NSJSONSerialization

cc @SudoPlz

@SudoPlz
Copy link

SudoPlz commented Aug 18, 2017

Let us know if we have to do something on our end @kattrali !

Thanks

@kattrali
Copy link
Contributor

Fixed in 2.3.2! Thanks for the debugging detail, @patlux @SudoPlz. 🎉

@SudoPlz
Copy link

SudoPlz commented Aug 21, 2017

Please npm publish this @kattrali the npm version is still 2.3.1

@kattrali
Copy link
Contributor

So odd 🤔 I republished and everything seems to be ok. @SudoPlz can you retry?

@SudoPlz
Copy link

SudoPlz commented Aug 21, 2017

It's there now. Thanks @kattrali !
💥

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

3 participants