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

panic: interface conversion: interface {} is nil, not string [BUG] #740

Closed
poembro opened this issue Oct 16, 2023 · 4 comments
Closed

panic: interface conversion: interface {} is nil, not string [BUG] #740

poembro opened this issue Oct 16, 2023 · 4 comments
Labels

Comments

@poembro
Copy link

poembro commented Oct 16, 2023

描述

如何复现
步骤:
1、

关联日志信息



panic: interface conversion: interface {} is nil, not string

goroutine 214 [running]:
github.com/silenceper/wechat/v2/credential.(*DefaultAccessToken).GetAccessTokenContext(0xc00045d400, {0x10557b8, 0xc000038030})
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/vendor/github.com/silenceper/wechat/v2/credential/default_access_token.go:70 +0x4dd
github.com/silenceper/wechat/v2/credential.(*DefaultAccessToken).GetAccessToken(0x7fb69a85def8?)
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/vendor/github.com/silenceper/wechat/v2/credential/default_access_token.go:62 +0x27
github.com/silenceper/wechat/v2/miniprogram/subscribe.(*Subscribe).Send(0xc000400b50?, 0xda1980?)
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/vendor/github.com/silenceper/wechat/v2/miniprogram/subscribe/subscribe.go:76 +0x30
game-lor/internal/common/service.(*Service).GetSubscribe(0xc00045d450, {0x10557b8?, 0xc000038038?}, 0x40?, {0xf328c5, 0x36})
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/internal/common/service/wxService.go:53 +0x418
game-lor/internal/farm/service.(*Service).acreBaseConsumer(0xc000312d50, {0xc000fbd7e0, 0x14})
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/internal/farm/service/acreBaseService.go:57 +0x49f
game-lor/internal/farm/service.listHandle({0x1055780, 0xc0007179a0}, {0xf099a7, 0xd}, 0xc0002ae3c0?, 0x0?)
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/internal/farm/service/crontabService.go:79 +0x4de
created by game-lor/internal/farm/service.(*Service).CrontabInit
	/home/gitlab-runner/builds/aryHxQxR/0/shangyecelue/game-lor/internal/farm/service/crontabService.go:113 +0x394

使用的版本

  • SDK版本: github.com/silenceper/wechat/v2 v2.1.6-rc.2.0.20231011031010-038037b89dfc
@poembro poembro added the bug label Oct 16, 2023
@houseme
Copy link
Collaborator

houseme commented Oct 16, 2023

应该是依赖的redis 有问题

#714 参考这个pr 里的说明自己实现一下redis的

@poembro

@poembro
Copy link
Author

poembro commented Oct 16, 2023

我想快速解决问题 是不是可以先用 memory 方式

@houseme
Copy link
Collaborator

houseme commented Oct 16, 2023

我想快速解决问题 是不是可以先用 memory 方式

直接拷贝上面的代码,自己实现一个redis的缓存注入进去就可以了。

@poembro
Copy link
Author

poembro commented Oct 16, 2023

解决了。 感谢!

@houseme houseme closed this as completed Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants