Giter Club home page Giter Club logo

java-wechaty-getting-started's Introduction

java-wechaty-getting-started Java Version Java CI with Maven

Java Wechaty

Java Wechaty Starter Project Template that Works Out-of-the-Box

Gitpod Ready-to-Code Wechaty in Java

Connecting Chatbots

Powered by Wechaty Java Version

Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Java.

The World's Shortest Java ChatBot: 6 lines of Code

class Bot{
  public static void main(String args[]){
    Wechaty bot = Wechaty.instance()
      .onScan((qrcode, statusScanStatus, data) -> System.out.println(QrcodeUtils.getQr(qrcode)))
      .onLogin(user -> System.out.println("User logined :" + user))
      .onMessage(message -> System.out.println("Message:" + message))
      .start(true);
  }
}

Usage

Install

# Install Maven
apt install maven

make install

Run

export WECHATY_PUPPET_SERVICE_TOKEN=your_token_at_here

make bot

Wechaty Getting Started in Multiple Languages

Badge

Wechaty in Java

[![Wechaty in Java](https://img.shields.io/badge/Wechaty-Java-blue)](https://github.com/wechaty/java-wechaty)

Maintainers

@wechaty/java

Copyright & License

  • Code & Docs © 2020 Wechaty Contributors https://github.com/wechaty
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons

java-wechaty-getting-started's People

Contributors

charles-wu-chen avatar dependabot[bot] avatar diaozxin007 avatar huan avatar redmaple1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

java-wechaty-getting-started's Issues

Got grpc Connection timed out

[root@iZwz90pj2xzabk2hl96aetZ ~]# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:42437           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN      482/systemd-resolve 
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      59791/nginx: worker 
tcp        0      0 0.0.0.0:20048           0.0.0.0:*               LISTEN      944/rpc.mountd      
tcp        0      0 0.0.0.0:58545           0.0.0.0:*               LISTEN      943/rpc.statd       
tcp        0      0 0.0.0.0:8788            0.0.0.0:*               LISTEN      3404566/docker-prox 
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      3378454/sshd        
tcp6       0      0 :::42431                :::*                    LISTEN      -                   
tcp6       0      0 :::2049                 :::*                    LISTEN      -                   
tcp6       0      0 :::5355                 :::*                    LISTEN      482/systemd-resolve 
tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           
tcp6       0      0 :::20048                :::*                    LISTEN      944/rpc.mountd      
tcp6       0      0 :::58739                :::*                    LISTEN      943/rpc.statd       
tcp6       0      0 :::8788                 :::*                    LISTEN      3404570/docker-prox 
[root@iZwz90pj2xzabk2hl96aetZ ~]# docker container ls
CONTAINER ID   IMAGE             COMMAND                  CREATED         STATUS         PORTS                                       NAMES
e701274f3b24   wechaty/wechaty   "/wechaty/bin/entryp…"   2 minutes ago   Up 2 minutes   0.0.0.0:8788->8788/tcp, :::8788->8788/tcp   thirsty_pasteur
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
	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-20200719.133816-1.jar:?]
	at io.github.wechaty.Wechaty.start(Wechaty.kt:52) [wechaty-0.1.5-20200719.133942-1.jar:?]
	at io.github.wechaty.DingDongBot.main(DingDongBot.java:50) [classes/:?]
Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: /120.76.139.69:8788
Caused by: java.net.ConnectException: Connection timed out: no further information
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_102]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0_102]
	at io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[grpc-netty-shaded-1.29.0.jar:1.29.0]
	at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
16:36:32.242 [main]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43]  - this eventName:START has no listener

my wechaty token gate server seems to be a problem

from:
https://github.com/wechaty/wechaty/issues/1985

i make a token gate server ,
but when i start my DingDongBot by idea,
found a exception following

maven build or gitpod ,my token

07:05:49.999 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[153]  - cannot get ip by token, check token
07:05:50.001 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[84]  - start() rejection:
java.lang.Exception: cannot get ip by token, check token
        at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:154) ~[wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar:?]
        at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:76) [wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar:?]
        at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar:?]
        at io.github.wechaty.DingDongBot.main(DingDongBot.java:48) [wechaty-examples-1.0.0-SNAPSHOT-jar-with-dependencies.jar:?]
07:05:50.016 [main]WARN  io.github.wechaty.eventEmitter.EventEmitter-[44]  - this eventName:start has no listener
07:05:50.017 [main]INFO  io.github.wechaty.Wechaty-[48]  - start Wechaty
07:06:48.505 [pool-6-thread-1]INFO  io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[50]  - sent reset message
07:06:48.507 [pool-5-thread-1]INFO  io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[34]  - sent reset message
07:06:48.508 [pool-5-thread-1]INFO  io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[66]  - feed dog WatchdogFood(timeout=60000, data=null)
07:06:48.508 [pool-5-thread-1]INFO  io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[77]  - lastFeed is 1590649608508`


### my local  ,the same token :

`15:07:04.931 [main]INFO  io.github.wechaty.grpc.GrpcPuppet-[73]  - IDLE
15:07:05.182 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[79]  - start() rejection:
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
Channel Pipeline: [HttpClientCodec#0, HttpProxyHandler#0, ProtocolNegotiators$ProxyProtocolNegotiationHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:240) ~[grpc-stub-1.25.0.jar:1.25.0]
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:221) ~[grpc-stub-1.25.0.jar:1.25.0]
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:140) ~[grpc-stub-1.25.0.jar:1.25.0]
	at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.start(PuppetGrpc.java:2731) ~[grpc-0.11.25.jar:?]
	at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:75) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
	at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
	at io.github.wechaty.DingDongBot.main(DingDongBot.java:48) [classes/:?]
Caused by: io.grpc.netty.shaded.io.netty.handler.proxy.ProxyConnectException: http, none, /127.0.0.1:1090 => 106.53.228.235:8788, disconnected
	at io.grpc.netty.shaded.io.netty.handler.proxy.ProxyHandler.channelInactive(ProxyHandler.java:236) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelInactive(CombinedChannelDuplexHandler.java:420) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:393) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:358) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.handler.codec.http.HttpClientCodec$Decoder.channelInactive(HttpClientCodec.java:285) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.CombinedChannelDuplexHandler.channelInactive(CombinedChannelDuplexHandler.java:223) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:236) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1417) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:257) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:243) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:913) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:819) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:510) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:518) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[grpc-netty-shaded-1.25.0.jar:1.25.0]
	at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_131]
15:07:05.191 [main]WARN  io.github.wechaty.eventEmitter.EventEmitter-[44]  - this eventName:start has no listener

THE semver for Java Wechaty

Currently, our Wechaty project is using the semver, start from version 0.0.1.

The latest wechaty on npm is v0.39

So I'd like to suggest that our Java Wechaty follow the same versioning style, and start from version 0.1.0

Also, npm and pip all have a dev version so that we can publish a version for the beta users, and at the same time, the release user will not see the beta version.

To archive that, npm has the @next version instead of the latest, and the pip has a -dev for PRE-RELEASE.

It would be great if our Java Wechaty can use the same method to differentiate those two published versions, if the maven system has the same pattern for the publishing.

[ERROR] Failed to execute goal on project wechaty-examples

I got this error message when I running make install:

[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSOHOT: Failure to find io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

Full log messages:

$ make install
mvn clean install -f examples/pom.xml
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< io.github.wechaty:wechaty-examples >-----------------
[INFO] Building wechaty-examples 1.0.0-SNAPSOHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.192 s
[INFO] Finished at: 2020-05-21T11:10:02+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSOHOT: Failure to find io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

[问题]this eventName:START has no listener

11:51:12.476 [main]INFO io.github.wechaty.user.manager.PuppetManager-[23] - PuppetManager resolveInstance({"name":"Wechaty","puppet":"io.github.wechaty.grpc.GrpcPuppet","puppetOptions":{"endPoint":"127.0.0.1:8788","token":"puppet_padlocal_xxxx","name":"DEFAULT"}})
11:51:12.635 [main]INFO org.reflections.Reflections-[229] - Reflections took 134 ms to scan 5 urls, producing 159 keys and 1545 values
11:51:13.431 [main]DEBUG io.github.wechaty.grpc.GrpcPuppet-[76] - IDLE
11:51:14.146 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[82] - start() rejection:
io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
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-20200719.133816-1.jar:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:52) [wechaty-0.1.5-20200719.133942-1.jar:?]
at io.github.wechaty.DingDongBot.main(DingDongBot.java:57) [classes/:?]
11:51:14.153 [main]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43] - this eventName:START has no listener
11:51:14.153 [main]INFO io.github.wechaty.Wechaty-[58] - start Wechaty

请问一下,这种情况改怎么解决

cannot get ip by token, check token ?

14:19:44.990 [main]INFO org.reflections.Reflections-[229] - Reflections took 270 ms to scan 5 urls, producing 159 keys and 1545 values
14:19:48.452 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[154] - cannot get ip by token, check token

when i run the DingDongBot examples local,found a exception

Why did I get Failed to connect to api.chatie.io ?

[java.net.SocketTimeoutException: connect timed out, java.net.SocketTimeoutException: connect timed out, java.net.SocketTimeoutException: connect timed out, java.net.ConnectException: Failed to connect to api.chatie.io/2606:4700:3031:0:0:0:xxxx:4881:443, java.net.ConnectException: Failed to connect to api.chatie.io/2606:4700:3031:0:0:0:xxxx:4981:443]
14:03:01.581 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[79]  - start() rejection:
java.net.ConnectException: Failed to connect to api.chatie.io/2606:4700:3036:0:0:0:xxxx:c20c:443
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:285) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
	at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
	at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
	at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
	at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
	at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Suppressed: java.net.SocketTimeoutException: connect timed out
		at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
		at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
		at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
		at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Suppressed: java.net.SocketTimeoutException: connect timed out
		at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
		at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
		at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
		at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Suppressed: java.net.SocketTimeoutException: connect timed out
		at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
		at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
		at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
		at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Suppressed: java.net.ConnectException: Failed to connect to api.chatie.io/2606:4700:3031:0:0:0:xxxx:4881:443
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:285) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
		at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Caused by: java.net.ConnectException: No route to host (connect failed)
		at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
		at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
		at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
		... 20 more
	Suppressed: java.net.ConnectException: Failed to connect to api.chatie.io/2606:4700:3031:0:0:0:xxxx:4981:443
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:285) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:195) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:249) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:108) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:245) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:100) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:197) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealCall.execute(RealCall.kt:148) ~[okhttp-4.6.0.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.discoverHostieIpa(GrpcPuppet.kt:50) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:135) ~[wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:71) [wechaty-puppet-hostie-1.0.0-20200524.113647-2.jar:?]
		at io.github.wechaty.Wechaty.start(Wechaty.kt:42) [wechaty-1.0.0-20200524.113740-2.jar:?]
		at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]
	Caused by: java.net.ConnectException: No route to host (connect failed)
		at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
		at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
		at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
		at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
		at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
		at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
		... 20 more
Caused by: java.net.ConnectException: No route to host (connect failed)
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_131]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_131]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_131]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_131]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_131]
	at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_131]
	at okhttp3.internal.platform.Platform.connectSocket(Platform.kt:119) ~[okhttp-4.6.0.jar:?]
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:283) ~[okhttp-4.6.0.jar:?]
	... 20 more
14:03:01.601 [main]WARN  io.github.wechaty.eventEmitter.EventEmitter-[44]  - this eventName:start has no listener

Let's make this repo to be the easiest way to run a ding-dong-bot.java bot!

This repository is for any Java developers who want to build a chatbot based on our great Java Wechaty library.

It will be a great help for all Java developers if we can make this repository to be able to ready for use by running:

  1. git clone
  2. make install
  3. make bot

Then everything will be set up.

I have set up the skeleton of this repo, with the examples/ding-dong-bot.java, let's finish this repo so that it can be run out-of-the-box! @wechaty/java

Related to: wechaty/wechaty#1927

关于docker启动IP问题。

INFO PadplusManager start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds.

具体情况如下:最初一个版本是使用web版本做的。公司具备动态的公网IP。JAVA版本使用正常,后续更换成ipadplus协议。https://api.chatie.io/v0/hosties/puppet_padplus_XXXX 获取IP正常。但始终与服务器链接超时,。使用腾讯云服务器解决该问题。是否ipadplus协议对IP有一定要求?

启动DingDongBot提示异常信息:UNKNOWN: Forbidden resource

启动DingDongBot提示异常信息:
io.grpc.StatusRuntimeException: UNKNOWN: Forbidden resource
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:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:52) [wechaty-0.1.5-SNAPSHOT.jar:?]
at io.github.wechaty.DingDongBot.main(DingDongBot.java:50) [classes/:?]
请教各位这是什么问题?

i have two exception behind,please help me

my gateserver has received message,but my client like has no message

idea exception

Exception in thread "pool-3-thread-29" java.lang.Error: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1148)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.Wechaty$initPuppetEventBridge$$inlined$forEach$lambda$7.handler(Wechaty.kt:198)
	at io.github.wechaty.Puppet$on$12.handler(Puppet.kt:251)
	at io.github.wechaty.eventEmitter.EventEmitter$emit$$inlined$forEach$lambda$1.run(EventEmitter.kt:50)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	... 2 more
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.user.Message$ready$1.get(Message.kt:183)
	at io.github.wechaty.user.Message$ready$1.get(Message.kt:17)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1590)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.Puppet$messagePayload$1$1.apply(Puppet.kt:615)
	at io.github.wechaty.Puppet$messagePayload$1$1.apply(Puppet.kt:36)
	at com.github.benmanes.caffeine.cache.UnboundedLocalCache.lambda$computeIfAbsent$2(UnboundedLocalCache.java:238)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at com.github.benmanes.caffeine.cache.UnboundedLocalCache.computeIfAbsent(UnboundedLocalCache.java:234)
	at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
	at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
	at io.github.wechaty.Puppet$messagePayload$1.get(Puppet.kt:614)
	at io.github.wechaty.Puppet$messagePayload$1.get(Puppet.kt:36)
	... 7 more
Caused by: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:240)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:221)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:140)
	at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.messagePayload(PuppetGrpc.java:2878)
	at io.github.wechaty.grpc.GrpcPuppet$messageRawPayload$1.get(GrpcPuppet.kt:656)
	at io.github.wechaty.grpc.GrpcPuppet$messageRawPayload$1.get(GrpcPuppet.kt:28)
	... 7 more

gateserver exception

04:31:49 VERB PuppetServiceImpl messagePayload()
04:31:49 VERB Puppet messagePayload(7467678580777012746)
Error [AssertionError]: Assertion failed
    at new goog.asserts.AssertionError (/wechaty/node_modules/google-protobuf/google-protobuf.js:81:876)
    at Object.goog.asserts.doAssertFailure_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:82:257)
    at Object.goog.asserts.assert [as assert] (/wechaty/node_modules/google-protobuf/google-protobuf.js:83:83)
    at jspb.BinaryEncoder.writeUnsignedVarint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:458:77)
    at jspb.BinaryWriter.writeUnsignedVarint64_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:480:507)
    at jspb.BinaryWriter.writeUint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:485:471)
    at Function.proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:849:12)
    at proto.wechaty.puppet.MessagePayloadResponse.serializeBinary (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:812:47)
    at serialize_wechaty_puppet_MessagePayloadResponse (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet_grpc_pb.js:460:26)
    at sendUnaryResponse (/wechaty/node_modules/grpc/src/server.js:98:15)
    at sendUnaryData (/wechaty/node_modules/grpc/src/server.js:600:9)
    at Object.<anonymous> (/wechaty/node_modules/wechaty-puppet-hostie/src/server/puppet-implementation.ts:524:16)
    at Generator.next (<anonymous>)
    at fulfilled (/wechaty/node_modules/wechaty-puppet-hostie/dist/src/server/puppet-implementation.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  reportErrorToServer: true,
  messagePattern: 'Assertion failed',
  code: 13
}
04:31:50 ERR Config ###########################

ERROR io.github.wechaty.grpc.GrpcPuppet - start() rejection: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception ... Connection refused: /127.0.0.1:8788

详细错误:
19:40:10.492 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - Platform: MacOS
19:40:10.492 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
19:40:10.492 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - Java version: 17
19:40:10.493 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
19:40:10.493 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
19:40:10.494 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
19:40:10.494 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
at io.grpc.netty.shaded.io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$4.run(PlatformDependent0.java:225)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0.(PlatformDependent0.java:219)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:289)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.(PlatformDependent.java:92)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:223)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:210)
at io.grpc.netty.shaded.io.netty.util.AsciiString.cached(AsciiString.java:1401)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:48)
at io.grpc.netty.shaded.io.grpc.netty.Utils.(Utils.java:72)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:74)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:37)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:23)
at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:39)
at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:158)
at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:74)
at io.github.wechaty.Wechaty.start(Wechaty.kt:52)
at io.github.wechaty.DingDongBot.main(DingDongBot.java:30)
19:40:10.495 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
19:40:10.495 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable
java.lang.IllegalAccessException: class io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @358c99f5
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:392)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:674)
at java.base/java.lang.reflect.Method.invoke(Method.java:560)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:335)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0.(PlatformDependent0.java:326)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:289)
at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent.(PlatformDependent.java:92)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:223)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:210)
at io.grpc.netty.shaded.io.netty.util.AsciiString.cached(AsciiString.java:1401)
at io.grpc.netty.shaded.io.netty.util.AsciiString.(AsciiString.java:48)
at io.grpc.netty.shaded.io.grpc.netty.Utils.(Utils.java:72)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.(NettyChannelBuilder.java:74)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:37)
at io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider.builderForAddress(NettyChannelProvider.java:23)
at io.grpc.ManagedChannelBuilder.forAddress(ManagedChannelBuilder.java:39)
at io.github.wechaty.grpc.GrpcPuppet.startGrpcClient(GrpcPuppet.kt:158)
at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:74)
at io.github.wechaty.Wechaty.start(Wechaty.kt:52)
at io.github.wechaty.DingDongBot.main(DingDongBot.java:30)
19:40:10.495 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.(long, int): unavailable
19:40:10.495 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - sun.misc.Unsafe: available
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - maxDirectMemory: 4294967296 bytes (maybe)
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.tmpdir: /var/folders/z8/wz1tr0dn2kq02jjs336r199h0000gn/T (java.io.tmpdir)
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
19:40:10.500 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
19:40:10.513 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.MultithreadEventLoopGroup - -Dio.netty.eventLoopThreads: 16
19:40:10.518 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
19:40:10.519 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
19:40:10.521 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop - -Dio.netty.noKeySetOptimization: false
19:40:10.521 [main] DEBUG io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop - -Dio.netty.selectorAutoRebuildThreshold: 512
19:40:10.522 [main] DEBUG io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - org.jctools-core.MpscChunkedArrayQueue: available
19:40:10.540 [main] DEBUG io.github.wechaty.grpc.GrpcPuppet - IDLE
19:40:10.563 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.level: simple
19:40:10.563 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector - -Dio.grpc.netty.shaded.io.netty.leakDetection.targetRecords: 4
19:40:10.565 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkAccessible: true
19:40:10.565 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.AbstractByteBuf - -Dio.grpc.netty.shaded.io.netty.buffer.checkBounds: true
19:40:10.565 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.ResourceLeakDetectorFactory - Loaded default ResourceLeakDetector: io.grpc.netty.shaded.io.netty.util.ResourceLeakDetector@73a93ecd
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 16
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 16
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 11
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 16777216
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.tinyCacheSize: 512
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: true
19:40:10.581 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
19:40:10.812 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.channel.DefaultChannelId - -Dio.netty.processId: 63573 (auto-detected)
19:40:10.814 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - -Djava.net.preferIPv4Stack: false
19:40:10.814 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - -Djava.net.preferIPv6Addresses: false
19:40:10.819 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - Loopback interface: lo0 (lo0, 0:0:0:0:0:0:0:1%lo0)
19:40:10.819 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.NetUtil - Failed to get SOMAXCONN from sysctl and file /proc/sys/net/core/somaxconn. Default: 128
19:40:10.821 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.channel.DefaultChannelId - -Dio.netty.machineId: a4:cf:99:ff:fe:96:fb:63 (auto-detected)
19:40:10.829 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.allocator.type: pooled
19:40:10.829 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.threadLocalDirectBufferSize: 0
19:40:10.829 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.buffer.ByteBufUtil - -Dio.netty.maxThreadLocalCharBufferSize: 16384
19:40:10.833 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.maxCapacityPerThread: 4096
19:40:10.834 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.maxSharedCapacityFactor: 2
19:40:10.834 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.linkCapacity: 16
19:40:10.834 [grpc-default-executor-0] DEBUG io.grpc.netty.shaded.io.netty.util.Recycler - -Dio.netty.recycler.ratio: 8
19:40:10.838 [main] ERROR io.github.wechaty.grpc.GrpcPuppet - start() rejection:
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.start(PuppetGrpc.java:2744)
at io.github.wechaty.grpc.GrpcPuppet.start(GrpcPuppet.kt:78)
at io.github.wechaty.Wechaty.start(Wechaty.kt:52)
at io.github.wechaty.DingDongBot.main(DingDongBot.java:30)
Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /127.0.0.1:8788
Caused by: java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:672)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:946)
at io.grpc.netty.shaded.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.grpc.netty.shaded.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702)
at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:842)
19:40:10.840 [main] DEBUG io.github.wechaty.eventEmitter.EventEmitter - this eventName:START has no listener
19:40:10.841 [main] INFO io.github.wechaty.Wechaty - start Wechaty

Failed to execute goal on project wechaty-examples: Could not resolve dependencies

[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< io.github.wechaty:wechaty-examples >-----------------
[INFO] Building wechaty-examples 1.0.0-SNAPSOHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from mvnrepository: http://www.mvnrepository.com/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom
Downloading from github: https://maven.pkg.github.com/diaozxin007/java-wechaty/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.770 s
[INFO] Finished at: 2020-05-22T11:00:15+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSOHOT: Failed to collect dependencies at io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT: Failed to read artifact descriptor for io.wechaty:wechaty:jar:1.0.0-SNAPSOHOT: Could not transfer artifact io.wechaty:wechaty:pom:1.0.0-SNAPSOHOT from/to mvnrepository (http://www.mvnrepository.com/): Transfer failed for http://www.mvnrepository.com/io/wechaty/wechaty/1.0.0-SNAPSOHOT/wechaty-1.0.0-SNAPSOHOT.pom 503 Service Temporarily Unavailable -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

启动的时候io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason

io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
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:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:52) [wechaty-0.1.5-SNAPSHOT.jar:?]
at io.github.wechaty.DingDongBot.main(DingDongBot.java:49) [classes/:?]

JAVA SDK 初始化bot时 grpc报 UNAUTHENTICATED 异常

🚨 The issue tracker is not for questions 🚨

[question]
JAVA SDK 初始化bot时 grpc报 UNAUTHENTICATED 异常。

异常栈:
20:45:52.997 [main]DEBUG io.github.wechaty.grpc.GrpcPuppet-[76] - IDLE
20:45:53.307 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[82] - start() rejection:
io.grpc.StatusRuntimeException: UNAUTHENTICATED: {code:8,message:"user not found by token 114.215.83.32:7777"}
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:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:68) [wechaty-0.1.5-SNAPSHOT.jar:?]

登录时候提示token不对

我将项目拉到了eclipse里,将以puppet_padplus_开头的token填入了DingDongBot类中运行后提示
17:13:47.123 [main]INFO io.github.wechaty.user.manager.PuppetManager-[23] - PuppetManager resolveInstance({"name":"Wechaty","puppet":"io.github.wechaty.grpc.GrpcPuppet","puppetOptions":{"token":"puppet_padplus_c7ace10a40b891cd","name":"DEFAULT"}}) 17:13:47.292 [main]INFO org.reflections.Reflections-[229] - Reflections took 156 ms to scan 5 urls, producing 159 keys and 1536 values 17:13:49.760 [main]ERROR io.github.wechaty.grpc.GrpcPuppet-[154] - cannot get ip by token, check token

当发送消息时候出现异常

当实现onMessage方法的时候会出现以下异常

Exception in thread "pool-8-thread-1" java.lang.Error: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1155)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.Wechaty$initPuppetEventBridge$$inlined$forEach$lambda$7.handler(Wechaty.kt:260)
	at io.github.wechaty.Puppet$on$12.handler(Puppet.kt:257)
	at io.github.wechaty.eventEmitter.EventEmitter$emit$$inlined$forEach$lambda$1.run(EventEmitter.kt:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	... 2 more
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.user.Message$ready$1.get(Message.kt:183)
	at io.github.wechaty.user.Message$ready$1.get(Message.kt:17)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
	at io.github.wechaty.Puppet$messagePayload$1$1.apply(Puppet.kt:625)
	at io.github.wechaty.Puppet$messagePayload$1$1.apply(Puppet.kt:37)
	at com.github.benmanes.caffeine.cache.UnboundedLocalCache.lambda$computeIfAbsent$2(UnboundedLocalCache.java:238)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at com.github.benmanes.caffeine.cache.UnboundedLocalCache.computeIfAbsent(UnboundedLocalCache.java:234)
	at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108)
	at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62)
	at io.github.wechaty.Puppet$messagePayload$1.get(Puppet.kt:624)
	at io.github.wechaty.Puppet$messagePayload$1.get(Puppet.kt:37)
	... 6 more
Caused by: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142)
	at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.messagePayload(PuppetGrpc.java:2891)
	at io.github.wechaty.grpc.GrpcPuppet$messageRawPayload$1.get(GrpcPuppet.kt:657)
	at io.github.wechaty.grpc.GrpcPuppet$messageRawPayload$1.get(GrpcPuppet.kt:29)
	... 6 more

代码为
`public class SimpleExample {
public static void main(String[] args) {

    Wechaty bot = Wechaty.instance("my_token")
        .onScan((qrcode, statusScanStatus, data) -> System.out.println(QrcodeUtils.getQr(qrcode)))
        .onLogin(user -> System.out.println("User logined :" + user.name()))
        .onMessage(message -> System.out.println("Message:" + message))
        .start(true);

}

}`

Connect to repo.maven.apache.org:443 failed: Operation timed out

When I'm running make install on my MacBook Pro with my China Mobile phone hotspot, I got the following networking error and can not install successfully.

$ make install
mvn clean install -f examples/pom.xml
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< io.github.wechaty:wechaty-examples >-----------------
[INFO] Building wechaty-examples 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.pom
Downloading from central: https://repo.maven.apache.org/maven2/io/perfmark/perfmark-api/0.19.0/perfmark-api-0.19.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:32 min
[INFO] Finished at: 2020-05-24T15:18:38+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project wechaty-examples: Could not resolve dependencies for project io.github.wechaty:wechaty-examples:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at io.github.wechaty:wechaty:jar:1.0.0-SNAPSHOT -> io.github.wechaty:wechaty-puppet-hostie:jar:1.0.0-SNAPSHOT -> io.github.wechaty:grpc:jar:0.11.25 -> io.grpc:grpc-netty-shaded:jar:1.25.0 -> io.grpc:grpc-core:jar:1.25.0 -> com.google.android:annotations:jar:4.1.1.4: Failed to read artifact descriptor for com.google.android:annotations:jar:4.1.1.4: Could not transfer artifact com.google.android:annotations:pom:4.1.1.4 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.pom: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Operation timed out -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
make: *** [install] Error 1

It would be better if we can use a China mirror for the installation, and add the howto into the README so that our developers can use it with just copy/paste.

Unable to listen to group chat joining information

   /**
     * 监听群聊加入
     */
    bot.on("RoomJoin",(RoomJoinListener) (room, list, contact, date) -> {
        String message = "欢迎";
        list.forEach(item-> System.out.println(item.getAlias()));
        room.say(message,list);
    });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.