weixin_39645041
weixin_39645041
2020-12-01 14:26

"wxid_xxx is not wxid, using weixin instead of wxid will potentially cause system failure."


WARN This id: wxid_kwdsw9ngbnxr12 is not wxid, using weixin instead of wxid will potentially cause system failure. To make sure everything works as excepted, please use the wxid to load Contact. 

I'm keeping receiving the above error messages, which I can not understand at all.

BTW, Can we:

  1. Make the error message be clearer, and
  2. Add the module name to the error message, just like other parts of the Wechaty system?

该提问来源于开源项目:wechaty/wechaty-puppet-padplus

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39685578 weixin_39685578 4月前

    This warn is for bot.Contact.load(id), when the id is not wxid and then will console warn log.

    But it could not work right because we can not judge it by Type7 attribute in low-level. So I will remove this log.

    You mean we need to add PRE to log?

    点赞 评论 复制链接分享
  • weixin_39645041 weixin_39645041 4月前

    The best practice to use log.verbose is:

    ts
    log.verbose('ClassName', 'methodName() log messages ...')
    

    It would be great if we can follow the above best practices in our Wechaty related modules.

    Thanks.

    点赞 评论 复制链接分享
  • weixin_39685578 weixin_39685578 4月前

    Agree, I will check all logs in padplus, and recorrect the bad one.

    点赞 评论 复制链接分享
  • weixin_39645041 weixin_39645041 4月前

    Awesome, great to know that!

    点赞 评论 复制链接分享
  • weixin_39685578 weixin_39685578 4月前

    This issue has already been resolved, it will be closed.

    点赞 评论 复制链接分享
  • m0_55551944 m0_55551944 2月前

    怎么转微信二维码

    点赞 评论 复制链接分享