-
Notifications
You must be signed in to change notification settings - Fork 1.9k
error: uncaughtException: Cannot read property 'callback' of undefined #1037
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
Comments
This seems to be a serious regression and it would be a real help to know what commands you use or even better: if you have a minimal reproducible test case. |
@BridgeAR Thanks for your reply. Infact,depend on the backtrack,I don't see where is the call.And in my code,I don't use pub sub command,I only use the rPush command. So that's really weird. And I just rollback to [email protected],then the exception is gone. Here is the code:
|
@leeyo are you sure that's all code you use? I can't reproduce the error with this code. And please activate the |
//=====redis.js======
//call redis.js
That's all the code above. |
@leeyo this does not trigger the error for me. Are you absolutely certain there is no other redis code in your app? Maybe in a module that you use? If you're on linux, you might run Please also post your used Redis version and print the debug_mode output after triggering the error. By the way: you have a typo in |
I can testitfy that 2.6.0-2 does not fix the issue. I am using that version and still get this error. However, I don't have such a clean code sample. But I too am using rpush/blpop
The error is more or less immediately preceded by
|
@jackquack would you be so kind and run your code with v.2.6.1 and use the debug mode? The output is very useful for me to debug this. Currently I don't know where to look at otherwise. And a code example would be awsome! Even if it's not that clean. |
I think that command_obj = undeined . //index.js
console.log("this is self.command_queue ")
var command_obj = self.command_queue.shift();
console.log(self.command_queue,command_obj);
if (command_obj && typeof command_obj.callback === 'function') {
if (command_obj.command !== 'exec') {
reply = self.handle_reply(reply, command_obj.command, command_obj.buffer_args);
}
command_obj.callback(null, reply);
} else {
debug('No callback for reply');
}
}
so it solved |
@OrangeBook do you have a self contained example with your code that triggers the issue? Your solution does not fix this issue and would produce lots of side effects. |
If the issue is not fixed with v.2.6.4 please ping me to reopen this. |
error: uncaughtException: Cannot read property 'callback' of undefined date=Mon Apr 18 2016 20:07:09 GMT+0800 (CST), pid=11564, uid=0, gid=0, cwd=/, execPath=/ssd/opt/nodejs/bin/node, version=v5.9.0, argv=[/ssd/opt/nodejs/bin/node, /opt/htdocs/demo/websocket/app.js, -m, product, -p, 2800,2801,2802,2803], rss=62349312, heapTotal=38433568, heapUsed=28476368, loadavg=[5.0068359375, 3.47021484375, 2.33056640625], uptime=19885317, trace=[column=27, file=/ssd/opt/nodejs/lib/node_modules/redis/index.js, function=normal_reply, line=616, method=null, native=false, column=9, file=/ssd/opt/nodejs/lib/node_modules/redis/index.js, function=RedisClient.return_reply, line=719, method=return_reply, native=false, column=18, file=/ssd/opt/nodejs/lib/node_modules/redis/index.js, function=JavascriptReplyParser.RedisClient.reply_parser.Parser.returnReply, line=154, method=RedisClient.reply_parser.Parser.returnReply, native=false, column=18, file=/ssd/opt/nodejs/lib/node_modules/redis/node_modules/redis-parser/lib/javascript.js, function=JavascriptReplyParser.run, line=137, method=run, native=false, column=10, file=/ssd/opt/nodejs/lib/node_modules/redis/node_modules/redis-parser/lib/javascript.js, function=JavascriptReplyParser.execute, line=112, method=execute, native=false, column=27, file=/ssd/opt/nodejs/lib/node_modules/redis/index.js, function=, line=240, method=null, native=false, column=13, file=events.js, function=emitOne, line=90, method=null, native=false, column=7, file=events.js, function=Socket.emit, line=182, method=emit, native=false, column=18, file=_stream_readable.js, function=readableAddChunk, line=153, method=null, native=false, column=10, file=_stream_readable.js, function=Socket.Readable.push, line=111, method=Readable.push, native=false, column=20, file=net.js, function=TCP.onread, line=533, method=onread, native=false], stack=[TypeError: Cannot read property 'callback' of undefined, at normal_reply (/ssd/opt/nodejs/lib/node_modules/redis/index.js:616:27), at RedisClient.return_reply (/ssd/opt/nodejs/lib/node_modules/redis/index.js:719:9), at JavascriptReplyParser.RedisClient.reply_parser.Parser.returnReply (/ssd/opt/nodejs/lib/node_modules/redis/index.js:154:18), at JavascriptReplyParser.run (/ssd/opt/nodejs/lib/node_modules/redis/node_modules/redis-parser/lib/javascript.js:137:18), at JavascriptReplyParser.execute (/ssd/opt/nodejs/lib/node_modules/redis/node_modules/redis-parser/lib/javascript.js:112:10), at Socket. (/ssd/opt/nodejs/lib/node_modules/redis/index.js:240:27), at emitOne (events.js:90:13), at Socket.emit (events.js:182:7), at readableAddChunk (_stream_readable.js:153:18), at Socket.Readable.push (_stream_readable.js:111:10), at TCP.onread (net.js:533:20)]
Any ideas ?
The text was updated successfully, but these errors were encountered: