wechaty / wechaty-puppet-padplus

DEPRECATED: One puppet based on iPad protocal for Wechaty
https://wechaty.js.org/docs/puppet-services/
315 stars 65 forks source link

GRPC_GATEWAY connectivity issue right now? #269

Closed suntong closed 4 years ago

suntong commented 4 years ago

Describe the bug

My program had been running fine but since about an hour ago, I'm starting to get the following errors. I'm wondering if the GRPC_GATEWAY is experiencing connectivity problems.

Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node index.js 20:42:03 VERB Contact say(Contact login) 20:42:03 SILL PuppetPadplus messageSendText(wxid_dt0...v22, Contact login) 20:42:03 VERB Puppet selfId() 20:42:03 SILL PadplusManager selfId : wxid_dt0...v22, receiver : wxid_dt0...v22, text : Contact login, type : 1 20:42:03 VERB PadplusMessage sendMessage() 20:42:03 SILL RequestClient request() 20:42:03 SILL DedupeApi dedupe() no need to dedupe api SEND_MESSAGE. 20:42:03 SILL GRPC_GATEWAY GRPC Request ApiType: SEND_MESSAGE 20:42:04 SILL PadplusUser init success 20:42:04 VERB MemoryCard get(WECHATY_PUPPET_PADPLUS) 20:42:04 SILL StateSwitch on() is pending 20:42:04 VERB StateSwitch on(true) <- (pending) 20:42:04 VERB Wechaty on(heartbeat, function) registered 20:42:04 VERB Wechaty addListenerFunction(heartbeat) 20:42:04 SILL StateSwitch on() is pending 20:42:04 VERB StateSwitch on(true) <- (pending) 20:42:34 SILL GRPC_GATEWAY keepHeartbeat() 20:42:34 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:42:34 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:42:34 SILL Wechaty memoryCheck() free: 2852 MB, require: 4 MB 20:42:34 SILL PadplusManager setContactAndRoomData() 20:42:34 SILL PadplusManager setContactAndRoomData() initialize contact and room data. 20:43:04 SILL GRPC_GATEWAY keepHeartbeat() 20:43:04 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:43:04 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:43:04 SILL Wechaty memoryCheck() free: 2832 MB, require: 4 MB 20:43:04 SILL PadplusManager setContactAndRoomData() 20:43:04 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:43:34 SILL GRPC_GATEWAY keepHeartbeat() 20:43:34 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:43:34 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:43:34 SILL Wechaty memoryCheck() free: 2831 MB, require: 4 MB 20:43:34 SILL PadplusManager setContactAndRoomData() 20:43:35 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:44:04 SILL GRPC_GATEWAY keepHeartbeat() 20:44:04 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:44:05 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:44:05 SILL Wechaty memoryCheck() free: 2850 MB, require: 4 MB 20:44:05 SILL PadplusManager setContactAndRoomData() 20:44:05 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:44:35 SILL GRPC_GATEWAY keepHeartbeat() 20:44:35 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:44:35 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:44:35 SILL Wechaty memoryCheck() free: 2831 MB, require: 4 MB 20:44:35 SILL PadplusManager setContactAndRoomData() 20:44:35 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:45:03 ERR GRPC_GATEWAY ApiType: GET_CONTACT_SELF_INFO request timeout, traceId: 5ee5dbff-e9df-4fee-bc7b-3287e6305bb0 20:45:03 ERR Config ########################### 20:45:03 ERR Config unhandledRejection: Error: can not get callback result of GET_CONTACT_SELF_INFO at PadplusContact. (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/contact.js:147:23) at Generator.next () at fulfilled (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/contact.js:5:58) [object Promise] 20:45:03 ERR Config ########################### 20:45:03 ERR Config process.on(unhandledRejection) promise.catch(can not get callback result of GET_CONTACT_SELF_INFO) Config Error: can not get callback result of GET_CONTACT_SELF_INFO at PadplusContact. (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/contact.js:147:23) at Generator.next () at fulfilled (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/contact.js:5:58) (node:287333) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) 20:45:03 ERR GRPC_GATEWAY ApiType: SEND_MESSAGE request timeout, traceId: 9803d2d5-3076-47c4-96ff-b315cb729707 Error: can not send message due to this error: Error: can not get response from grpc server at PadplusMessage. (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/message.js:180:23) at Generator.next () at fulfilled (/.../nodejs/node_modules/wechaty/node_modules/wechaty-puppet-padplus/dist/src/padplus-manager/api-request/message.js:5:58) at process._tickCallback (internal/process/next_tick.js:68:7) 20:45:05 SILL GRPC_GATEWAY keepHeartbeat() 20:45:05 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:45:05 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:45:05 SILL Wechaty memoryCheck() free: 2834 MB, require: 4 MB 20:45:05 SILL PadplusManager setContactAndRoomData() 20:45:06 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:45:35 SILL GRPC_GATEWAY keepHeartbeat() 20:45:35 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:45:36 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:45:36 SILL Wechaty memoryCheck() free: 2831 MB, require: 4 MB 20:45:36 SILL PadplusManager setContactAndRoomData() 20:45:36 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:46:06 SILL GRPC_GATEWAY keepHeartbeat() 20:46:06 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:46:06 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:46:06 SILL Wechaty memoryCheck() free: 2847 MB, require: 4 MB 20:46:06 SILL PadplusManager setContactAndRoomData() 20:46:06 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:46:36 SILL GRPC_GATEWAY keepHeartbeat() 20:46:36 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:46:36 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:46:36 SILL Wechaty memoryCheck() free: 2776 MB, require: 4 MB 20:46:36 SILL PadplusManager setContactAndRoomData() 20:46:36 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:47:06 SILL GRPC_GATEWAY keepHeartbeat() 20:47:06 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:47:06 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:47:06 SILL Wechaty memoryCheck() free: 2775 MB, require: 4 MB 20:47:06 SILL PadplusManager setContactAndRoomData() 20:47:07 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:47:36 SILL GRPC_GATEWAY keepHeartbeat() 20:47:36 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:47:37 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:47:37 SILL Wechaty memoryCheck() free: 2774 MB, require: 4 MB 20:47:37 SILL PadplusManager setContactAndRoomData() 20:47:37 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:48:07 SILL GRPC_GATEWAY keepHeartbeat() 20:48:07 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:48:07 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:48:07 SILL Wechaty memoryCheck() free: 2781 MB, require: 4 MB 20:48:07 SILL PadplusManager setContactAndRoomData() 20:48:07 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:48:37 SILL GRPC_GATEWAY keepHeartbeat() 20:48:37 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:48:37 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:48:37 SILL Wechaty memoryCheck() free: 2768 MB, require: 4 MB 20:48:37 SILL PadplusManager setContactAndRoomData() 20:48:38 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:49:07 SILL GRPC_GATEWAY keepHeartbeat() 20:49:07 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:49:08 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:49:08 SILL Wechaty memoryCheck() free: 2779 MB, require: 4 MB 20:49:08 SILL PadplusManager setContactAndRoomData() 20:49:08 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:49:38 SILL GRPC_GATEWAY keepHeartbeat() 20:49:38 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:49:38 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:49:38 SILL Wechaty memoryCheck() free: 2783 MB, require: 4 MB 20:49:38 SILL PadplusManager setContactAndRoomData() 20:49:38 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. 20:50:08 SILL GRPC_GATEWAY keepHeartbeat() 20:50:08 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:50:08 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:50:08 SILL Wechaty memoryCheck() free: 2730 MB, require: 4 MB 20:50:08 SILL PadplusManager setContactAndRoomData() 20:50:08 SILL PadplusManager setContactAndRoomData() found contact, room, friend data no change. . . . 20:53:10 SILL GRPC_GATEWAY keepHeartbeat() 20:53:10 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:53:10 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:53:10 SILL Wechaty memoryCheck() free: 2796 MB, require: 4 MB 20:53:40 SILL GRPC_GATEWAY keepHeartbeat() 20:53:40 SILL GRPC_GATEWAY GRPC Request ApiType: HEARTBEAT 20:53:40 SILL GRPC_GATEWAY throttleQueue emit heartbeat. 20:53:40 SILL Wechaty memoryCheck() free: 2797 MB, require: 4 MB ```

Note the "request timeout" error, and that the StateSwitch always remains at the (pending) stage without being able to be corrected.

Please doublecheck/confirm.

Thanks

[bug]

suntong commented 4 years ago

Normal now.