Closed russellporter closed 12 years ago
How did history become something other than an array... weird. Any steps to reproduce?
Just happened again
debug - xhr-polling writing 5:::{"name":"user message","args":[{"type":{"name":"userMessage","message":"<%= message %>","notificationTitle":"<%= speaker %> says...","notificationBody":"<%= message %>"},"speaker":"thomas","message":"k","notification":{"title":"thomas says...","body":"k"}}]}
debug - set close timeout for client 725375002653685103
debug - clearing poll timeout
debug - xhr-polling writing 5:::{"name":"user message","args":[{"type":{"name":"userMessage","message":"<%= message %>","notificationTitle":"<%= speaker %> says...","notificationBody":"<%= message %>"},"speaker":"thomas","message":"k","notification":{"title":"thomas says...","body":"k"}}]}
debug - set close timeout for client 19233597452005223501
debug - setting request GET /socket.io/1/xhr-polling/19233597452005223501?t=1321328179988
debug - setting poll timeout
debug - discarding transport
debug - cleared close timeout for client 19233597452005223501
debug - setting request GET /socket.io/1/xhr-polling/725375002653685103?t=1321328184047
debug - setting poll timeout
debug - discarding transport
debug - cleared close timeout for client 725375002653685103
debug - xhr-polling received data packet 5:::{"name":"user message","args":["i am keeping the current password hash"]}
/home/rporter/Omega-Issue-Tracker/server.js:133
history.push(event);
^
TypeError: Object #<OmegaEvent> has no method 'push'
at recordEvent (/home/rporter/Omega-Issue-Tracker/server.js:133:11)
at Socket.<anonymous> (/home/rporter/Omega-Issue-Tracker/server.js:60:15)
at Socket.$emit (events.js:64:17)
at SocketNamespace.handlePacket (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/namespace.js:331:20)
at Manager.onClientMessage (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/manager.js:436:38)
at XHRPolling.onMessage (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transport.js:387:20)
at XHRPolling.onData (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transports/http.js:89:10)
at IncomingMessage.<anonymous> (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transports/http.js:60:12)
at IncomingMessage.emit (events.js:61:17)
at HTTPParser.onMessageComplete (http.js:133:23)
we are trying to reproduce but cant. we tried hammering the chatroom to see if it was a concurrency issue, but doesn't seem like it. aaand.. it just happened again:
debug - setting poll timeout
debug - discarding transport
debug - cleared close timeout for client 3061181621422586151
debug - xhr-polling received data packet 5:::{"name":"user message","args":["when you are including the css <link rel=\"stylesheet\" type=\"text/css\" href=\"/css/blueprint/screen.css\" media=\"screen, projection\" />"]}
/home/rporter/Omega-Issue-Tracker/server.js:133
history.push(event);
^
TypeError: Object #<OmegaEvent> has no method 'push'
at recordEvent (/home/rporter/Omega-Issue-Tracker/server.js:133:11)
at Socket.<anonymous> (/home/rporter/Omega-Issue-Tracker/server.js:60:15)
at Socket.$emit (events.js:64:17)
at SocketNamespace.handlePacket (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/namespace.js:331:20)
at Manager.onClientMessage (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/manager.js:436:38)
at XHRPolling.onMessage (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transport.js:387:20)
at XHRPolling.onData (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transports/http.js:89:10)
at IncomingMessage.<anonymous> (/home/rporter/Omega-Issue-Tracker/node_modules/socket.io/lib/transports/http.js:60:12)
at IncomingMessage.emit (events.js:61:17)
at HTTPParser.onMessageComplete (http.js:133:23)
Could this be a chrome with notifications bug? I am the only one using chrome with notifications i think.
Also I am pretty sure this is chat related, it always happens when i am posting a message.
I have also updated the server with the require.js changes, but it still happens. All i can do to reproduce is type lots of chat messages in for a few minutes, with someone else typing occasionally as well.
Update: Underscore is returning the last object in history rather than the last 10 in an array.
It seems like a race condition, I can't reproduce in an underscore test. All I know for sure is using slice instead of last fixes the problem.
Bah, should have thought of this earlier. You must be using pre 1.2.0 underscore on the server side. Try npm update underscore
...
Here's a crash I just encountered running the current omega code:
Another crasher, probably related..