puppet-padlocal icon indicating copy to clipboard operation
puppet-padlocal copied to clipboard

message.ID() && rpc error

Open Ran-Xing opened this issue 3 years ago • 4 comments

今天遇见一个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 avatar Apr 20 '22 15:04 Ran-Xing

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

Ran-Xing avatar Apr 20 '22 15:04 Ran-Xing

Can you provide more context info?

padlocal avatar Jun 06 '22 15:06 padlocal

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

whale1st avatar Aug 11 '22 01:08 whale1st

@whale1st good 兄弟,欢迎常来play

Ran-Xing avatar Aug 12 '22 08:08 Ran-Xing