Closed loliarz closed 1 year ago
That's a weird if
statement...
Are you able to provide a reproduction or tell the specific scenario where you were able to catch this error?
It would make it easier to test a solution later.
Could you assign me?
Sure! @lapaz17 is free to be taken, if you need any help solving this issue you can reach out here on this issue or you can create a draft Pull Request so that we can help you there as well
@Grubba27 Do you think
if (( msg && Object.keys(msg).length === 1) && msg.server_id)
is enough solution?
Hey @lapaz17, I think it would work if given a reproduction of a test scenario for this.
I would add tests in packages/ddp-client/test/livedata_connection_tests.js
If this issue is not resolved shall I do this?
@harshit-dugar If you're able to reproduce it, then sure.
Conditions above this line allow msg===null to get into Object.keys(msg);
livedata_connection.js:1626 Uncaught TypeError: Cannot convert undefined or null to objectat Function.keys (<anonymous>)at Connection.onMessage (livedata_connection.js:1626:20)at browser.js:184:11at Array.forEach (<anonymous>)at ClientStream.forEachCallback (common.js:30:31)at SockJS.socket.onmessage (browser.js:183:14)at SockJS.REventTarget.dispatchEvent (sockjs-0.3.4.js:87:22)at SockJS._dispatchMessage (sockjs-0.3.4.js:1078:10)at SockJS._didMessage (sockjs-0.3.4.js:1138:18)at WebSocket.that.ws.onmessage (sockjs-0.3.4.js:1285:17)
How to reproduce this ?
@radekmie @Grubba27 Hey guys, I have created a draft PR for this issue, I am having some trouble in writing tests for the same, and need some help.
I think the test will go inside the onConnected() function present in the packages/ddp-client/test/livedata_connection_tests.js
file, not sure about it, can you please guide me a little on where to add the test?
PS: This is my first open-source contribution.
I don't know exactly and won't have time to look into it soon, sorry. (Mostly because this no longer seems urgent, as there's no reproduction nor more reports of this.)
Alright. no problem.
Hello guys, I have a trouble with this problem.
I am working on this branch and this error was showed. But some friend when working also on this branch, this error NOT showing. I don't know why. Could you help me?. Thank you so much!!
@nhtbao101 I'm pretty sure it's completely unrelated - this issue is about some server code, and you see an error in the browser. It's just "the same error"; someone did Object.keys
on undefined
or null
. Check your companion-bubble.js
file.
One possible solution is from this post https://stackoverflow.com/questions/74281137/companion-bubble-js-in-the-console.
Looks like the Chrome Extension for Loom causes the error.
just saw someone say it's the loom extension causing this issue
In my case I disabled loom and it effectively solved the problem
just saw someone say it's the loom extension causing this issue
Thank you
Yeah, I also dissabled the loom extension and the problem was solved. Thanks
Wow! I've been debugging this error for two hours now, scratching my head and disabling everything I could to pinpoint the issue... and it seems to be caused by the Meteor DevTools Evolved 1.8 Chrome extension!
It occurred when publishing a cursor with a nested object of shape { location: { coordinates: [...values] } }
if any value in the array was null
.
I didn't get the error:
null
valuesI'll file an issue at the extension's GitHub page. I seee the 1.8 version has been released three days ago. This was very confusing, as I didn't get this kind of problem before today and things started to go wrong without any code change.
Sure! @Grubba27 hello i have a issue can you help me please? Cannot convert undefined or null to object TypeError: Cannot convert undefined or null to object
https://github.com/meteor/meteor/blob/9530de1ac97f7736bfa7caeffda6a756603919fd/packages/ddp-client/common/livedata_connection.js#L1626
Conditions above this line allow msg===null to get into Object.keys(msg);
livedata_connection.js:1626 Uncaught TypeError: Cannot convert undefined or null to objectat Function.keys (<anonymous>)at Connection.onMessage (livedata_connection.js:1626:20)at browser.js:184:11at Array.forEach (<anonymous>)at ClientStream.forEachCallback (common.js:30:31)at SockJS.socket.onmessage (browser.js:183:14)at SockJS.REventTarget.dispatchEvent (sockjs-0.3.4.js:87:22)at SockJS._dispatchMessage (sockjs-0.3.4.js:1078:10)at SockJS._didMessage (sockjs-0.3.4.js:1138:18)at WebSocket.that.ws.onmessage (sockjs-0.3.4.js:1285:17)