Closed Plant-for-the-Planet closed 4 years ago
One of the most common bugs in Bugsnag still happening.
Hey @norbertschuler, how to reproduce the mentioned bug?
Supriya from Mumbai at WomenWhoCode hacktoberfest.
@SupriyaAdep I am sorry, the GitHub issue does not show the whole information we have, but Bugsnag isn't public. I just recognized this issue only happens in our native app (iOS and Android app), not in the web client, so maybe it's a bad choice for Hacktoberfest.
Update: I am currently unable to give a documentation about how to reproduce this bug.
Hi @norbertschuler thank you for the update.
I'd tried to reproduce this, but wasn't able yet.
I found this stack trace where the error is thrown, so the error results from some API response not being returned as an object (could be also an empty string, but not null or undefined) - since the backend response is handled by the axios npm module we can currently not fix this in another way as catching this error, so the user does not get it, but then there are no TPOs loaded for the application so it doesn't make any sense to use the app any more:
var normalize$1 = function normalize(input, schema) {
if (!input \|\| typeof input !== 'object') {
throw new Error("Unexpected input given to normalize. Expected type to be \"object\", found \"" + typeof input + "\".");
}
...
As this API call is not deprecated, this error could have been vanished.
Error in Plant-for-the-Planet App
Error in app/actions/loadTposAction.js:11 Unexpected input given to normalize. Expected type to be "object", found "string".
View on Bugsnag
Stacktrace
https://github.com/Plant-for-the-Planet-org/treecounter-app/blob/01f4514299eaf445d4b4f430593e423397340e5c/app/actions/loadTposAction.js#L12
View full stacktrace
Created automatically via Bugsnag