edsu / anon

tweet about anonymous Wikipedia edits from particular IP address ranges
Creative Commons Zero v1.0 Universal
973 stars 152 forks source link

IRC throwing an error after a few seconds #147

Closed ezramechaber closed 6 years ago

ezramechaber commented 6 years ago

It starts fine, but within a few seconds (and a few edits), it fails.

I'm pretty sure I have everything installed correctly, and it was working correctly when I installed it this morning.

Here's what I'm seeing:

loaded config from ./config.json
https://de.wikipedia.org/w/index.php?diff=167841289&oldid=167841284
https://ru.wikipedia.org/w/index.php?diff=86888558&oldid=86728990
https://ar.wikipedia.org/w/index.php?diff=24045673&oldid=18797924
https://he.wikipedia.org/w/index.php?diff=21305163&oldid=21305105&rcid=37013197
https://uk.wikipedia.org/w/index.php?diff=20821035&oldid=20815712
https://de.wikipedia.org/w/index.php?diff=167841291&oldid=167198387
https://de.wikipedia.org/w/index.php?diff=167841290&oldid=167841274
https://de.wikipedia.org/w/index.php?diff=167841292&oldid=167841228
https://he.wikipedia.org/w/index.php?oldid=21305164&rcid=37013198
https://he.wikipedia.org/w/index.php?oldid=21305164&rcid=37013198
/Users/ezramechaber1/Code/anon/node_modules/irc/lib/irc.js:849
                        throw err;
                        ^

TypeError: Cannot read property '0' of undefined
  at v4.Address.toV6Group (/Users/ezramechaber1/Code/anon/node_modules/ipv6/ipv6.js:242:34)
  at address (/Users/ezramechaber1/Code/anon/anon.coffee:21:24)
  at isIpInRange (/Users/ezramechaber1/Code/anon/anon.coffee:42:9)
  at isIpInAnyRange (/Users/ezramechaber1/Code/anon/anon.coffee:47:8)
  at inspect (/Users/ezramechaber1/Code/anon/anon.coffee:116:12)
  at /Users/ezramechaber1/Code/anon/anon.coffee:151:11
  at Client.<anonymous> (/Users/ezramechaber1/Code/anon/node_modules/wikichanges/wikichanges.js:34:9)
  at emitMany (events.js:127:13)
  at Client.emit (events.js:201:7)
  at Client.<anonymous> (/Users/ezramechaber1/Code/anon/node_modules/irc/lib/irc.js:557:22)
  at emitOne (events.js:96:13)
  at Client.emit (events.js:188:7)
  at iterator (/Users/ezramechaber1/Code/anon/node_modules/irc/lib/irc.js:846:26)
  at Array.forEach (native)
  at Socket.handleData (/Users/ezramechaber1/Code/anon/node_modules/irc/lib/irc.js:841:15)
  at emitOne (events.js:96:13)
  at Socket.emit (events.js:188:7)
  at readableAddChunk (_stream_readable.js:176:18)
  at Socket.Readable.push (_stream_readable.js:134:10)
  at TCP.onread (net.js:547:20)
ezramechaber commented 6 years ago

Looks like it was unhappy with a really narrow IP range in my config.json, but not sure why. Either way, solved itself when I adjusted the range.