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

java版本是否还在维护? #107

Open
xiangyaoan opened this issue May 12, 2022 · 12 comments
Open

java版本是否还在维护? #107

xiangyaoan opened this issue May 12, 2022 · 12 comments

Comments

@xiangyaoan
Copy link

您好,我这边尝试用java版本sdk wechaty本地docker启动0.78版本。程序无法启动

@xiangyaoan
Copy link
Author

io.grpc.StatusRuntimeException: UNAUTHENTICATED: Invalid Wechaty TOKEN "127.0.0.1:8788"
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244) ~[grpc-stub-1.29.0.jar:1.29.0]
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225) ~[grpc-stub-1.29.0.jar:1.29.0]
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142) ~[grpc-stub-1.29.0.jar:1.29.0]
at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.start(PuppetGrpc.java:2744) ~[grpc-0.16.1.jar:?]
at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:78) [wechaty-puppet-hostie-0.1.5-SNAPSHOT.jar:?]

请问java版本还有在维护吗

@IanCao
Copy link

IanCao commented May 14, 2022

image
这个是传递的token有问题,可以在上图中增加下鉴权token,但是puppet server 可能还是有问题

@IanCao
Copy link

IanCao commented May 15, 2022

@xiangyaoan https://juejin.cn/post/7097964854064971812/ 你可以参考下这个文档,主流程是能跑起来的,并且需要新增一下authority或者我新提交的pr

@xiangyaoan
Copy link
Author

@IanCao 我是这样用的
image
image

@IanCao
Copy link

IanCao commented May 16, 2022

你在grpc请求上新增authority了么

@xiangyaoan
Copy link
Author

没有,我就是copy 的 example代码 设置了token和endpoint 这个wechaty/wechaty:0.78 用go-wechaty 没问题

@IanCao
Copy link

IanCao commented May 16, 2022

JavaClient 需要改下代码 参考 #108

@xiangyaoan
Copy link
Author

我参考#108改了GrpcPuppet.kt 但是GrpcUtil的checkAuthority 过不去,No host in authority

@vowor
Copy link

vowor commented Nov 25, 2022

兄弟 你启动起来了没有? 我遇到了跟你一样的问题 现在不知道怎么解决了 如果你解决了的话 能请教下吗?

@hanrw
Copy link

hanrw commented Dec 9, 2022

我参考#108改了GrpcPuppet.kt 但是GrpcUtil的checkAuthority 过不去,No host in authority
一样显示No host in authority

@hanrw
Copy link

hanrw commented Dec 9, 2022

ManagedChannelImplBuilder debug模式修改authorityCheckerDisabled = true. 可以正常返回二维码

 String checkAuthority(String authority) {
    if (authorityCheckerDisabled) {
      return authority;
    }
    return GrpcUtil.checkAuthority(authority);
  }

GrpcPuppet代码部分,目前没有找到修改authorityCheckerDisabled的方法

channel = ManagedChannelBuilder.forAddress(discoverHostieIp.first, NumberUtils.toInt(discoverHostieIp.second))
            .usePlaintext().executor(newFixedThreadPool)
            .overrideAuthority(puppetOptions?.token)
            .usePlaintext().build()

@YiMoWanXia
Copy link

这个问题现在还没结论吗

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

5 participants