tedis icon indicating copy to clipboard operation
tedis copied to clipboard

ERR_INVALID_ARG_TYPE The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received undefined

Open veeramani-clay opened this issue 4 years ago • 6 comments

get by key the issue got it const tediss = new Tedis({ port: 6379, host: "127.0.0.1" });

          let response_all = await tediss.get("d751713988987e9331980363e24189ce");
    

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received undefined at Function.byteLength (buffer.js:725:11) at Protocol.parse (/home/lap53_claysol/Public/cms/serverless/cmsContentpartners/cp/node_modules/tedis/src/core/protocol.ts:74:29) at Socket. (/home/lap53_claysol/Public/cms/serverless/cmsContentpartners/cp/node_modules/tedis/src/core/base.ts:133:23) at Socket.emit (events.js:314:20) at Socket.EventEmitter.emit (domain.js:483:12) at addChunk (_stream_readable.js:297:12) at readableAddChunk (_stream_readable.js:272:9) at Socket.Readable.push (_stream_readable.js:213:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)

veeramani-clay avatar Dec 02 '20 13:12 veeramani-clay

I'm facing that issue also very often. Can't tell exactly when it is happening and I somehow can't catch it ..

buffer.js:726
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received undefined
    at Function.byteLength (buffer.js:726:11)
    at Protocol.parse (/Users/jannikzinkl/Documents/git/pfeffer-frost-frontend/node_modules/tedis/build/core/protocol.js:67:41)
    at Socket.<anonymous> (/Users/jannikzinkl/Documents/git/pfeffer-frost-frontend/node_modules/tedis/build/core/base.js:157:32)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
    at Socket.Readable.push (_stream_readable.js:212:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:186:23) {
  code: 'ERR_INVALID_ARG_TYPE'
}

JannikZed avatar Dec 20 '20 14:12 JannikZed

same issue

julles avatar Jan 05 '21 13:01 julles

I have not been able to determine a way to reproduce it as it happens at different moments with the very same requests. As this library does not have any changes in the last 10 months and this issue is recent, could it be an incompatibility with some versions of Node, Redis, or both?

Node versions: 14.15.3 and 12.20.1 Redis version: 6.0.9

As it cannot be catched in any way, this bug seems pretty critical.

ignlg avatar Jan 15 '21 09:01 ignlg

Happens for Node versions

v13.14.0 v12.21.0 v11.15.0

as well. Also tried to reinsert the data with v11. Same problem.

Running redis 4.x.x

I have seen that @cBiscuitSurprise has worked on the protocol here: https://github.com/cBiscuitSurprise/tedis/pull/1 But if I build the MR manually, my app just stuck. But maybe he has a clue?

stvnwrgs avatar Feb 25 '21 11:02 stvnwrgs

This issue will be investigated and fixed

dasoncheng avatar Oct 13 '21 07:10 dasoncheng

same issue :/

coolirisroto avatar Dec 05 '21 00:12 coolirisroto