Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'addResponse' of undefined\n #34

Open
dtboy1995 opened this issue Jun 6, 2021 · 3 comments
Open

TypeError: Cannot read property 'addResponse' of undefined\n #34

dtboy1995 opened this issue Jun 6, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@dtboy1995
Copy link

dtboy1995 commented Jun 6, 2021

  • Redis 5.0.3
  • RedisBloom 2.2.4
  • OS Centos 8.3
  • rebloom latest

Should be an uncapped exception i use Bull to exec some tasks and bull task failed reason

  • stacktrace
stacktrace: [
    "TypeError: Cannot read property 'addResponse' of undefined\n" +
      '    at JavascriptRedisParser.returnReply (/root/apps/api/node_modules/@albert-team/red/src/index.js:61:19)\n' +
      '    at JavascriptRedisParser.execute (/root/apps/api/node_modules/redis-parser/lib/parser.js:544:14)\n' +
      '    at Socket.<anonymous> (/root/apps/api/node_modules/@albert-team/red/src/index.js:95:41)\n' +
      '    at Socket.emit (events.js:326:22)\n' +
      '    at addChunk (_stream_readable.js:297:12)\n' +
      '    at readableAddChunk (_stream_readable.js:272:9)\n' +
      '    at Socket.Readable.push (_stream_readable.js:213:10)\n' +
      '    at TCP.onStreamRead (internal/stream_base_commons.js:188:23)'
  ]
  • code like
try {
    await some_filter.connect()
    logger.info(`some_filter connect`)
    await other_filter.connect()
    logger.info(`other_filter connect`)
    // do some exists check and add
} catch (err) {
    // It didn't arrive here
    throw err
} finally {
    try {
        await some_filter.disconnect()
        logger.info(`some_filter disconnect`)
        await other_filter.disconnect()
        logger.info(`other_filter disconnect`)
    } catch (e) { }
}
@lqmanh lqmanh added the bug Something isn't working label Jun 7, 2021
@lqmanh
Copy link
Member

lqmanh commented Jun 7, 2021

Hi @dtboy1995

Could you please provide a minimal example to reproduce this bug?
And can you connect directly (not via Rebloom) to the Redis server without problem?

@dtboy1995
Copy link
Author

dtboy1995 commented Jun 7, 2021

@lqmanh thanks for reply

This error does not happen 100 percent, but the probability is very high.
finally i use https://github.com/danitseitlin/redis-modules-sdk
It's a strange bug


The smallest example is the code above, and there is no special operation. The only difference is that the code is running in the bull task and initialize two filters

https://github.com/OptimalBits/bull#separate-processes

The task is to process millions of rows of data, and frequently open and close connections

@lqmanh
Copy link
Member

lqmanh commented Jun 7, 2021

Thanks, maybe it has something to do with frequently opening and closing connections. I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants