console-feed icon indicating copy to clipboard operation
console-feed copied to clipboard

Method of undefined issues in new versions

Open arthurdenner opened this issue 5 years ago • 7 comments

I'm investigating what was reported on #61 within CodeSandbox. I tried to upgrade to the newest version (3.1.9) and now we're getting Cannot read property 'toUpperCase' of undefined in some cases.

I think that instead of https://github.com/samdenty/console-feed/commit/9acd017d4d64dfdf875d1d5e5037c51d0fd5b1c5, we should check for !error in the Error component and return The error you provided does not contain a stack trace..

The original issue that triggered my investigation is https://github.com/codesandbox/codesandbox-client/issues/4963 - we were getting a blank error message there, then we got indexOf of undefined and now toUpperCase of undefined.

What do you think about my suggestion? The error you provided does not contain a stack trace. is what we get in the browser console inside CodeSandbox, so the behaviour would match in our case I think.

I tried to create a reproducible example in the demo app to verify the behaviour with more scenarios but I couldn't get to the state reported in https://github.com/codesandbox/codesandbox-client/issues/4963.

arthurdenner avatar Oct 13 '20 14:10 arthurdenner

believe this is an emotion version issue, @SaraVieira what did you do to fix this previously?

samdenty avatar Oct 13 '20 14:10 samdenty

https://github.com/samdenty/console-feed/commit/de41ef2662019c645a652199d9bdbbfc71419f5e should fix https://github.com/codesandbox/codesandbox-client/issues/4963

samdenty avatar Oct 13 '20 14:10 samdenty

Alright. I'll try with 3.1.10.

arthurdenner avatar Oct 13 '20 14:10 arthurdenner

Yeah, this was an emotion issue, cleaning and running yarn again should fix it.

Make sure to delete the yarn file :/

SaraVieira avatar Oct 14 '20 16:10 SaraVieira

@samdenty Still does not seem to be fixed :(

SaraVieira avatar Oct 14 '20 16:10 SaraVieira

I am experiencing the same issue :(

marmos91 avatar Oct 20 '20 13:10 marmos91

I had this problem when passing incompatible log object. Some loggers today have key level instead of method, what was exactly my case.

zdllucky avatar Oct 09 '21 06:10 zdllucky