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

[ioredis] Unhandled error event: ParserError: Protocol error, got "H" as reply type byte. Please report this. #4

Open
verbal-assassin opened this issue Aug 7, 2023 · 0 comments

Comments

@verbal-assassin
Copy link

verbal-assassin commented Aug 7, 2023

Pretty simple example that simply won't work. Using Node 14.20.1. Connecting to a Redis server in our network. here is the code (excluding private data which I have verified multiple times and had multiple people double check it).

both ioredis and ioredis-rejson were installed with npm

const Redis = require('ioredis-rejson');

const getRedisData = async() => {

  const redis = new Redis({
    username: 'user', // use your Redis user. More info https://redis.io/docs/management/security/acl/
    password: 'password',
    host: host
    port: port,
    tls: true,
  });

  const res2 = await redis.json_get('2ceb1a22-313c-353d-8137-cd061861ebef');
  console.log(res2);
};

module.exports = getRedisData;

execution of this is nothing more than

  await getRedisData();

the error I receive is the following

[ioredis] Unhandled error event: ParserError: Protocol error, got "H" as reply type byte. Please report this.
    at handleError (/Users/d/ocbo-node-api/node_modules/redis-parser/lib/parser.js:190:15)
    at parseType (/Users/P2950656/ocbo-node-api/node_modules/redis-parser/lib/parser.js:304:14)
[ioredis] Unhandled error event: ParserError: Protocol error, got "H" as reply type byte. Please report this.
    at handleError (/Users/d/ocbo-node-api/node_modules/redis-parser/lib/parser.js:190:15)
    at parseType (/Users/d/ocbo-node-api/node_modules/redis-parser/lib/parser.js:304:14)
Waiting for the debugger to disconnect...
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

ParserError: Protocol error, got "H" as reply type byte. Please report this.
    at handleError (/Users/d/ocbo-node-api/node_modules/redis-parser/lib/parser.js:190:15)
    at parseType (/Users/d/ocbo-node-api/node_modules/redis-parser/lib/parser.js:304:14) {
  offset: 1,
  buffer: '{"type":"Buffer","data":[72,84,84,80,47,49,46,49,32,52,48,48,32,66,97,100,32,82,101,113,117,101,115,116,13,10,68,97,116,101,58,32,77,111,110,44,32,48,55,32,65,117,103,32,50,48,50,51,32,49,55,58,51,51,58,51,49,32,71,77,84,13,10,67,111,110,116,101,110,116,45,84,121,112,101,58,32,116,101,120,116,47,104,116,109,108,13,10,67,111,110,116,101,110,116,45,76,101,110,103,116,104,58,32,49,53,48,13,10,67,111,110,110,101,99,116,105,111,110,58,32,99,108,111,115,101,13,10,13,10,60,104,116,109,108,62,13,10,60,104,101,97,100,62,60,116,105,116,108,101,62,52,48,48,32,66,97,100,32,82,101,113,117,101,115,116,60,47,116,105,116,108,101,62,60,47,104,101,97,100,62,13,10,60,98,111,100,121,62,13,10,60,99,101,110,116,101,114,62,60,104,49,62,52,48,48,32,66,97,100,32,82,101,113,117,101,115,116,60,47,104,49,62,60,47,99,101,110,116,101,114,62,13,10,60,104,114,62,60,99,101,110,116,101,114,62,110,103,105,110,120,60,47,99,101,110,116,101,114,62,13,10,60,47,98,111,100,121,62,13,10,60,47,104,116,109,108,62,13,10]}'
}

Please advise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant