Skip to content

发送客服消息使用外部API获得access_token不缓存 #216

Description

@chijincn

现象描述

使用本地直接获取access_token会缓存,但使用外部access_token时依然不缓存。

如果使用了外部token再切换回本地直接获取方式进行发送,此时获取到的access_token也不再缓存。

【本次测试仅修改过 bug fix:修复微信小程序相关消息accessToken缓存机制问题 修改的4个文件,未测试9月5日最新版本】

环境信息

JDK1.8

重现步骤

  • 步骤1,设置 -> 微信公众号->填写appid及appscreate
  • 步骤2,新建消息、获取openid等操作
  • 步骤3,发送消息,查看日志 access_token缓存
  • 步骤4,设置 -> 微信公众号->勾选使用外部accesstoken ...
  • 步骤4,发送消息,查看日志 使用了不同的access_token
  • 步骤5,设置 -> 微信公众号->去掉勾选使用外部accesstoken ...
  • 步骤4,发送消息,查看日志 使用了不同的access_token

重启软件后可恢复。

报错信息

【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_wuJjQhzN-YJ4Jnj9RdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iLrADAtL8dsHftkSkbKoh-slgDoQTD7PM4u8kOVgMjCBS-aDDnBxJx-fukpmEJBxoXbJvDae4VBAmr9XN-eazBZVTVeAJARPR
【请求参数】:{"touser":"okmq0t5eg-23MbwOxmdwq1ANv07A","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [FV3y3a06532066]"}
11:04:14.562 [pool-5-thread-3] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [FV3y3a06532066]"}
11:04:14.563 [pool-5-thread-3] WARN c.f.tool.push.util.ConsoleUtil :30 - T-2已处理完第2-3条的数据
11:04:14.582 [pool-5-thread-4] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_qjmuOQ3kyFq3cXYvRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iL-GPc14YzfnS4CW5WAIBLc_YyeWGJddQyxAdC8ef3C-EBed7wCUnUu4yqmk_GMCe2RuUKepeuf8VLrkkiWAy0PFIQeAJAZCK
【请求参数】:{"touser":"okmq0t-YpNTT7KYLXbXnVEL8oJfE","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [aNUQbA06534107]"}
11:04:14.583 [pool-5-thread-4] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [aNUQbA06534107]"}
11:04:14.584 [pool-5-thread-4] WARN c.f.tool.push.util.ConsoleUtil :30 - T-3已处理完第3-4条的数据
11:04:14.749 [pool-5-thread-2] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_XBl4v3miyUCnjBIyRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iKPntNjF_eFRrVnEnLfmIB21XJMGZpyALQJufmxCR4rxwt3pe3qweqkllNQhFqKFoU_adKDoHUrYJaHzDazspUQLOIeAJAEHB
【请求参数】:{"touser":"okmq0t27Nvzp1nploE7oFynpEqMs","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [G2fm7a06544121]"}
11:04:14.749 [pool-5-thread-2] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [G2fm7a06544121]"}
11:04:14.750 [pool-5-thread-2] WARN c.f.tool.push.util.ConsoleUtil :30 - T-1已处理完第1-2条的数据
11:04:14.783 [pool-5-thread-6] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_9nhOmg5-hQQT1R4RRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iJjo9baQKuAS9ahFVpwhib83LhySsiA2AWQtpW5TG8s01nMPppYpu_shdMfaR-kkeTaBf85u17W4WWRdQmL6M3kKTJeAJARAQ
【请求参数】:{"touser":"okmq0t2jha0MpsC6ahaMmjdIAuyw","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [1k06543937]"}
11:04:14.783 [pool-5-thread-6] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [1k06543937]"}
11:04:14.784 [pool-5-thread-6] WARN c.f.tool.push.util.ConsoleUtil :30 - T-5已处理完第5-6条的数据
11:04:14.833 [pool-5-thread-7] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_RZ9dmc8FSi10mKSkRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iLXrh61JFWGbMj_LeUoT-_TgiiFe3G1dnZz5v1xKbcP_UdxtAcecqpIRBzcxniwMzEmC8-4IHTntbFuXZM5hmT7PETeAJAHWL
【请求参数】:{"touser":"okmq0t-lPwrsdJLzl3-83vqENGdY","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [ts6m606543948]"}
11:04:14.834 [pool-5-thread-7] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [ts6m606543948]"}
11:04:14.835 [pool-5-thread-7] WARN c.f.tool.push.util.ConsoleUtil :30 - T-6已处理完第6-7条的数据
11:04:14.914 [pool-5-thread-11] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_VvrFVug63OyvzmiCRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iLSAkY0857HVprFdcquyv-0wIOnI0YOCHBRQTAzh19lp8WqziZqdcYrKxtu73kNsJZvyLujTO2SAUhvUwxCnUSMWSQeAJAPLJ
【请求参数】:{"touser":"okmq0twwypbEw9yS-td7s5lra2vU","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [n28tAa06544102]"}
11:04:14.914 [pool-5-thread-11] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [n28tAa06544102]"}
11:04:14.915 [pool-5-thread-11] WARN c.f.tool.push.util.ConsoleUtil :30 - T-10已处理完第10-11条的数据
11:04:14.956 [pool-5-thread-12] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_Ou03ITRNVy-NArJlRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iJtq1CvwmMt4NzXaJm_lpc_2ZPVUzsLPld-S5uXSeDPkXlkGT62Gzp2WP6T4Pc8u5At0KorpGyeIclK5TeEyRoJRZPeAJAFND
【请求参数】:{"touser":"okmq0t4DDN81IaohuuwholtlJlgQ","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [AV49Va06543951]"}
11:04:14.956 [pool-5-thread-12] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [AV49Va06543951]"}
11:04:14.957 [pool-5-thread-12] WARN c.f.tool.push.util.ConsoleUtil :30 - T-11已处理完第11-12条的数据
11:04:15.012 [pool-5-thread-5] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_82AtxoAalY0rhSNMRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iK7fG1PgGU5v1-5TckIX_uiwPiI1o7cS3p6sXpQHpP9qan-ZbuPsP52dzIxeQ0vU72P0TBIVXa7LZsIKIQvbN1tHBGeAJAZTY
【请求参数】:{"touser":"okmq0txGYoLcy_aN-29QWD0hdXVE","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [QJ__6a06544122]"}
11:04:15.012 [pool-5-thread-5] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [QJ__6a06544122]"}
11:04:15.013 [pool-5-thread-5] WARN c.f.tool.push.util.ConsoleUtil :30 - T-4已处理完第4-5条的数据
11:04:15.047 [pool-5-thread-9] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_84zWY4vggIhFe56yRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iL4HXSdTR3dOMKWWJz55uYvTldPI-4iBClsi8UDkjagRdyLv6v9Dm8uf-pe4gLSEBbQgxNoqt_OvhLc0TBy0V0NAOQeAJAFTV
【请求参数】:{"touser":"okmq0t84B1vMqmjAWnkb7scT-QA8","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [JTkpja06544120]"}
11:04:15.047 [pool-5-thread-9] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [JTkpja06544120]"}
11:04:15.049 [pool-5-thread-9] WARN c.f.tool.push.util.ConsoleUtil :30 - T-8已处理完第8-9条的数据
11:04:15.058 [pool-5-thread-13] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException:
11:04:15.059 [pool-5-thread-13] WARN c.f.tool.push.util.ConsoleUtil :30 - T-12已处理完第12-13条的数据
11:04:15.060 [pool-5-thread-8] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException:
11:04:15.061 [pool-5-thread-8] WARN c.f.tool.push.util.ConsoleUtil :30 - T-7已处理完第7-8条的数据
11:04:15.062 [pool-5-thread-10] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException:
11:04:15.063 [pool-5-thread-10] WARN c.f.tool.push.util.ConsoleUtil :30 - T-9已处理完第9-10条的数据
11:04:15.128 [pool-5-thread-14] ERROR c.f.tool.push.util.WeWxMpServiceImpl :324 -
【请求地址】: https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=25_g33Cy1e-wNMhN96iRdJ81D3eeRbT1DU2rq0iimqvNsHH3g9em3MBFBYW7iId4ncPkrm6U2k4r4MFUr2RK5mpLO3h4UUU0COE9vnJXyP5UihBqY7G3ihQstelImub1L2kYsDYrkd_MHmUotOeTEVeAJABMD
【请求参数】:{"touser":"okmq0tyC_O2vMWvT2PzZfaVwh4Tc","msgtype":"text","text":{"content":"一条客服文本消息,<a href="https://www.baidu.com\">去百度\n\nCJNET OK"}}
【错误信息】:{"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [E2HGAA06544107]"}
11:04:15.129 [pool-5-thread-14] ERROR c.f.t.p.l.msgsender.WxKefuMsgSender :44 - me.chanjar.weixin.common.error.WxErrorException: {"errcode":45015,"errmsg":"response out of time limit or subscription is canceled hint: [E2HGAA06544107]"}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions