intermittent websocket errors when running the tests.

RESOLVED FIXED

Status

Hello (Loop)
Server
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jbonacci, Assigned: natim)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa+])

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
I just pulled down and installed loop-server to my local host.
I am seeing 4 new (to me) websocket-specific errors.
Anything here we should be concerned about for 0.12.5 and newer releases?


...etc...
 426 passing (4s)
  1 pending
  4 failing

  1) websockets with two clients should proxy the reason on action/terminate:
     Uncaught AssertionError: expected undefined to deeply equal 'cancel'
      at WebSocket.<anonymous> (/Users/James/loop-server/test/websockets_test.js:653:34)
      at WebSocket.EventEmitter.emit (events.js:98:17)
      at Receiver.self._receiver.ontext (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:697:10)
      at Receiver.opcodes.1.finish (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:397:14)
      at Receiver.<anonymous> (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:384:31)
      at Receiver.add (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:93:24)
      at Socket.firstHandler (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:678:22)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Socket.<anonymous> (_stream_readable.js:745:14)
      at Socket.EventEmitter.emit (events.js:92:17)
      at emitReadable_ (_stream_readable.js:407:10)
      at emitReadable (_stream_readable.js:403:5)
      at readableAddChunk (_stream_readable.js:165:9)
      at Socket.Readable.push (_stream_readable.js:127:10)
      at TCP.onread (net.js:528:21)

  2) websockets with two clients should close the connection if callee doesn't connect:
     Error: not opened
      at WebSocket.send (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:187:16)
      at Context.<anonymous> (/Users/James/loop-server/test/websockets_test.js:717:16)
      at Test.Runnable.run (/Users/James/loop-server/node_modules/mocha/lib/runnable.js:196:15)
      at Runner.runTest (/Users/James/loop-server/node_modules/mocha/lib/runner.js:373:10)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/James/loop-server/node_modules/mocha/lib/runner.js:298:14)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/James/loop-server/node_modules/mocha/lib/runner.js:246:23)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:270:7
      at done (/Users/James/loop-server/node_modules/mocha/lib/runnable.js:185:5)
      at /Users/James/loop-server/node_modules/mocha/lib/runnable.js:199:9
      at try_callback (/Users/James/loop-server/node_modules/redis/index.js:592:9)
      at RedisClient.return_reply (/Users/James/loop-server/node_modules/redis/index.js:685:13)
      at HiredisReplyParser.<anonymous> (/Users/James/loop-server/node_modules/redis/index.js:321:14)
      at HiredisReplyParser.EventEmitter.emit (events.js:95:17)
      at HiredisReplyParser.execute (/Users/James/loop-server/node_modules/redis/lib/parser/hiredis.js:43:18)
      at RedisClient.on_data (/Users/James/loop-server/node_modules/redis/index.js:547:27)
      at Socket.<anonymous> (/Users/James/loop-server/node_modules/redis/index.js:102:14)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Socket.<anonymous> (_stream_readable.js:745:14)
      at Socket.EventEmitter.emit (events.js:92:17)
      at emitReadable_ (_stream_readable.js:407:10)
      at emitReadable (_stream_readable.js:403:5)
      at readableAddChunk (_stream_readable.js:165:9)
      at Socket.Readable.push (_stream_readable.js:127:10)
      at TCP.onread (net.js:528:21)

  3) websockets with two clients should close the connection if caller doesn't connect:
     Error: not opened
      at WebSocket.send (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:187:16)
      at Context.<anonymous> (/Users/James/loop-server/test/websockets_test.js:743:16)
      at Test.Runnable.run (/Users/James/loop-server/node_modules/mocha/lib/runnable.js:196:15)
      at Runner.runTest (/Users/James/loop-server/node_modules/mocha/lib/runner.js:373:10)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:451:12
      at next (/Users/James/loop-server/node_modules/mocha/lib/runner.js:298:14)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:308:7
      at next (/Users/James/loop-server/node_modules/mocha/lib/runner.js:246:23)
      at /Users/James/loop-server/node_modules/mocha/lib/runner.js:270:7
      at done (/Users/James/loop-server/node_modules/mocha/lib/runnable.js:185:5)
      at /Users/James/loop-server/node_modules/mocha/lib/runnable.js:199:9
      at try_callback (/Users/James/loop-server/node_modules/redis/index.js:592:9)
      at RedisClient.return_reply (/Users/James/loop-server/node_modules/redis/index.js:685:13)
      at HiredisReplyParser.<anonymous> (/Users/James/loop-server/node_modules/redis/index.js:321:14)
      at HiredisReplyParser.EventEmitter.emit (events.js:95:17)
      at HiredisReplyParser.execute (/Users/James/loop-server/node_modules/redis/lib/parser/hiredis.js:43:18)
      at RedisClient.on_data (/Users/James/loop-server/node_modules/redis/index.js:547:27)
      at Socket.<anonymous> (/Users/James/loop-server/node_modules/redis/index.js:102:14)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Socket.<anonymous> (_stream_readable.js:745:14)
      at Socket.EventEmitter.emit (events.js:92:17)
      at emitReadable_ (_stream_readable.js:407:10)
      at emitReadable (_stream_readable.js:403:5)
      at readableAddChunk (_stream_readable.js:165:9)
      at Socket.Readable.push (_stream_readable.js:127:10)
      at TCP.onread (net.js:528:21)

  4) websockets "before each" hook:
     Uncaught Error: not opened
      at WebSocket.send (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:187:16)
      at WebSocket.<anonymous> (/Users/James/loop-server/test/websockets_test.js:756:20)
      at WebSocket.EventEmitter.emit (events.js:117:20)
      at Receiver.self._receiver.ontext (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:697:10)
      at Receiver.opcodes.1.finish (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:397:14)
      at Receiver.expectHandler (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:384:31)
      at Receiver.add (/Users/James/loop-server/node_modules/ws/lib/Receiver.js:93:24)
      at Socket.firstHandler (/Users/James/loop-server/node_modules/ws/lib/WebSocket.js:678:22)
      at Socket.EventEmitter.emit (events.js:95:17)
      at Socket.<anonymous> (_stream_readable.js:745:14)
      at Socket.EventEmitter.emit (events.js:92:17)
      at emitReadable_ (_stream_readable.js:407:10)
      at emitReadable (_stream_readable.js:403:5)
      at readableAddChunk (_stream_readable.js:165:9)
      at Socket.Readable.push (_stream_readable.js:127:10)
      at TCP.onread (net.js:528:21)
Hey, these aren't new and are due to how we are testing, not the actual implementation.

Also, these are intermittent and if you re-run the tests you shouldn't get them. We should find a way to fix these, but that's not blocking by any means for any release.
Summary: Current master of loop-server failing websocket unit tests → intermittent websocket errors when running the tests.
(Reporter)

Comment 2

3 years ago
Yea, I see what you mean. 
If I find an earlier bug that covers the issue, I will close this bug...
Status: NEW → ASSIGNED
Duplicate of this bug: 1087199
It happens on Travis too sometimes : https://travis-ci.org/mozilla-services/loop-server/builds/38719664
(Assignee)

Comment 5

3 years ago
Created attachment 8546539 [details] [review]
Link to Github PR — #280.
Attachment #8546539 - Flags: review?(mathieu)
(Assignee)

Updated

3 years ago
Assignee: nobody → rhubscher
Comment on attachment 8546539 [details] [review]
Link to Github PR — #280.

Well done!
Attachment #8546539 - Flags: review?(mathieu) → review+
(Assignee)

Comment 7

3 years ago
https://github.com/mozilla-services/loop-server/commit/c4822665669ff848894e8f4454f436cf1076e03f
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.