Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小程序图片异步检测mediaCheckAsync方法调用异常 #3222

Open
caiyonglong opened this issue Jan 19, 2024 · 2 comments
Open

小程序图片异步检测mediaCheckAsync方法调用异常 #3222

caiyonglong opened this issue Jan 19, 2024 · 2 comments

Comments

@caiyonglong
Copy link

简要描述

使用内容安全接口,调用图片检测方法wxMaService.getSecCheckService().mediaCheckAsync,微信回调成功了,但是日志中除了微信返回的结果信息,还有一些错误信息。这个方法会返回图片检测结果吗?已经根据demo配置了,不清楚是否还有其他配置?

模块版本情况

  • WxJava 模块名: weixin-java-miniapp
  • WxJava 版本号: 4.6.0

详细描述

尽量详细描述。请不要使用截图,尽量使用文字描述,代码直接贴上来,日志则请附在后面所示区域。

日志

20:12:23.413 [http-nio-8181-exec-10] INFO  c.b.a.m.wxmp.rest.WxPortalController - 
接收微信请求:[msg_signature=[7e9e0d66d7b864a3aa34301a0763a8d6d3e65715], encrypt_type=[aes], signature=[f23ffcf57c773f5a2ffd3cea72648615fe05d583], timestamp=[1705666343], nonce=[1807625069], requestBody=[
{"ToUserName":"gh_34bef789ce27","FromUserName":"o4wh15PcL2adti389DzOpREtFm20","CreateTime":1705666343,"MsgType":"event","Event":"wxa_media_check","appid":"wx4b0a21da5e127405","trace_id":"65aa6721-75a6b89e-095b9dbf","version":2,"detail":[{"strategy":"content_model","errcode":0,"suggest":"pass","label":100,"prob":90}],"errcode":0,"errmsg":"ok","result":{"suggest":"pass","label":100},"Encrypt":"IQKg8jKWfA8RXTuID3Eo6PGG+IYtUMelJGpAa0IFZroX6im+gvvy6BsNq0gqtkMNBkHYMH33mzmX+vyuWZr+jEG1uuNegTPLJokbDhAP2IllvIH0HK/vvzkgiw/IOrkQIqHUwfJ+3sHJzLqclSba54Tqap0Jyw7qOxGcP93XGqeU2ew5t2tTT0avFPUwiox485giMMYVLhkrCWss7VYqYuF8fETefo0rqLHzuR1t9eCazDq2Bga0qKR+przogD/L/7kLli63G9B76+LIfdnuy4tyUxYg11x8gfOGV4Jt76ev7YgX3Ot2gUF8VKOZ4wvm/PysuFgA08n54NNDfgUlX9br6Vj/nkElQtMGy+5MVKyNxtZ+tkPKLpsDw60eXg4NK/+s7aCym/ons7pu/J1egOcChb9f30EUJWkHoL7u1iKUn0xGKNohC1yeLx0orF6UfFnDmmCyFEB/yt1GHEVyNmqDgivPADRRWwtSJW+q3a20RqM3IZq2WKdzk6XUa57zH0e7cIbBCXmSWHam0U+wDClxmKh9AVI0hysnTb66Qin6HKLlRBJkmuH3F8/ojMsklE/uxmuBdfVovcsbOajHOg=="}
] 
20:12:23.433 [WxMaMessageRouter-pool-0] INFO  c.b.a.m.w.config.WxMaConfiguration - 收到消息:{"Encrypt":"IQKg8jKWfA8RXTuID3Eo6PGG+IYtUMelJGpAa0IFZroX6im+gvvy6BsNq0gqtkMNBkHYMH33mzmX+vyuWZr+jEG1uuNegTPLJokbDhAP2IllvIH0HK/vvzkgiw/IOrkQIqHUwfJ+3sHJzLqclSba54Tqap0Jyw7qOxGcP93XGqeU2ew5t2tTT0avFPUwiox485giMMYVLhkrCWss7VYqYuF8fETefo0rqLHzuR1t9eCazDq2Bga0qKR+przogD/L/7kLli63G9B76+LIfdnuy4tyUxYg11x8gfOGV4Jt76ev7YgX3Ot2gUF8VKOZ4wvm/PysuFgA08n54NNDfgUlX9br6Vj/nkElQtMGy+5MVKyNxtZ+tkPKLpsDw60eXg4NK/+s7aCym/ons7pu/J1egOcChb9f30EUJWkHoL7u1iKUn0xGKNohC1yeLx0orF6UfFnDmmCyFEB/yt1GHEVyNmqDgivPADRRWwtSJW+q3a20RqM3IZq2WKdzk6XUa57zH0e7cIbBCXmSWHam0U+wDClxmKh9AVI0hysnTb66Qin6HKLlRBJkmuH3F8/ojMsklE/uxmuBdfVovcsbOajHOg==","ToUserName":"gh_34bef789ce27","FromUserName":"o4wh15PcL2adti389DzOpREtFm20","CreateTime":1705666343,"MsgType":"event","Event":"wxa_media_check","appid":"wx4b0a21da5e127405","trace_id":"65aa6721-75a6b89e-095b9dbf","version":2,"result":{"suggest":"pass","label":"100"},"detail":[{"strategy":"content_model","errcode":0,"suggest":"pass","label":"100","prob":90}]}
20:12:23.643 [WxMaMessageRouter-pool-0] WARN  c.b.w.m.api.impl.BaseWxMaServiceImpl - 
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=76_U7d47l7iocTBrzUErqVuWKB1XSctZu9jPALYvhTDDqSHUP4zBGbddVd06zvEY-IUXrLzAuTonctcSHhfFYN4OxTmtuUSjVFhiFtgnaetjVCUSPEFaiQXFA0ac5YUZWcAFAPUR
【请求参数】:{"touser":"o4wh15PcL2adti389DzOpREtFm20","msgtype":"text","text":{"content":"收到信息为:{\"Encrypt\":\"IQKg8jKWfA8RXTuID3Eo6PGG+IYtUMelJGpAa0IFZroX6im+gvvy6BsNq0gqtkMNBkHYMH33mzmX+vyuWZr+jEG1uuNegTPLJokbDhAP2IllvIH0HK/vvzkgiw/IOrkQIqHUwfJ+3sHJzLqclSba54Tqap0Jyw7qOxGcP93XGqeU2ew5t2tTT0avFPUwiox485giMMYVLhkrCWss7VYqYuF8fETefo0rqLHzuR1t9eCazDq2Bga0qKR+przogD/L/7kLli63G9B76+LIfdnuy4tyUxYg11x8gfOGV4Jt76ev7YgX3Ot2gUF8VKOZ4wvm/PysuFgA08n54NNDfgUlX9br6Vj/nkElQtMGy+5MVKyNxtZ+tkPKLpsDw60eXg4NK/+s7aCym/ons7pu/J1egOcChb9f30EUJWkHoL7u1iKUn0xGKNohC1yeLx0orF6UfFnDmmCyFEB/yt1GHEVyNmqDgivPADRRWwtSJW+q3a20RqM3IZq2WKdzk6XUa57zH0e7cIbBCXmSWHam0U+wDClxmKh9AVI0hysnTb66Qin6HKLlRBJkmuH3F8/ojMsklE/uxmuBdfVovcsbOajHOg==\",\"ToUserName\":\"gh_34bef789ce27\",\"FromUserName\":\"o4wh15PcL2adti389DzOpREtFm20\",\"CreateTime\":1705666343,\"MsgType\":\"event\",\"Event\":\"wxa_media_check\",\"appid\":\"wx4b0a21da5e127405\",\"trace_id\":\"65aa6721-75a6b89e-095b9dbf\",\"version\":2,\"result\":{\"suggest\":\"pass\",\"label\":\"100\"},\"detail\":[{\"strategy\":\"content_model\",\"errcode\":0,\"suggest\":\"pass\",\"label\":\"100\",\"prob\":90}]}"}}
【错误信息】:错误代码:45015, 错误信息:回复时间超过限制,微信原始报文:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled rid: 65aa6727-1c4bac86-7828ad22"}
20:12:23.643 [WxMaMessageRouter-pool-0] ERROR m.c.w.c.util.LogExceptionHandler - Error happens
me.chanjar.weixin.common.error.WxErrorException: 错误代码:45015, 错误信息:回复时间超过限制,微信原始报文:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled rid: 65aa6727-1c4bac86-7828ad22"}
        at cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl.executeInternal(BaseWxMaServiceImpl.java:327)
        at cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl.execute(BaseWxMaServiceImpl.java:253)
        at cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl.post(BaseWxMaServiceImpl.java:227)
        at cn.binarywang.wx.miniapp.api.impl.WxMaMsgServiceImpl.sendKefuMsg(WxMaMsgServiceImpl.java:30)
        at com.baozouptu.api.modules.wxmp.config.WxMaConfiguration.lambda$new$4(WxMaConfiguration.java:85)
        at cn.binarywang.wx.miniapp.message.WxMaMessageRouterRule.service(WxMaMessageRouterRule.java:228)
        at cn.binarywang.wx.miniapp.message.WxMaMessageRouter.lambda$route$0(WxMaMessageRouter.java:143)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)
Caused by: me.chanjar.weixin.common.error.WxErrorException: 错误代码:45015, 错误信息:回复时间超过限制,微信原始报文:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled rid: 65aa6727-1c4bac86-7828ad22"}
        at me.chanjar.weixin.common.util.http.SimplePostRequestExecutor.handleResponse(SimplePostRequestExecutor.java:57)
        at me.chanjar.weixin.common.util.http.apache.ApacheSimplePostRequestExecutor.execute(ApacheSimplePostRequestExecutor.java:44)
        at me.chanjar.weixin.common.util.http.apache.ApacheSimplePostRequestExecutor.execute(ApacheSimplePostRequestExecutor.java:23)
        at cn.binarywang.wx.miniapp.api.impl.BaseWxMaServiceImpl.executeInternal(BaseWxMaServiceImpl.java:299)
        ... 11 common frames omitted
@wisp-x
Copy link

wisp-x commented Jan 26, 2024

same

@binarywang
Copy link
Member

你提供的错误日志跟描述错误没关系,这个接口应该是异步检测接口,你看下对应文档,应该是有消息通知发回来,你要对应去读取检测结果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants