prawnsalad / KiwiIRC

This is **DEPRECATED**! Please go to https://github.com/kiwiirc/kiwiirc
https://kiwiirc.com
GNU Affero General Public License v3.0
890 stars 278 forks source link

Crash on start-up #890

Open slicer69 opened 8 years ago

slicer69 commented 8 years ago

With the latest git commit, I am running into a crash on start-up. The crash happens due to an error thrown from file

node_modules/spdy/node_modules/http-deceiver/lib/deceiver.js

on line 25. The line reads:

HTTPParser.methods.forEach(function(method, index) { reverseMethods[method] = index; });

The function call crashes because it reports the "forEach" set is undefined. Commenting out the above line avoids the crash and allows KiwiIRC to start.

I am running Node 6.3.1 on FreeBSD 10.3 with npm 3.8.8 installed. I am running the KiwiIRC master branch, using the commit from March 31, 2016.

The complete traceback from running "kiwi start" without the above change, for anyone who wants it, is as follows:

Starting kiwiirc daemon... /usr/home/kiwi/KiwiIRC/node_modules/daemonize2/lib/daemonize.js:136 throw new Error(msg.error); ^

Error: TypeError: Cannot read property 'forEach' of undefined at Object. (/usr/home/kiwi/KiwiIRC/node_modules/spdy/node_modules/http-deceiver/lib/deceiver.js:25:21) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object. (/usr/home/kiwi/KiwiIRC/node_modules/spdy/lib/spdy/handle.js:5:20) at Module._compile (module.js:541:32) at ChildProcess. (/usr/home/kiwi/KiwiIRC/node_modules/daemonize2/lib/daemonize.js:136:19) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at process.nextTick (internal/child_process.js:719:12) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

silentziler commented 8 years ago

Commenting out that line really helped, I wasnt getting the error till after I updated nodeJS. Thanks for the update!

whyteks commented 6 years ago

I know this is really old, but I just came across it after a nodejs upgrade on an old install. The spdy package version in package.json is still 2.0.5 Using latest works and avoids this error. I know this version of the product is EOL. but all the same.. we could fix this, no?

EDIT: Given the number of open PR and Issues here, I'm taking it as abandoned and will not submit a PR for this. In the outside case that you happen to come across the same thing, consider editing package.json to use a later version of spdy rather than commenting out the line as @silentziler suggests.