Open pbihler opened 9 years ago
I'll take look and see if I can figure something out for you. I probably won't have an answer for you immediately. I'm still getting to know the internals.
This is a tough one as it has to do with the parsing of the streaming buffer incoming from Apple. The 11
indicated with sub-stream on the multiplex to route the data to. With APN, there shouldn't be an 11
that I'm aware of. Two possibilites:
Has this only happened once?
It just occured once, but we're not on heavy traffic, yet.
The unit tests for my app, which uses apnAgent, was running in the back ground and I just got this stack trace. I must not have something faked out correctly. But it also looks very familiar...
Error: DecoderStream 11 not implemented.
at Decoder._nudge (/Users/jim/Projects/TMinus5/CometServer/node_modules/apnagent/node_modules/lotus/lib/lotus/decoder.js:138:18)
at Buffers.g (events.js:260:16)
at emitOne (events.js:77:13)
at Buffers.emit (events.js:169:7)
at Buffers.push (/Users/jim/Projects/TMinus5/CometServer/node_modules/apnagent/node_modules/lotus/node_modules/bufs/lib/bufs.js:73:10)
at Decoder._write (/Users/jim/Projects/TMinus5/CometServer/node_modules/apnagent/node_modules/lotus/lib/lotus/decoder.js:154:15)
at doWrite (_stream_writable.js:292:12)
at writeOrBuffer (_stream_writable.js:278:5)
at Decoder.Writable.write (_stream_writable.js:207:11)
at TLSSocket.
Interesting indeed....
According to apn binary spec that should only ever be an 8
(as this is the response decoder).
Apple only ever sends a response back if the message had a problem. Since you both get 11
and there is no error code associated with 11
, that should be getting parsed out. Furthermore, since you are both getting 11
it seems weird that it is left-overs from the identifier, as that would yield different results every time.
Before fixing this need to figure out where the 11
is coming from. Try sending a message that will trigger each of the error scenarios. Also, did either of you get an actual response error prior to this stack getting triggered?
This is everything from the last passing test to the point I restarted tests 71 passing (68ms)
/Users/jim/Projects/TMinus5/CometServer/test/botVotingTests.js:156
: spy
^
SyntaxError: Unexpected token :
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:413:25)
at Object.Module._extensions..js (module.js:448:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at /Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/lib/mocha.js:192:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/lib/mocha.js:189:14)
at Mocha.run (/Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/lib/mocha.js:422:31)
at loadAndRun (/Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/bin/_mocha:353:22)
at rerun (/Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/bin/_mocha:380:5)
at /Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/bin/_mocha:388:7
at StatWatcher.
I have autoSave turned on for my editor, so I frequently get "unexpected token" issues in my test records.
I am getting the same error on my server side as well. Any updates? Thanks!
Just to add more information to this issue, we have been getting the same error on our server using apnagent. Here's a screen grab.
On our production server, I received this error causing a server restart:
How can I catch it?