Skip to content

RuntimeException: Failed to cache access token #1483

@talentant

Description

@talentant

我用的环境

  • PHP 版本:7.2.10
  • overtrue/wechat 版本:4.1.19
  • 是否使用了框架?框架名称:Yii2

问题及现象(操作日志)

  1. 前天夜间服务器端更新,运行composer update --optimize-autoloader --no-dev -vvv,完成后打开小程序测试了一下,发生错误,查看错误日志为EasyWeChat\Kernel\Exceptions\RuntimeException: Failed to cache access token. in ...vendor/overtrue/wechat/src/Kernel/AccessToken.php:141
  2. 立即更新composer.json,改为:"overtrue/wechat": "4.1.18",错误依然存在
  3. 继续更新composer.json,改为:"overtrue/wechat": "4.1.17",错误依然存在
  4. 继续更新composer.json,改为:"overtrue/wechat": "4.1.16",错误依然存在
  5. 继续更新composer.json,改为:"overtrue/wechat": "4.1.15",一切正常

其他说明

  1. 本地环境(Win10+Docker)正常,上线至服务器后发生以上错误
  2. 服务器环境(Ubuntu16.04+Docker)一直正常,且近期没有运行调整

第二天查看了一下仓库代码变更 4.1.15...4.1.16 应该是对设置缓存结果的判断导致出现本次异常

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions