Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wechaty PadLocal couldn't send messages, logout,... after logged in 2-3 days #2442

Closed
Hamlet626 opened this issue Sep 6, 2022 · 4 comments
Closed

Comments

@Hamlet626
Copy link

Hamlet626 commented Sep 6, 2022

1. Versions

I am using padlocal token with dependencies
"wechaty": "^1.19.10",
"wechaty-puppet-padlocal": "^1.20.1",
"wechaty-puppet": "^1.19.6",
node v18.1.0 ,
on Linux/UNIX.

2. Describe the bug

So after scanning QRcode logged in for 2-3 days, operations like sending messages in room, logging out gets error below; findAll() rooms doesn't fetch newest room list.

Sending messages, logout error:
ERR Config Wechaty unhandledRejection: VError: [tid:43769095] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:43769095] wechat request io error
51662485796_ pic_hd

on pad-local.com it shows logged off as below, while on WeChat it shows logged in on another device and bot.isLoggedIn is still true.
Screen Shot 2022-09-06 at 1 39 55 PM

3. To Reproduce

Steps to reproduce the behavior:

  1. go to https://github.com/Hamlet626/wechaty-server, download code
  2. follow README.md in https://github.com/Hamlet626/wechaty-server.
  3. login by scanning QRcode and wait for 2-3 days, then sending messages, logout, ... wouldn't work.
    console will show "wechat request io error" mentioned above

4. Expected behavior

sending messages, logout,... functions should work as usual.

5. Actual behavior

every functions works as usual on first 2-3 days,
while after that room.say(),bot.logout(),... doesn't work and will show error

6. Full Output Logs

ERROR TEXT:
16:57:12 ERR Config ###########################
16:57:12 ERR Config process.on(unhandledRejection) promise.catch([tid:43769095] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:4
3769095] wechat request io error)
Config SubRequestCancelError [VError]: [tid:43769095] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:43769095] wechat request io
error
at Request._failAllPendingRequest (/app/node_modules/padlocal-client-ts/dist/Request.js:265:19)
at ClientDuplexStreamImpl. (/app/node_modules/padlocal-client-ts/dist/Request.js:56:18)
at ClientDuplexStreamImpl.emit (node:events:394:28)
at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:413:28)
at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
jse_shortmsg: '[tid:43769095] request has been cancelled for reason: SERVER_ERROR',
jse_cause: Error: 2 UNKNOWN: [tid:43769095] wechat request io error
at Object.callErrorFromStatus (/app/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:413:49)
at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:188:78
at processTicksAndRejections (node:internal/process/task_queues:78:11)
for call at
at ServiceClientImpl.makeBidiStreamRequest (/app/node_modules/@grpc/grpc-js/build/src/client.js:398:30)
at ServiceClientImpl.action (/app/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at new Request (/app/node_modules/padlocal-client-ts/dist/Request.js:41:51)
at PadLocalClient.createRequest (/app/node_modules/padlocal-client-ts/dist/PadLocalClient.js:93:21)
at PadLocalClient. (/app/node_modules/padlocal-client-ts/dist/PadLocalClient.js:125:25)
at Generator.next ()
at /app/node_modules/padlocal-client-ts/dist/PadLocalClient.js:8:71
at new Promise ()
at __awaiter (/app/node_modules/padlocal-client-ts/dist/PadLocalClient.js:4:12)
at PadLocalClient.request (/app/node_modules/padlocal-client-ts/dist/PadLocalClient.js:124:16) {
code: 2,
details: '[tid:43769095] wechat request io error',
metadata: Metadata { internalRepr: [Map], options: {} }
},
jse_info: {},
reason: 1
}

7. Additional context

related wechaty/puppet-padlocal#195

I was deploying a server with Wechaty as a functionality on AWS. I used API for Wechaty operation, but some API(such as say in room, logout)doesn't work after logged in 2-3 days, some(such as findAll rooms) just doesn't fetch up-to-date data.

@Hamlet626
Copy link
Author

有大佬知道这种情况是已经掉线了吗,还是什么原因吗?
微信上显示其他设备还在登陆,bot.isLoggedIn也是true,然后pad-local.com那个网站token那是未登陆。一些主动操作的方程比如room.say(),bot.logout() 都会出那个io error,然后room.findAll()这些好像一直是之前的list没变。
如果掉线的话是因为手机那边微信掉了吗,还是正常就会过几天要重新登陆吗?

提前感谢!!

@liuguangrui123
Copy link

这个问题也卡我好几天了 不清楚具体原因

@JankinHou
Copy link

这个问题也卡我好几天了 不清楚具体原因

有得到解决吗

Copy link

dosubot bot commented Nov 19, 2023

Hi, @Hamlet626. I'm Dosu, and I'm here to help the wechaty team manage their backlog. I wanted to let you know that we are marking this issue as stale.

Based on my understanding, you reported an issue where after using Wechaty PadLocal for 2-3 days, operations like sending messages and logging out result in errors. The error message suggests a server error causing request cancellation. There have been comments from liuguangrui123 and JankinHou, but unfortunately, no solution has been provided yet.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the wechaty repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and contribution to the wechaty community.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 19, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants