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

unreproducible: uncaughtException TypeError: Cannot read property 'command' of undefined #14

Closed
p3x-robot opened this issue May 10, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@p3x-robot
Copy link
Member

ay 10 10:53:37 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:37.176 [INFO]   [PID: 021488] socket.io connected FSp2v7Zjv9VyxbazAAGM
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.985 [WARN]   [PID: 021488] shared disconnectRedisIo try
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.986 [INFO]   [PID: 021488] socket.io connection-connect added new socket.id FSp2v7Zjv9VyxbazAAGM to P3Xid7e893a8c561010008cc0b0e71a398b name with localhost test
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.986 [INFO]   [PID: 021488] socket.io connection-connect P3Xid7e893a8c561010008cc0b0e71a398b localhost test connected
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.990 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 23 count 100
May 10 10:54:14 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:14.822 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 10000 count 100
May 10 10:54:15 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:15.937 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 10000 count 100
May 10 10:54:27 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:27.046 [ERROR]  [PID: 021488] { ReplyError: ERR unknown command `ls`, with args beginning with:
May 10 10:54:27 server p3xrs.js[21488]:     at parseError (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:179:12)
May 10 10:54:27 server p3xrs.js[21488]:     at parseType (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'ls', args: [] } }
May 10 10:54:55 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:55.249 [ERROR]  [PID: 021488] { ReplyError: ERR unknown command `ll`, with args beginning with:
May 10 10:54:55 server p3xrs.js[21488]:     at parseError (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:179:12)
May 10 10:54:55 server p3xrs.js[21488]:     at parseType (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'll', args: [] } }
May 10 10:55:01 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:55:01.177 [ERROR]  [PID: 021488] 5/10/2019, 10:55:01 AM uncaughtException TypeError: Cannot read property 'command' of undefined
May 10 10:46:17 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:46:17.356 [INFO]   [PID: 021488] socket.io disconnected 0I2fAv9nTdiiOkvJAAGL
May 10 10:53:37 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:37.176 [INFO]   [PID: 021488] socket.io connected FSp2v7Zjv9VyxbazAAGM
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.985 [WARN]   [PID: 021488] shared disconnectRedisIo try
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.986 [INFO]   [PID: 021488] socket.io connection-connect added new socket.id FSp2v7Zjv9VyxbazAAGM to P3Xid7e893a8c561010008cc0b0e71a398b name with localhost test
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.986 [INFO]   [PID: 021488] socket.io connection-connect P3Xid7e893a8c561010008cc0b0e71a398b localhost test connected
May 10 10:53:43 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:53:43.990 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 23 count 100
May 10 10:54:14 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:14.822 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 10000 count 100
May 10 10:54:15 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:15.937 [WARN]   [PID: 021488] socket.io getStreamKeys dbsize 10000 count 100
May 10 10:54:27 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:27.046 [ERROR]  [PID: 021488] { ReplyError: ERR unknown command `ls`, with args beginning with:
May 10 10:54:27 server p3xrs.js[21488]:     at parseError (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:179:12)
May 10 10:54:27 server p3xrs.js[21488]:     at parseType (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'ls', args: [] } }
May 10 10:54:55 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:54:55.249 [ERROR]  [PID: 021488] { ReplyError: ERR unknown command `ll`, with args beginning with:
May 10 10:54:55 server p3xrs.js[21488]:     at parseError (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:179:12)
May 10 10:54:55 server p3xrs.js[21488]:     at parseType (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:302:14) command: { name: 'll', args: [] } }
May 10 10:55:01 server p3xrs.js[21488]: [P3XRS] 2019/05/10 10:55:01.177 [ERROR]  [PID: 021488] 5/10/2019, 10:55:01 AM uncaughtException TypeError: Cannot read property 'command' of undefined
May 10 10:55:01 server p3xrs.js[21488]:     at Redis.exports.returnError (/var/p3x-redis-ui-server/node_modules/ioredis/built/redis/parser.js:36:20)
May 10 10:55:01 server p3xrs.js[21488]:     at JavascriptRedisParser.returnError (/var/p3x-redis-ui-server/node_modules/ioredis/built/redis/parser.js:20:19)
May 10 10:55:01 server p3xrs.js[21488]:     at JavascriptRedisParser.execute (/var/p3x-redis-ui-server/node_modules/redis-parser/lib/parser.js:542:14)
May 10 10:55:01 server p3xrs.js[21488]:     at Socket.<anonymous> (/var/p3x-redis-ui-server/node_modules/ioredis/built/redis/event_handler.js:107:26)
May 10 10:55:01 server p3xrs.js[21488]:     at Socket.emit (events.js:193:13)
May 10 10:55:01 server p3xrs.js[21488]:     at addChunk (_stream_readable.js:295:12)
May 10 10:55:01 server p3xrs.js[21488]:     at readableAddChunk (_stream_readable.js:276:11)
May 10 10:55:01 server p3xrs.js[21488]:     at Socket.Readable.push (_stream_readable.js:231:10)
May 10 10:55:01 server p3xrs.js[21488]:     at TCP.onStreamRead (internal/stream_base_commons.js:150:17)
May 10 10:55:01 server systemd[1]: p3x-redis-ui-example.service: Main process exited, code=exited, status=1/FAILURE
May 10 10:55:01 server systemd[1]: p3x-redis-ui-example.service: Failed with result 'exit-code'.
@p3x-robot
Copy link
Member Author

solved by checking on the main command if it includes with command array and seems to be good.

        if (!socket.p3xrs.commands.includes(mainCommand)) {
            throw new Error(`UNKNOWN COMMAND: ${mainCommand}`)
        }

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

No branches or pull requests

1 participant