Git Product home page Git Product logo

Comments (9)

ExploreMqt avatar ExploreMqt commented on July 18, 2024

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.

logicalparadox avatar logicalparadox commented on July 18, 2024

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.

pbihler avatar pbihler commented on July 18, 2024

It just occured once, but we're not on heavy traffic, yet.

from apnagent.

ExploreMqt avatar ExploreMqt commented on July 18, 2024

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.

logicalparadox avatar logicalparadox commented on July 18, 2024

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.

ExploreMqt avatar ExploreMqt commented on July 18, 2024

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.

ExploreMqt avatar ExploreMqt commented on July 18, 2024

I have autoSave turned on for my editor, so I frequently get "unexpected token" issues in my test records.

from apnagent.

yourei avatar yourei commented on July 18, 2024

I am getting the same error on my server side as well. Any updates? Thanks!

from apnagent.

alexpersian avatar alexpersian commented on July 18, 2024

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.
error

from apnagent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.