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

weComService.MiniProgram()报错 #498

Closed
cKeygn opened this issue May 28, 2024 · 1 comment
Closed

weComService.MiniProgram()报错 #498

cKeygn opened this issue May 28, 2024 · 1 comment

Comments

@cKeygn
Copy link

cKeygn commented May 28, 2024

win11 x64
go 1.22.3
通讯录管理没问题,但是企业微信小程序初始化一直报错,报错具体信息如下:
API server listening at: 127.0.0.1:52798
=== RUN TestName
--- FAIL: TestName (0.00s)
panic: interface conversion: interface is nil, not contract.LoggerInterface [recovered]
panic: interface conversion: interface is nil, not contract.LoggerInterface

goroutine 19 [running]:
testing.tRunner.func1.2({0xca56e0, 0xc00036fb90})
C:/Program Files/Go/src/testing/testing.go:1631 +0x49e
testing.tRunner.func1()
C:/Program Files/Go/src/testing/testing.go:1634 +0x669
panic({0xca56e0?, 0xc00036fb90?})
C:/Program Files/Go/src/runtime/panic.go:770 +0x136
github.com/ArtisanCloud/PowerWeChat/v3/src/kernel.(*AccessToken).RegisterHttpMiddlewares(0xc0001e6630)
D:/Go_Modules/pkg/mod/github.com/!artisan!cloud/!power!we!chat/v3@v3.2.18/src/kernel/accessToken.go:343 +0x1fb
github.com/ArtisanCloud/PowerWeChat/v3/src/kernel.NewAccessToken(0xc000380f90)
D:/Go_Modules/pkg/mod/github.com/!artisan!cloud/!power!we!chat/v3@v3.2.18/src/kernel/accessToken.go:78 +0x5a8
github.com/ArtisanCloud/PowerWeChat/v3/src/work/auth.NewAccessToken({0xdb6468, 0xc00037de78})
D:/Go_Modules/pkg/mod/github.com/!artisan!cloud/!power!we!chat/v3@v3.2.18/src/work/auth/accessToken.go:16 +0xaa
github.com/ArtisanCloud/PowerWeChat/v3/src/work/miniProgram.NewApplication(0xc00035e930, {0x0, 0x0, 0x0})
D:/Go_Modules/pkg/mod/github.com/!artisan!cloud/!power!we!chat/v3@v3.2.18/src/work/miniProgram/application.go:53 +0x53a
github.com/ArtisanCloud/PowerWeChat/v3/src/work.(*Work).MiniProgram(0xc000378000)
D:/Go_Modules/pkg/mod/github.com/!artisan!cloud/!power!we!chat/v3@v3.2.18/src/work/application.go:561 +0x118
go-zero-single-serve/common/wechatx/com.(*Client).Session(0xc000370240, {0xd46b6e, 0x6})
F:/go-zero-single-recycle/go-zero-single-serve/common/wechatx/com/client.go:53 +0x10d
go-zero-single-serve/common/wechatx/com.TestName(0xc0001f3520)
F:/go-zero-single-recycle/go-zero-single-serve/common/wechatx/com/client_test.go:10 +0x87
testing.tRunner(0xc0001f3520, 0xd81d28)
C:/Program Files/Go/src/testing/testing.go:1689 +0x1da
created by testing.(*T).Run in goroutine 1
C:/Program Files/Go/src/testing/testing.go:1742 +0x7d3

Debugger finished with the exit code 0

@Matrix-X
Copy link
Contributor

初始化代码发一下

好像是log没有设置好
panic: interface conversion: interface is nil, not contract.LoggerInterface [recovered]

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

2 participants