Comments (9)
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.
from apnagent.
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:
- APN binary protocols added more stuff that I'm not aware of. See Apple's documentation.
- Packet loss caused the internal counter to reference the wrong position on the incoming stream.
Has this only happened once?
from apnagent.
It just occured once, but we're not on heavy traffic, yet.
from apnagent.
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. (/Users/jim/Projects/TMinus5/CometServer/node_modules/apnagent/lib/apnagent/agent/live.js:159:18)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at TLSSocket.Readable.push (_stream_readable.js:110:10)
at TLSWrap.onread (net.js:521:20)
npm ERR! Test failed. See above for more details.
from apnagent.
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?
from apnagent.
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. (/Users/jim/Projects/TMinus5/CometServer/node_modules/mocha/lib/utils.js:166:36)
at emitTwo (events.js:87:13)
at StatWatcher.emit (events.js:172:7)
at StatWatcher._handle.onchange (fs.js:1285:10)
events.js:141
throw er; // Unhandled 'error' event
^
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. (/Users/jim/Projects/TMinus5/CometServer/node_modules/apnagent/lib/apnagent/agent/live.js:159:18)
at emitOne (events.js:77:13)
at TLSSocket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at TLSSocket.Readable.push (_stream_readable.js:110:10)
at TLSWrap.onread (net.js:521:20)
npm ERR! Test failed. See above for more details.
Jims-MBP-2:CometServer jim$ npm test
from apnagent.
I have autoSave turned on for my editor, so I frequently get "unexpected token" issues in my test records.
from apnagent.
I am getting the same error on my server side as well. Any updates? Thanks!
from apnagent.
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.
from apnagent.
Related Issues (20)
- Where is 'error mitigation' section HOT 1
- TypeError: value is out of bounds HOT 1
- Queue is never restarted after SSL error HOT 7
- Agents randomly stop reconnecting HOT 1
- Consistent memory leaks HOT 6
- Gateway sporadically stops sending notifications HOT 3
- sending push in bulk HOT 3
- Site Down HOT 3
- Change to APNS HOT 1
- Sending push notifications in production environment not working HOT 2
- node agent/_header.js HOT 1
- Seeking Maintainer
- Can't use agent on openshift server HOT 10
- APN agent connected coming false HOT 2
- Notification not received when device come from offline to online HOT 2
- sending MDM push notification to APNS
- does not accept "title" as part of the "alert" HOT 5
- Increment Badge Count HOT 1
- Collapse-id HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apnagent.