发送大文件存在异常
su-chang opened this issue · 7 comments
su-chang commented
14:57:17 VERB Message say(FileBox#File<file.pdf>)
14:57:19 ERR Config ###########################
14:57:19 ERR Config unhandledRejection: VError: [tid:d2ad28ed] request has been cancelled for reason: SERVER_ERROR: 1 CANCELLED: Call cancelled
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11) [object Promise]
14:57:19 ERR Config ###########################
14:57:19 ERR Config process.on(unhandledRejection) promise.catch([tid:d2ad28ed] request has been cancelled for reason: SERVER_ERROR: 1 CANCELLED: Call cancelled)
Config { VError: [tid:d2ad28ed] request has been cancelled for reason: SERVER_ERROR: 1 CANCELLED: Call cancelled
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11)
jse_shortmsg:
'[tid:d2ad28ed] request has been cancelled for reason: SERVER_ERROR',
jse_cause:
{ Error: 1 CANCELLED: Call cancelled
at Object.callErrorFromStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call.ts:81:24)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:32)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 1,
details: 'Call cancelled',
metadata: Metadata { internalRepr: Map {}, options: {} } },
jse_info: {},
message:
'[tid:d2ad28ed] request has been cancelled for reason: SERVER_ERROR: 1 CANCELLED: Call cancelled',
reason: 1 }
(node:17342) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
su-chang commented
发送视频
15:02:54 VERB Message say(FileBox#Base64<video.mp4>)
15:02:58 ERR Config ###########################
15:02:58 ERR Config unhandledRejection: VError: [tid:0b222403] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:0b222403] internal error
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11) [object Promise]
15:02:58 ERR Config ###########################
15:02:58 ERR Config process.on(unhandledRejection) promise.catch([tid:0b222403] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:0b222403] internal error)
Config { VError: [tid:0b222403] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:0b222403] internal error
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11)
jse_shortmsg:
'[tid:0b222403] request has been cancelled for reason: SERVER_ERROR',
jse_cause:
{ Error: 2 UNKNOWN: [tid:0b222403] internal error
at Object.callErrorFromStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call.ts:81:24)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:32)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11)
code: 2,
details: '[tid:0b222403] internal error',
metadata: Metadata { internalRepr: [Map], options: {} } },
jse_info: {},
message:
'[tid:0b222403] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:0b222403] internal error',
reason: 1 }
(node:18068) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 3)
su-chang commented
会导致之后接收到的消息无法正常显示。
padlocal commented
fixed, 现在允许最大发送 20M 文件,需要发送更大文件需向 PadLocal 申请
su-chang commented
测试发送12M的pdf文件,提示如下错误:
14:06:01 VERB Message say(FileBox#File<pdf.pdf>)
14:06:02 ERR Config ###########################
14:06:02 ERR Config unhandledRejection: VError: [tid:5d444308] request has been cancelled for reason: SERVER_ERROR: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11) [object Promise]
padlocal commented
SERVER_ERROR: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted
的问题是因为 node 计算 maxSessionMemory 的 bug 导致:
nodejs/node@83aaef8
解决方案:建议将node 升级到最新的 14.15.4 LTS
版本
su-chang commented
下面日志中的问题是否也和node版本有关?
20:36:47 VERB Message say(FileBox#File<pdf.pdf>)
20:37:47 ERR Config ###########################
20:37:47 ERR Config unhandledRejection: VError: [tid:b9144efb] request has been cancelled for reason: SERVER_ERROR: 4 DEADLINE_EXCEEDED: Deadline exceeded
at Request._failAllPendingRequest (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:309:15)
at ClientDuplexStreamImpl.Request._grpcStream.on (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/padlocal-client-ts/src/Request.ts:72:12)
at ClientDuplexStreamImpl.emit (events.js:198:13)
at ClientDuplexStreamImpl.EventEmitter.emit (domain.js:448:20)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client.ts:666:18)
at Object.onReceiveStatus (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/client-interceptors.ts:387:48)
at process.nextTick (/Users/suchang/Desktop/PROJECT/Test/testPuppet/node_modules/@grpc/grpc-js/src/call-stream.ts:243:24)
at process._tickCallback (internal/process/next_tick.js:61:11) [object Promise]
padlocal commented
Fixed, wechaty-puppet-padlocal@0.2.23