4.1.0 publish breaks when publishing an integer
Open
Nobody has claimed this yet.
Bug
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 40
Description
This was working fine up until 4.0.6 but starting in version 4.1.0, publishing integers throws the following error.
/node_modules/@redis/client/dist/lib/client/RESP2/encoder.js:20
throw new TypeError('Invalid argument type');
^
TypeError: Invalid argument type
at encodeCommand (/node_modules/@redis/client/dist/lib/client/RESP2/encoder.js:20:19)
at RedisCommandsQueue.getCommandToSend (/node_modules/@redis/client/dist/lib/client/commands-queue.js:187:45)
at Commander._RedisClient_tick (/node_modules/@redis/client/dist/lib/client/index.js:429:76)
at Commander._RedisClient_sendCommand (/node_modules/@redis/client/dist/lib/client/index.js:413:82)
at Commander.commandsExecutor (/node_modules/@redis/client/dist/lib/client/index.js:167:154)
at Commander.BaseClass.<computed> [as publish] (/node_modules/@redis/client/dist/lib/commander.js:8:29)
Environment:
- Node.js Version: 16
- Redis Server Version: 4
- Node Redis Version: 4.1.0
- Platform: Ubuntu
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce publishing an integer with Node.js 16, Redis 4, and node-redis 4.1.0, then start at the publish entry point and the @redis/client RESP2 encoder.js stack-trace location. Trace how the integer reaches encodeCommand; done means integer publishing no longer raises Invalid argument type under the reported environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, redis, typescript
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100