wechaty / puppet-padlocal

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

Bug: SERVER_ERROR: 2 UNKNOWN #128

Closed willin closed 2 years ago

willin commented 2 years ago

请求经常莫名其妙异常失败。比如说我通过手机号查找联系人。。。有一些填的数据明明是可以查到账号的,但是程序就崩了

Friendship.search({
   phone: '13212341234' // masked
})

search using some specific param values occurs:

================================================================================

VError: [tid:e05dff73] request has been cancelled for reason: SERVER_ERROR: 2 UNKNOWN: [tid:e05dff73] wechat bad request error
    at Request._failAllPendingRequest (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/padlocal-client-ts/src/Request.ts:334:15)
    at ClientDuplexStreamImpl.<anonymous> (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/padlocal-client-ts/src/Request.ts:82:12)
    at ClientDuplexStreamImpl.emit (node:events:390:28)
    at ClientDuplexStreamImpl.emit (node:domain:475:12)
    at Object.onReceiveStatus (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/client.ts:673:18)
    at Object.onReceiveStatus (/Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48)
    at /Users/v0/Projects/Authing/wechaty-authing-poc/node_modules/@grpc/grpc-js/src/call-stream.ts:323:24
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
suntong commented 2 years ago

I get the above 莫名其妙异常失败 as well, it's not only limited to 通过手机号查找联系人, as I never did that.

zhoudali87 commented 2 years ago

遇到相同的问题,请问有解决了吗?

padlocal commented 2 years ago

因为搜索这个用户不存在或是没有全新啊,比较难深度处理,所以报了 wechat bad request error 的错误。 可以再搜索用户到时候尝试 catch 这个异常。

duanghuang commented 2 years ago

运行

contact: Contact = await self.Friendship.search( phone='183********' )
await contact.ready()

报这个错误

2022-09-02 13:54:14,474 - FriendShip - INFO - search() <<class 'abc.Friendship'>, None, 183********>
2022-09-02 13:54:14,976 - Wechaty - ERROR - internal error <'NoneType' object has no attribute 'ready'>

我运行Friendship.search就没成功过,想知道这个功能现在还能用吗?还是说不稳定?