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

Getting Error only while in wsl environment #2623

Closed
Craigzyc opened this issue Sep 29, 2023 · 2 comments
Closed

Getting Error only while in wsl environment #2623

Craigzyc opened this issue Sep 29, 2023 · 2 comments
Labels

Comments

@Craigzyc
Copy link

Description

Hi,

I am running a program with node-redis and it works fine except when trying to run from wsl.

node-redis version: 4.6.10
ubuntu wsl version: tested 18 and 22
node versions: 16 and 20
run with node directly or pm2

When running in wsl I get this error.
TypeError: Cannot destructure property 'resolve' of '__classPrivateFieldGet(...).shift(...)' as it is undefined. at Object.onReply (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/commands-queue.js:62:29) at RESP2Decoder.write (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js:119:26) at RedisCommandsQueue.onReplyChunk (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/commands-queue.js:154:72) at RedisSocket.<anonymous> (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/index.js:394:84) at RedisSocket.emit (node:events:527:28) at Socket.<anonymous> (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/socket.js:201:42) at Socket.emit (node:events:527:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Socket.Readable.push (node:internal/streams/readable:234:10)

I am using the library async-redis elsewhere and it connects without issue. The underlying node-redis version there is 3.1.2

using npm install -g redis-cli I can connect in command line to the running redis instance.

closing the redis server gives the expected ECONNREFUSED.

I have reproduced this on multiple machines.

I can only think this has to be a bug in node-redis but it seems to only appear under wsl

Node.js Version

16.20.0 and 20.8.0

Redis Server Version

7.2.0 and 7.2.1

Node Redis Version

4.6.10

Platform

wsl, ubuntu 18 and 20

Logs

/node_modules/@redis/client/dist/lib/client/commands-queue.js:62
                const { resolve, reject } = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").shift();
                        ^

TypeError: Cannot destructure property 'resolve' of '__classPrivateFieldGet(...).shift(...)' as it is undefined.
    at Object.onReply (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/commands-queue.js:62:25)
    at RESP2Decoder.write (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js:119:26)
    at RedisCommandsQueue.onReplyChunk (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/commands-queue.js:154:72)
    at RedisSocket.<anonymous> (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/index.js:394:84)
    at RedisSocket.emit (node:events:514:28)
    at Socket.<anonymous> (/mnt/d/AAAAA-Projects/RAM-wsl/node_modules/@redis/client/dist/lib/client/socket.js:201:42)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)
    at readableAddChunk (node:internal/streams/readable:349:9)
    at Readable.push (node:internal/streams/readable:286:10)
@Craigzyc Craigzyc added the Bug label Sep 29, 2023
@leibale
Copy link
Contributor

leibale commented Sep 30, 2023

@Craigzyc probably a duplicate of #2417

@leibale
Copy link
Contributor

leibale commented Oct 11, 2023

Duplicate of #2417

@leibale leibale marked this as a duplicate of #2417 Oct 11, 2023
@leibale leibale closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants