Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue remains with edge cases #21

Closed
cefn opened this issue Jan 1, 2016 · 1 comment
Closed

Issue remains with edge cases #21

cefn opened this issue Jan 1, 2016 · 1 comment

Comments

@cefn
Copy link

cefn commented Jan 1, 2016

I still seem to be hitting the same scenario where client._keepaliveTimer === null at line 19 in index.js

client._keepaliveTimer.reschedule(client._keepaliveInterval)

It's hard to recreate the exact conditions as this is in our production system, but the packet which is being handled at that moment is...

{"cmd":"puback","retain":false,"qos":0,"dup":false,"length":2,"topic":null,"payload":null,"messageId":30407}

...in case that helps to make sense of it. Otherwise I have to do some fairly heavy lifting to figure out the full sequence of events leading up to this failure.

Here's the stack trace...


TypeError: Cannot read property 'reschedule' of null
    at handle (/Users/cefn/Documents/code/imagination/git/aedes/lib/handlers/index.js:19:27)
    at Parser.enqueue (/Users/cefn/Documents/code/imagination/git/aedes/lib/client.js:204:3)
    at Parser._newPacket (/Users/cefn/Documents/code/imagination/git/aedes/node_modules/mqtt-packet/parser.js:30:10)
    at Parser.parse (/Users/cefn/Documents/code/imagination/git/aedes/node_modules/mqtt-packet/parser.js:42:48)
    at DestroyableTransform.nextBatch (/Users/cefn/Documents/code/imagination/git/aedes/lib/client.js:55:23)
    at emitReadable_ (node_modules/websocket-stream/node_modules/readable-stream/lib/_stream_readable.js:448:10)
    at emitReadable (node_modules/websocket-stream/node_modules/readable-stream/lib/_stream_readable.js:444:5)
    at readableAddChunk (node_modules/websocket-stream/node_modules/readable-stream/lib/_stream_readable.js:187:9)
    at DestroyableTransform.Readable.push (node_modules/websocket-stream/node_modules/readable-stream/lib/_stream_readable.js:149:10)
    at DestroyableTransform.Transform.push (node_modules/websocket-stream/node_modules/readable-stream/lib/_stream_transform.js:145:32)
    at WebSocket.onmessage (node_modules/websocket-stream/stream.js:74:11)
    at WebSocket.onMessage (node_modules/websocket-stream/node_modules/ws/lib/WebSocket.js:414:14)
    at Receiver.onbinary (node_modules/websocket-stream/node_modules/ws/lib/WebSocket.js:804:10)
    at node_modules/websocket-stream/node_modules/ws/lib/Receiver.js:533:18
    at node_modules/websocket-stream/node_modules/ws/lib/Receiver.js:357:7
    at node_modules/websocket-stream/node_modules/ws/lib/PerMessageDeflate.js:217:5
    at afterWrite (_stream_writable.js:346:3)
    at onwrite (_stream_writable.js:337:7)
    at WritableState.onwrite (_stream_writable.js:89:5)
    at afterTransform (_stream_transform.js:79:5)
    at TransformState.afterTransform (_stream_transform.js:54:12)
    at Zlib.callback (zlib.js:614:5)

As a reference, the same production scenario completes with Mosquitto without errors and we're only engaging with Aedes as a client through MQTT.js (with no deeper integration) so I don't think we're doing anything unusual from our side.

mcollina added a commit that referenced this issue Jan 1, 2016
@mcollina
Copy link
Collaborator

mcollina commented Jan 1, 2016

Oh, Aedes is at best beta software. It did not go through all the hardening that real-world did with Mosca.

Anyway, PR is coming for you to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants