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

message.ID() && rpc error #157

Closed Ran-Xing closed 1 year ago

Ran-Xing commented 2 years ago

今天遇见一个bug,挺奇怪的

rpc error

  1. 处理一条消息的时候
  2. 正常返回 message.Say("xxxxxxxx")
  3. 消息已经收到了,但是报了一个 Error
  4. rpc error: code = Internal desc = neither toId nor roomId
  5. 我和go的作者折腾了半天,发现是rpc的问题,希望有空排查下,如果需要,也可以远程 Debug

message.ID()

onMessage 时间中,我使用 message.ID() 作为 key ,value 为 false 然后 fatal 了,试过 map.synp 线程锁,失败 后来 使用 message.From().ID() 成功避免这个问题

总结:

Docker 0.68 无以上问题 Docker 0.78 有这两个问题

Ran-Xing commented 2 years ago

日志不好取,一取一大堆,目前是 Docker 0.68 正常运行

padlocal commented 2 years ago

Can you provide more context info?

whale1st commented 2 years ago

我今天也遇到这个问题了,同 Docker 0.78,在 使用 msgId, err := msg.Say("ok")时,会出现rpc error: code = Internal desc = neither toId nor roomId,而直接 msg.Say("ok")不去获取msgId时就不会出现这个错误信息。

Ran-Xing commented 2 years ago

@whale1st good 兄弟,欢迎常来play