rohanpm / ngitcached

A caching git proxy
MIT License
36 stars 9 forks source link

ngitcached dies on ECONNRESET due to ingite doing unshift on undefined #10

Open queria opened 9 years ago

queria commented 9 years ago

Tried to use ngitcached directly fails like:

git clone git://localhost:9418/?remote=github.com/openstack/nova
Cloning into 'nova'...
fatal: git fetch_pack: expected ACK/NAK, got 'done'

ngitcached itself was started and prints out:

$ /usr/local/bin/ngitcached --cache-dir /tmp/ngitcache
ngitcached listening on port 9418
GitStream error: { '0': { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } }

/usr/local/libexec/ngitcached/node_modules/ignite/lib/StateMachine.js:329
          evtargs.unshift(new Error("Event ["+evtname+"] received in ["+this.s
                  ^
TypeError: Cannot call method 'unshift' of undefined
    at StateMachine._inject (/usr/local/libexec/ngitcached/node_modules/ignite/lib/StateMachine.js:329:19)
    at GitStream.ee.(anonymous function) [as emit] (/usr/local/libexec/ngitcached/node_modules/ignite/lib/plugins/defaults/core/90_eventEmitters.js:115:26)
    at Socket.<anonymous> (/usr/local/libexec/ngitcached/gitstream.js:74:20)
    at Socket.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:419:13)

I don't have almost any experience with node.js things so I'm sorry if this is not enough info, please ask for what more I can provide.

queria commented 9 years ago

I've realised one thing I should mention - I've had problem to get ngitcached running in first place, failing on import of uglify-js/lib/parse-js as that seems to not exist (anymore?) and i've "solved" it by bumping ignite to 0.1.8 - now i've realized this may be the reason for such failure?

So I have idea that ngitcached should: