小程序模板消息大部分正常,偶尔失败,报的错误码非常奇怪? [你简直就是顺风耳,什么都知道啊。]

- 当前 Bug 的表现(可附上截图)


- 预期表现


- 复现路径


- 提供一个最简复现 Demo


小程序模板消息请求1:{"touser":"o10mf4omdrxYC4FboFDei2YWZlj8","template_id":"9tP_RxTj50s8J3beXXcBVrOEgQW9ENIhD9Q7Edfi1P8","form_id":"wx19214422447040b470b717da2187946021","page":"lionfish_comshop/pages/order/order?id=116","data":{"keyword1":{"value":"20190219154515510","color":"#030303"},"keyword2":{"value":"2019-02-19 21:44:36","color":"#030303"},"keyword3":{"value":"u5851u6599u810fu8863u7beeu810fu8863u670du6536u7eb3u7b50u88c5u8863u7269u5a04u7beeu5b50u653eu7684u8d43u84ddu6846u7b80u7ea6u5bb6u7528u6d17u8863u7bd3u6876 rn","color":"#030303"},"keyword4":{"value":"0.01","color":"#030303"},"keyword5":{"value":"u4f60u5df2u652fu4ed8u6210u529fuff0cu5546u5bb6u4f1au5c3du5febu4e3au4f60u53d1u8d27uff0cu8bf7u8010u5fc3u7b49u5f85u54e6","color":"#030303"}}}


这条请求成功


模板消息请求2:

{"touser":"o10mf4omdrxYC4FboFDei2YWZlj8","template_id":"9tP_RxTj50s8J3beXXcBVrOEgQW9ENIhD9Q7Edfi1P8","form_id":"wx1921201527716818895597f03704792291","page":"lionfish_comshop/pages/order/order?id=114","data":{"keyword1":{"value":"20190219110248545","color":"#030303"},"keyword2":{"value":"2019-02-19 21:20:19","color":"#030303"},"keyword3":{"value":"u5851u6599u810fu8863u7beeu810fu8863u670du6536u7eb3u7b50u88c5u8863u7269u5a04u7beeu5b50u653eu7684u8d43u84ddu6846u7b80u7ea6u5bb6u7528u6d17u8863u7bd3u6876 rn","color":"#030303"},"keyword4":{"value":"0.01","color":"#030303"},"keyword5":{"value":"u4f60u5df2u652fu4ed8u6210u529fuff0cu5546u5bb6u4f1au5c3du5febu4e3au4f60u53d1u8d27uff0cu8bf7u8010u5fc3u7b49u5f85u54e6","color":"#030303"}}}


这条请求失败,失败的原因,无法想象:返回是:

{"errcode":40003,"errmsg":"invalid openid hint: [uPAw04193055]"}


OPENID 是不可能错误的,这个模板消息已经收到很多条了。只是偶尔收不到,做了日志查看,发现返回是这个错误。难以理解,请问有遇到这个问题吗?


  • 检查下是否可能是用错access_token了,导致openid和账号不匹配。, 任何游戏都是需要游戏账号才能玩。
    • 这个我检查一下,access_token 倒是只有1个目前,我先检查下,再来回复您。, 省点力气,我们一句一句聊,别回这么长啦!
  • 必现吗?检查下报错的openid?, 不明白你的意思。
    • 是的,我今天早上又出现了。 数据: {"errcode":40003,"errmsg":"invalid openid hint: [oqlbrA09558630]"}  返回openid不对的发送时的模板消息 数据如下: {"touser":"o10mf4omdrxYC4FboFDei2YWZlj8","template_id":"9tP_RxTj50s8J3beXXcBVrOEgQW9ENIhD9Q7Edfi1P8","form_id":"wx201032298281500fbc0603fb3207828769","page":"lionfish_comshop/pages/order/order?id=121","data":{"keyword1":{"value":"20190220110056102","color":"#030303"},"keyword2":{"value":"2019-02-20 10:32:35","color":"#030303"},"keyword3":{"value":"u5e7fu897fu6842u6797u7802u7cd6u6a58 rn","color":"#030303"},"keyword4":{"value":"0.02","color":"#030303"},"keyword5":{"value":"u4f60u5df2u652fu4ed8u6210u529fuff0cu5546u5bb6u4f1au5c3du5febu4e3au4f60u53d1u8d27uff0cu8bf7u8010u5fc3u7b49u5f85u54e6","color":"#030303"}}} 我过2分钟,重新下了一单: 发送消息正确了。发送数据跟 返回结果如下: {"errcode":0,"errmsg":"ok"} {"touser":"o10mf4omdrxYC4FboFDei2YWZlj8","template_id":"9tP_RxTj50s8J3beXXcBVrOEgQW9ENIhD9Q7Edfi1P8","form_id":"wx20103330755904edd286b03f3162973481","page":"lionfish_comshop/pages/order/order?id=122","data":{"keyword1":{"value":"20190220197561001","color":"#030303"},"keyword2":{"value":"2019-02-20 10:33:35","color":"#030303"},"keyword3":{"value":"u5e7fu897fu6842u6797u7802u7cd6u6a58 rn","color":"#030303"},"keyword4":{"value":"0.01","color":"#030303"},"keyword5":{"value":"u4f60u5df2u652fu4ed8u6210u529fuff0cu5546u5bb6u4f1au5c3du5febu4e3au4f60u53d1u8d27uff0cu8bf7u8010u5fc3u7b49u5f85u54e6","color":"#030303"}}} 麻烦您看下,这两个openid 是相同的,都是我本人微信号的openid , 说的貌似很有深意,你能一条一条说么?