wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
629 stars 88 forks source link

ERR longlink reset #188

Open TankNee opened 2 years ago

TankNee commented 2 years ago

可以登录成功,但是看报错发现长链接一直有问题,梯子不管是开着还是关着,都会有这个问题。

19:38:11 ERR [Request] [tid:cbd381e9], padlocal grpc request failed: 3, error: IOError: [tid:cbd381e9] Exception while handling wechat request: longlink reset
19:38:11 ERR [PadLocalClient] error while syncing onpush: VError: [tid:cbd381e9] request has been cancelled for reason: CLIENT_ERROR: [tid:cbd381e9] Exception while handling wechat request: longlink reset
    at Request._failAllPendingRequest (/Users/tanknee/Documents/LocalCodeRepo/WechatyMessageAggregation/wma-setup/node_modules/padlocal-client-ts/src/Request.ts:338:15)
    at Request.error (/Users/tanknee/Documents/LocalCodeRepo/WechatyMessageAggregation/wma-setup/node_modules/padlocal-client-ts/src/Request.ts:351:10)
    at Request.<anonymous> (/Users/tanknee/Documents/LocalCodeRepo/WechatyMessageAggregation/wma-setup/node_modules/padlocal-client-ts/src/Request.ts:221:16)
    at Generator.throw (<anonymous>)
    at rejected (/Users/tanknee/Documents/LocalCodeRepo/WechatyMessageAggregation/wma-setup/node_modules/padlocal-client-ts/dist/Request.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at FSWatcher.<anonymous> (/Users/tanknee/Documents/LocalCodeRepo/WechatyMessageAggregation/wma-setup/src/utils/watcher.ts:17:31)
    at FSWatcher.emit (node:events:527:28)
    at FSWatcher.emit (node:domain:475:12)
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:212:12)
doffodil commented 2 years ago

我也是,已经三天了,还是没能解决

suntong commented 2 years ago

我也是,也已经三天了,一直没能解决。

不过今天想来报错,结果又能用了。

Try this and see if it fixes for your case as well.

First of all, my symptom is exactly as reported above. Got ERR longlink reset, then my script aborted, tried as many times as I could but always aborted in the end.

Then I tried to run ding-dong-bot.ts from under examples within https://github.com/wechaty/getting-started, and run it with:

export WECHATY_LOG=silly

And my starting-script problem just magically went away.

Try it and see if it fixes your problem as well.

suntong commented 2 years ago

Try it and see if it fixes your problem as well.

If not, run your script with

export WECHATY_LOG=verbose

And see what request is causing such longlink reset or long link send request timeout issue, then report back here.

TankNee commented 2 years ago
export WECHATY_LOG=silly

只会改变日志级别,不会对代码其他部分产生影响吧。

suntong commented 2 years ago

So what are you trying to say then?

TankNee commented 2 years ago

改变日志级别对 longlink reset 这个问题应该不会有什么影响啊

doffodil commented 2 years ago

我也是,已经三天了,还是没能解决

我什么都没有做,大概过了5天,问题自己消失了。我至今不知道是什么导致的。

suntong commented 2 years ago

改变日志级别对 longlink reset 这个问题应该不会有什么影响啊

And the reason my starting-script problem just magically went away is ...?
Think!

Our logical reasoning is not to confine ourselves, but to liberate us instead.

run your script with

export WECHATY_LOG=verbose

And see what request is causing such longlink reset or long link send request timeout issue,

Here are more logs,

23:37:02 VERB Message find({"id":"6045178684053459128"})
23:37:02 VERB Message findAll({"id":"6045178684053459128"})
23:37:02 VERB PuppetMessageMixin messageSearch({"id":"6045178684053459128"})
23:37:02 VERB PuppetMessageMixin messagePayload(6045178684053459128)
23:37:02 VERB Message static load(6045178684053459128)
23:37:02 VERB Message constructor(6045178684053459128) for class WechatifiedMessageImpl
23:37:02 VERB Message ready()
23:37:02 VERB PuppetMessageMixin messagePayload(6045178684053459128)
23:37:02 VERB Message find({"id":"4668718105156783908"})
23:37:02 VERB Message findAll({"id":"4668718105156783908"})
23:37:02 VERB PuppetMessageMixin messageSearch({"id":"4668718105156783908"})
23:37:02 VERB PuppetMessageMixin messagePayload(4668718105156783908)
23:37:02 VERB Room topic()
23:37:02 VERB Message static load(4668718105156783908)
23:37:02 VERB Message constructor(4668718105156783908) for class WechatifiedMessageImpl
23:37:02 VERB Message ready()
23:37:02 VERB PuppetMessageMixin messagePayload(4668718105156783908)
23:37:02 VERB Room topic()
23:37:02 VERB PuppetRoomMemberMixin roomMemberPayloadDirty(24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin __dirtyPayloadAwait(RoomMember<4>, 24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:02 VERB PuppetRoomMixin roomPayload(24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin dirtyPayload(Room<3>, 24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin onDirty(Room<3>, 24611302641@chatroom)
23:37:02 VERB PuppetRoomMixin roomPayload(24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:02 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:03 VERB PuppetCacheMixin dirtyPayload(Room<3>, 24611302641@chatroom)
23:37:03 VERB PuppetCacheMixin onDirty(Room<3>, 24611302641@chatroom)
23:37:03 VERB PuppetRoomMixin roomPayload(24611302641@chatroom)
23:37:03 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:03 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:04 VERB PuppetCacheMixin dirtyPayload(Room<3>, 24611302641@chatroom)
23:37:04 VERB PuppetCacheMixin onDirty(Room<3>, 24611302641@chatroom)
23:37:04 VERB PuppetRoomMixin roomPayload(24611302641@chatroom)
23:37:04 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:04 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:11 ERR [Request] [tid:a8d80257], padlocal grpc request failed: 3, error: IOError: [tid:a8d80257] Exception while handling wechat request: long link send request timeout
23:37:11 ERR [PadLocalClient] error while syncing onpush: VError: [tid:a8d80257] request has been cancelled for reason: CLIENT_ERROR: [tid:a8d80257] Exception while handling wechat request: long link send request timeout
    at Request._failAllPendingRequest (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:265:19)
    at Request.error (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:275:14)
    at Request.<anonymous> (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:159:30)
    at Generator.throw (<anonymous>)
    at rejected (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:6:65)
23:37:12 VERB PuppetCacheMixin dirtyPayload(Room<3>, 24611302641@chatroom)
23:37:12 VERB PuppetCacheMixin onDirty(Room<3>, 24611302641@chatroom)
23:37:12 VERB PuppetRoomMixin roomPayload(24611302641@chatroom)
23:37:12 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:12 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:12 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:12 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:16 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:18 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:18 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:37:18 VERB PuppetCacheMixin dirtyPayload(RoomMember<4>, 24611302641@chatroom)
23:37:18 VERB PuppetCacheMixin onDirty(RoomMember<4>, 24611302641@chatroom)
23:38:44 ERR [Request] [tid:a4f35a76], padlocal grpc request failed: 1, error: Error: 4 DEADLINE_EXCEEDED: Deadline exceeded
23:38:44 WARN [LongLink] [101.32.118.25:80] close connection on error,IOError: Exception while unpacking long link data: [tid:a4f35a76] request has been cancelled for reason: SERVER_ERROR: 4 DEADLINE_EXCEEDED: Deadline exceeded
23:38:44 WARN [LongLink] longlink reconnect [1] after delay:1000ms
23:38:44 ERR Config ###########################
23:38:44 ERR Config Wechaty unhandledRejection: VError: [tid:a4f35a76] request has been cancelled for reason: SERVER_ERROR: 4 DEADLINE_EXCEEDED: Deadline exceeded
    at Request._failAllPendingRequest (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:265:19)
    at ClientDuplexStreamImpl.<anonymous> (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:56:18)
    at ClientDuplexStreamImpl.emit (node:events:520:28)
    at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client.js:409:28)
    at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
    at runNextTicks (node:internal/process/task_queues:65:3)
    at listOnTimeout (node:internal/timers:528:9)
    at processTimers (node:internal/timers:502:7) [object Promise]
23:38:44 ERR Config ###########################
23:38:44 ERR Config process.on(unhandledRejection) promise.catch([tid:a4f35a76] request has been cancelled for reason: SERVER_ERROR: 4 DEADLINE_EXCEEDED: Deadline exceeded)
Config SubRequestCancelError [VError]: [tid:a4f35a76] request has been cancelled for reason: SERVER_ERROR: 4 DEADLINE_EXCEEDED: Deadline exceeded
    at Request._failAllPendingRequest (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:265:19)
    at ClientDuplexStreamImpl.<anonymous> (/sysvol/gt/nodejs/node_modules/padlocal-client-ts/dist/Request.js:56:18)
    at ClientDuplexStreamImpl.emit (node:events:520:28)
    at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client.js:409:28)
    at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
    at runNextTicks (node:internal/process/task_queues:65:3)
    at listOnTimeout (node:internal/timers:528:9)
    at processTimers (node:internal/timers:502:7) {
  jse_shortmsg: '[tid:a4f35a76] request has been cancelled for reason: SERVER_ERROR',
  jse_cause: Error: 4 DEADLINE_EXCEEDED: Deadline exceeded
      at Object.callErrorFromStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
      at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client.js:409:49)
      at Object.onReceiveStatus (/sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
      at /sysvol/gt/nodejs/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
      at processTicksAndRejections (node:internal/process/task_queues:78:11)
      at runNextTicks (node:internal/process/task_queues:65:3)
      at listOnTimeout (node:internal/timers:528:9)
      at processTimers (node:internal/timers:502:7) {
    code: 4,
    details: 'Deadline exceeded',
    metadata: Metadata { internalRepr: Map(0) {}, options: {} }
  },
  jse_info: {},
  reason: 1,
  cause: [Function: ve_cause]
}

And just like doffodil reported, it happens or not happening is totally on its own, without us changing anything.