Closed AlexZxh closed 2 months ago
捕获对应异常,进行重连
你好,我也出现了同样的问题,捕获对应异常重连依旧无效,使用官方提供的ding-dong-bot.ts 依旧存在该问题,这是我的配置:
这是其报错:
(node:16240) ExperimentalWarning: --experimental-loader
may be removed in the future; instead use register()
:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use node --trace-warnings ...
to show where the warning was created)
15:18:23 WARN GrpcManager initClient() TLS: disabled (INSECURE)
StarterBot GError: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error
at Object.callErrorFromStatus (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\call.js:31:19)
at Object.onReceiveStatus (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\client.js:195:52)
at Object.onReceiveStatus (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:365:141)
at Object.onReceiveStatus (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\client-interceptors.js:328:181)
at D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\call-stream.js:188:78
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at ServiceClientImpl.makeUnaryRequest (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\client.js:163:34)
at ServiceClientImpl.start (D:\code\wechat-chatgpt\node_modules\@grpc\grpc-js\build\src\make-client.js:105:19)
at node:internal/util:442:7
at new Promise (
发现原因了,环境变量WECHATY_PUPPET_SERVICE_AUTHORITY 没生效的缘故
PuppetService.start grpc call failed,the error log show as below, how to fix this problem?
17:48:21 WARN GrpcManager initClient() TLS: disabled (INSECURE) GError: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error at callErrorFromStatus (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/call.js:31:19) at Object.onReceiveStatus (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/client.js:193:76) at Object.onReceiveStatus (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141) at Object.onReceiveStatus (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181) at /Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeUnaryRequest (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/client.js:161:32) at ServiceClientImpl.start (/Users/zhangxinhe/Desktop//node_modules/@grpc/grpc-js/build/src/make-client.js:105:19) at node:internal/util:431:21 at new Promise ()
at bound (node:internal/util:417:12)
at GrpcManager.start (/Users/zhangxinhe/Desktop//node_modules/wechaty-puppet-service/dist/cjs/src/client/grpc-manager.js:134:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PuppetService.onStart (/Users/zhangxinhe/Desktop//node_modules/wechaty-puppet-service/dist/cjs/src/client/puppet-service.js:137:9)
at async PuppetService.start (/Users/zhangxinhe/Desktop/node_modules/state-switch/dist/cjs/src/service-ctl/service-ctl.js:65:17)
at async PuppetService.start (/Users/zhangxinhe/Desktop//node_modules/wechaty-puppet/dist/cjs/src/mixins/service-mixin.js:21:13) {
code: 13,
details: 'Received RST_STREAM with code 2 triggered by internal client error: Protocol error'
the code is shown as below: