Skip to content

TypeError: Cannot read property 'data' of null #48

Closed

Description

@jalateras

I have been using bee-queue for over 6 months and use it to process around 8M records per day. Recently I came across this issue

[2016-06-06 14:14:39.893] [ERROR] server - UNCAUGHT EXCEPTION Cannot read property 'data' of null
[2016-06-06 14:14:39.897] [ERROR] server - TypeError: Cannot read property 'data' of null
    at Function.Job.fromData (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/lib/job.js:29:39)
    at /usr/share/oztam-collect/20160504123427/node_modules/bee-queue/lib/job.js:22:25
    at try_callback (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/index.js:595:9)
    at RedisClient.return_reply (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/index.js:688:13)
    at HiredisReplyParser.<anonymous> (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/index.js:324:14)
    at emitOne (events.js:77:13)
    at HiredisReplyParser.emit (events.js:169:7)
    at HiredisReplyParser.execute (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/lib/parser/hiredis.js:45:18)
    at RedisClient.on_data (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/index.js:550:27)
    at Socket.<anonymous> (/usr/share/oztam-collect/20160504123427/node_modules/bee-queue/node_modules/redis/index.js:105:14)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:146:16)
    at Socket.Readable.push (_stream_readable.js:110:10)
    at TCP.onread (net.js:523:20)
Server has exit with code 1

I have had a look at the code and cannot understand how this would be the case. Any ideas?

Activity

  1. matteocontrini commented on Jul 7, 2016

    @matteocontrini

    Same exact issue here, suddenly!

  2. ahkimkoo commented on Oct 31, 2016

    @ahkimkoo

    Same exact issue here, suddenly!

  3. Vinchens00-zz commented on Jan 12, 2017

    @Vinchens00-zz

    Hi!

    I have the same issue too.
    Version 0.3.0.
    OS CentOS.
    Node v6.0.0
    Trace:
    TypeError: Cannot read property 'data' of null\n at Function.Job.fromData (/var/www/project/node_modules/bee-queue/lib/job.js:29:39)\n at /var/www/project/node_modules/bee-queue/lib/job.js:22:25\n at try_callback (/var/www/project/node_modules/redis/index.js:595:9)\n at RedisClient.return_reply (/var/www/project/node_modules/redis/index.js:688:13)\n at ReplyParser. (/var/www/project/node_modules/redis/index.js:324:14)\n at ReplyParser.send_reply (/var/www/project/node_modules/redis/lib/parser/javascript.js:302:10)\n at ReplyParser.execute (/var/www/project/node_modules/redis/lib/parser/javascript.js:205:22)\n at RedisClient.on_data (/var/www/project/node_modules/redis/index.js:550:27)\n at Socket. (/var/www/project/node_modules/redis/index.js:105:14)\n at try_callback (/var/www/project/node_modules/redis/index.js:604:21)\n at RedisClient.return_reply (/var/www/project/node_modules/redis/index.js:688:13)\n at ReplyParser. (/var/www/projecti/node_modules/redis/index.js:324:14)\n at ReplyParser.send_reply (/var/www/project/node_modules/redis/lib/parser/javascript.js:302:10)\n at ReplyParser.execute (/var/www/projecti/node_modules/redis/lib/parser/javascript.js:205:22)\n at RedisClient.on_data (/var/www/project/node_modules/redis/index.js:550:27)\n at Socket. (/var/www/project/node_modules/redis/index.js:105:14).

    I checked "jobs" hash value in Redis:
    #hgetall bq:project:jobs

    It returned 2 items:

    1. "118"
    2. "{"data":{"uuid":"4ef0bad5-7afc-4ad7-b36b-b6265f322bc2", /Another job's data/},"options":{},"status":"created"}"

    But I also have 1 stalling job (117) and 2 active jobs (117 and 119).

    It looks like library try to parse jobs #117 and #119, but it can't, because there are no information for this jobs in redis.

    Do you have any ideas?

  4. nmalzieu commented on Feb 15, 2017

    @nmalzieu

    Same issue here :) Any idea?

  5. davisford commented on May 30, 2017

    @davisford

    I also have this problem

    $ node --version
    v6.9.1
    $ npm --version
    3.10.8
    
    
    ├── [email protected]
    

    Don't think anything new changed about this environment -- Redis is same, everything same.

  6. davisford commented on Jun 23, 2017

    @davisford

    Anyone make progress on this? I have not been able to look into it yet. Maintaining a lot of systems, and just haven't had a chance yet. But this is still occurring. Issue is open, lots of people seemingly having it. Wondering if there is any insight into why/how it occurs?

    The queue does seem to work for the most part. We may have some failures b/c of it, but most messages go through the queue ok.

  7. added this to the 1.0.0 milestone on Jul 20, 2017
  8. skeggse commented on Aug 9, 2017

    @skeggse
    Member

    Fixed in 1.0.0 (f2cfb01).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions