rs / pushd

Blazing fast multi-protocol mobile and web push notification service
MIT License
1.16k stars 227 forks source link

error subscribing to GCM #108

Closed behrad closed 9 years ago

behrad commented 9 years ago

when calling

curl -d proto=gcm -d token=FE66489F304DC75B8D6E8200DFF8A456E8DAEACEC428B427E9518741C92C6660 -d lang=fr -d badge=0 -d category=show -d contentAvailable=true http://localhost/subscribers I get:

TypeError: Cannot set property 'id' of null
  at /media/data/workspace/pushd/lib/api.coffee:20:21
  at /media/data/workspace/pushd/lib/subscriber.coffee:133:21
  at try_callback (/media/data/workspace/pushd/node_modules/redis/index.js:592:9)
  at RedisClient.return_reply (/media/data/workspace/pushd/node_modules/redis/index.js:685:13)
  at HiredisReplyParser.<anonymous> (/media/data/workspace/pushd/node_modules/redis/index.js:321:14)
  at HiredisReplyParser.EventEmitter.emit (events.js:95:17)
  at HiredisReplyParser.execute (/media/data/workspace/pushd/node_modules/redis/lib/parser/hiredis.js:43:18)
  at RedisClient.on_data (/media/data/workspace/pushd/node_modules/redis/index.js:547:27)
  at Socket.<anonymous> (/media/data/workspace/pushd/node_modules/redis/index.js:102:14)
  at Socket.EventEmitter.emit (events.js:95:17)
  at Socket.<anonymous> (_stream_readable.js:746:14)
  at Socket.EventEmitter.emit (events.js:92:17)
  at emitReadable_ (_stream_readable.js:408:10)
  at emitReadable (_stream_readable.js:404:5)
  at readableAddChunk (_stream_readable.js:165:9)
  at Socket.Readable.push (_stream_readable.js:127:10)
  at TCP.onread (net.js:526:21)
deweweire commented 9 years ago

http://stackoverflow.com/questions/28350831/rs-pushd-crashes-when-a-new-subscriber-is-received

i've got the problem yesterday :)

behrad commented 9 years ago

bad typo... I should provide a PR for this so that @rs can merge it

Thank you @deweweire :+1: