Giter Club home page Giter Club logo

java-wechaty's Introduction

java-wechaty

Java CI with Maven Java Version

Java Wechaty

Java Wechaty Getting Started Wechaty in Kotlin

Connecting Chatbots

Powered by Wechaty Kotlin

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

Voice of the Developers

"Wechaty is a great solution, I believe there would be much more users recognize it." link
— @Gcaufy, Tencent Engineer, Author of WePY

"太好用,好用的想哭"
— @xinbenlv, Google Engineer, Founder of HaoShiYou.org

"最好的微信开发库" link
— @Jarvis, Baidu Engineer

"Wechaty让运营人员更多的时间思考如何进行活动策划、留存用户,商业变现" link
— @lijiarui, Founder & CEO of Juzi.BOT.

"If you know js ... try Wechaty, it's easy to use."
— @Urinx Uri Lee, Author of WeixinBot(Python)

See more at Wiki:Voice Of Developer

Join Us

Wechaty is used in many ChatBot projects by thousands of developers. If you want to talk with other developers, just scan the following QR Code in WeChat with secret code java wechaty, join our Wechaty Java Developers' Home.

Wechaty Friday.BOT QR Code

Scan now, because other Wechaty Java developers want to talk with you too! (secret code: java wechaty)

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);
  }
}

if use plugins

class Bot{
  public static void main(String args[]){
    Wechaty bot = Wechaty.instance()
            .use(
                WechatyPlugins.ScanPlugin(), 
                WechatyPlugins.DingDongPlugin(null))
            .start(true);
  }
}

Development

To be writen:

make install
make bot

Java Wechaty Developing Plan

We already have Wechaty in TypeScript, It will be not too hard to translate the TypeScript(TS) to Java because wechaty has only 3,000 lines of the TS code, they are well designed and de-coupled by the wechaty-puppet abstraction. So after we have translated those 3,000 lines of TypeScript code, we will almost be done.

As we have already a ecosystem of Wechaty in TypeScript, so we will not have to implement everything in Java, especially, in the Feb 2020, we have finished the @chatie/grpc service abstracting module with the wechaty-puppet-hostie implmentation.

The following diagram shows out that we can reuse almost everything in TypeScript, and what we need to do is only the block located at the top right of the diagram: Wechaty (Java).

  +--------------------------+ +--------------------------+
  |                          | |                          |
  |   Wechaty (TypeScript)   | |     Wechaty (Java)       |
  |                          | |                          |
  +--------------------------+ +--------------------------+

  +-------------------------------------------------------+
  |                 Wechaty Puppet Hostie                 |
  |                                                       |
  |                (wechaty-puppet-hostie)                |
  +-------------------------------------------------------+

+---------------------  @chatie/grpc  ----------------------+

  +-------------------------------------------------------+
  |                Wechaty Puppet Abstract                |
  |                                                       |
  |                   (wechaty-puppet)                    |
  +-------------------------------------------------------+

  +--------------------------+ +--------------------------+
  |      Pad Protocol        | |      Web Protocol        |
  |                          | |                          |
  | wechaty-puppet-padplus   | |(wechaty-puppet-puppeteer)|
  +--------------------------+ +--------------------------+
  +--------------------------+ +--------------------------+
  |    Windows Protocol      | |       Mac Protocol       |
  |                          | |                          |
  | (wechaty-puppet-windows) | | (wechaty-puppet-macpro)  |
  +--------------------------+ +--------------------------+

Example: How to Translate TypeScript to Java

There's a 100 lines class named Image in charge of downloading the WeChat image to different sizes.

It is a great example for demonstrating how do we translate the TypeScript to Java in Wechaty Way:

Image Class Source Code

If you are interested in the translation and want to look at how it works, it will be a good start from reading and comparing those two Image class files in TypeScript and Java at the same time.

To-do List

  • TS: TypeScript
  • SLOC: Source Lines Of Code

Wechaty Internal Modules

  1. Class Wechaty
  2. Class Contact
  3. Class ContactSelf
  4. Class Message
  5. Class Room
  6. Class Image
  7. Class Accessory
  8. Class Config
  9. Class Favorite
  10. Class Friendship
  11. Class MiniProgram
  12. Class RoomInvitation
  13. Class Tag
  14. Class UrlLink

Wechaty External Modules

  1. Class FileBox
  2. Class MemoryCard
  3. Class WechatyPuppet
  4. Class WechatyPuppetHostie

Usage

  1. Add a token to class io.github.wechaty.example.Main in folder examples/src/main/java

  2. Build:

    cd examples/  
    mvn install
  3. Run

    java -jar target/wechaty-example-1.0.0-SNAPSHOT-jar-with-dependencies.jar
    # or run in background  
    nohup java -jar target/wechaty-example-1.0.0-SNAPSHOT-jar-with-dependencies.jar &>> nohup.out & tailf nohup.out
  4. enjoy

Requirements

  1. JDK/JRE

Install

mvn install wechaty

Links

  1. Publish Java Module to Maven Central Repo - OSSRH Guide
  2. Kotlin vs Java: Most Important Differences That You Must Know

History

master

v0.4 (Jun 19, 2020)

Java(Kotlin) Wechaty BETA Released!

Read more from our Multi-language Wechaty Beta Release event from our blog:

v0.1.4 (June 13 2020)

  1. use PuppetManager to manage multi puppet implementations.
  2. add mock puppet.
  3. remove puppet implementations from wechaty pom. Which implementation to use depends on which implementation jar in your pom.
  4. fix some bugs.

v0.1.3 (June 6 2020)

  1. support plugins!

v0.1.2 (June 6 2020)

  1. change method on(Event:String,Listener:listener) to onEvent(Listener:listener). See examples
  2. update version to 0.1.2
  3. update wechaty grpc to 0.16.1
  4. move examples from wechaty to independent module. Make example easy to use.

v0.1.1 (May 31 2020)

  1. update version to 0.1.1-SNAPSHOT
  2. finish all function of room
  3. remove log4j2 package from wechaty
  4. change all log level to debug
  5. remove log4j2.xml from wechaty

v0.1 (May 18 2020)

We decided to use Kotlin to develop the Java Wechaty!

  1. Project re-inited by overwriting wechaty/java-wechaty by diaozxin/kotlin-wechaty.
  2. Second contributor joined: @redmaple1 Xiaoya Ren

v0.0.1 (Mar 12, 2020)

  1. Project created.
  2. First contributor joined: @diaozxin007 Zhengxin DIAO (刁政欣)

Related Projects

  • Wechaty - Conversatioanl AI Chatot SDK for Wechaty Individual Accounts (TypeScript)
  • Python Wechaty - Python WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Python)
  • Go Wechaty - Go WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Go)
  • Java Wechaty - Java WeChaty Conversational AI Chatbot SDK for Wechat Individual Accounts (Java)
  • Scala Wechaty - Scala WeChaty Conversational AI Chatbot SDK for WechatyIndividual Accounts (Scala)

Stargazers over time

Stargazers over time

Badge

Wechaty in Kotlin

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

Contributors

contributors contributors contributors contributors contributors contributors contributors contributors

Committers

Creator

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's People

Contributors

code-challenge-reece avatar dependabot[bot] avatar diaozxin007 avatar hebo6 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

java-wechaty's Issues

代码是否还没开发完的呢

1,我看好像只实现了五个事件,ScanListener,MessageListener,RoomJoinListener,RoomLeaveListener,RoomTopicListener,其它的事件监听是不是还没完成的呢
2,建议事件名称不要使用魔法值,加一个常量类,调用常量类来获取事件名称,我翻源码才知道所有事件的名称怎么写
image

[Bug]use correct wxwork token,start wechaty, get exception WriteBufferingAndExceptionHandler

do the following and get a exception:

  1. clone code from git https://github.com/wechaty/java-wechaty
  2. change the Wechaty token in file io.github.wechaty.example.Main.java
  3. run the command:
    mvn clean install
    java -jar target/wechaty-example-1.0.0-SNAPSHOT-jar-with-dependencies.jar
  4. get the exception:
    [main] INFO org.reflections.Reflections - Reflections took 4016 ms to scan 1 urls, producing 3850 keys and 22251 values
    [main] ERROR io.github.wechaty.grpc.GrpcPuppet - start() rejection:
    io.grpc.StatusRuntimeException: INTERNAL: channelRead() missed by ProtocolNegotiator handler: PooledUnsafeDirectByteBuf(ridx: 0, widx: 2, cap: 1024)
    Channel Pipeline: [HttpProxyHandler$HttpClientCodecWrapper#0, HttpProxyHandler#0, ProtocolNegotiators$ProxyProtocolNegotiationHandler#0, WriteBufferingAndExceptionHandler#0, DefaultChannelPipeline$TailContext#0]
    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.example.Main.main(Main.java:29)
    [main] INFO io.github.wechaty.Wechaty - start Wechaty
    ^C[StartMain-shutdown-hook] WARN io.github.wechaty.grpc.GrpcPuppet - stop() is called on a OFF puppet. await ready(off) and return.

puppet_padplus_3e5aXXXXXXX的token

背景
1、linux的docker跑起来了
2、客户端jdk用了1.8 ,运行起来后,后台能够看到群讨论记录的打印
类似:
03:32:52 VERB IoClient onMessage(Message#Text[🗣Contact<hi多大>@👥Room<“XXXX讲潮牌”(一群)>] @杭州•岳 ) 不能完全认可.
3、客户端采用的代码
java-wechaty-getting-started

但是更多是如下错误
1、docker端

2020-07-03T03:29:44.761706176Z Error [AssertionError]: Assertion failed
2020-07-03T03:29:44.761714398Z at new goog.asserts.AssertionError (/wechaty/node_modules/google-protobuf/google-protobuf.js:81:876)
2020-07-03T03:29:44.761718004Z at Object.goog.asserts.doAssertFailure_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:82:257)
2020-07-03T03:29:44.761721136Z at Object.goog.asserts.assert [as assert] (/wechaty/node_modules/google-protobuf/google-protobuf.js:83:83)
2020-07-03T03:29:44.761724220Z at jspb.BinaryEncoder.writeUnsignedVarint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:458:77)
2020-07-03T03:29:44.761727299Z at jspb.BinaryWriter.writeUnsignedVarint64_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:480:507)
2020-07-03T03:29:44.761730162Z at jspb.BinaryWriter.writeUint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:485:471)
2020-07-03T03:29:44.761733086Z at Function.proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:849:12)
2020-07-03T03:29:44.761749627Z at proto.wechaty.puppet.MessagePayloadResponse.serializeBinary (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:812:47)
2020-07-03T03:29:44.761753025Z at serialize_wechaty_puppet_MessagePayloadResponse (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet_grpc_pb.js:460:26)
2020-07-03T03:29:44.761756063Z at sendUnaryResponse (/wechaty/node_modules/grpc/src/server.js:98:15)
2020-07-03T03:29:44.761758865Z at sendUnaryData (/wechaty/node_modules/grpc/src/server.js:600:9)
2020-07-03T03:29:44.761761665Z at Object. (/wechaty/node_modules/wechaty-puppet-hostie/src/server/puppet-implementation.ts:529:16)
2020-07-03T03:29:44.761764667Z at Generator.next ()
2020-07-03T03:29:44.761767398Z at fulfilled (/wechaty/node_modules/wechaty-puppet-hostie/dist/src/server/puppet-implementation.js:5:58)
2020-07-03T03:29:44.761770241Z at runMicrotasks ()
2020-07-03T03:29:44.761773036Z at processTicksAndRejections (internal/process/task_queues.js:97:5) {
2020-07-03T03:29:44.761778143Z reportErrorToServer: true,
2020-07-03T03:29:44.761780927Z messagePattern: 'Assertion failed',
2020-07-03T03:29:44.761783601Z code: 13
2020-07-03T03:29:44.761786296Z }
2020-07-03T03:29:44.761788788Z 03:29:44 VERB PuppetServiceImpl messagePayload()
2020-07-03T03:29:44.761791379Z 03:29:44 VERB Puppet messagePayload(2149790006771429387)
2020-07-03T03:29:44.761793995Z Error [AssertionError]: Assertion failed
2020-07-03T03:29:44.761796555Z at new goog.asserts.AssertionError (/wechaty/node_modules/google-protobuf/google-protobuf.js:81:876)
2020-07-03T03:29:44.761799358Z at Object.goog.asserts.doAssertFailure_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:82:257)
2020-07-03T03:29:44.761802274Z at Object.goog.asserts.assert [as assert] (/wechaty/node_modules/google-protobuf/google-protobuf.js:83:83)
2020-07-03T03:29:44.761805249Z at jspb.BinaryEncoder.writeUnsignedVarint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:458:77)
2020-07-03T03:29:44.761808019Z at jspb.BinaryWriter.writeUnsignedVarint64_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:480:507)
2020-07-03T03:29:44.761810816Z at jspb.BinaryWriter.writeUint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:485:471)
2020-07-03T03:29:44.761813681Z at Function.proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:849:12)
2020-07-03T03:29:44.761816893Z at proto.wechaty.puppet.MessagePayloadResponse.serializeBinary (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:812:47)
2020-07-03T03:29:44.761829647Z at serialize_wechaty_puppet_MessagePayloadResponse (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet_grpc_pb.js:460:26)
2020-07-03T03:29:44.761832852Z at sendUnaryResponse (/wechaty/node_modules/grpc/src/server.js:98:15)
2020-07-03T03:29:44.761835836Z at sendUnaryData (/wechaty/node_modules/grpc/src/server.js:600:9)
2020-07-03T03:29:44.761838544Z at Object. (/wechaty/node_modules/wechaty-puppet-hostie/src/server/puppet-implementation.ts:529:16)
2020-07-03T03:29:44.761841438Z at Generator.next ()
2020-07-03T03:29:44.761844142Z at fulfilled (/wechaty/node_modules/wechaty-puppet-hostie/dist/src/server/puppet-implementation.js:5:58)
2020-07-03T03:29:44.761846934Z at runMicrotasks ()
2020-07-03T03:29:44.761849620Z at processTicksAndRejections (internal/process/task_queues.js:97:5) {
2020-07-03T03:29:44.761852421Z reportErrorToServer: true,
2020-07-03T03:29:44.761855220Z messagePattern: 'Assertion failed',
2020-07-03T03:29:44.761861105Z code: 13
2020-07-03T03:29:44.761863731Z }
2020-07-03T03:29:44.770798332Z 03:29:44 VERB PuppetServiceImpl messagePayload()
2020-07-03T03:29:44.770831364Z 03:29:44 VERB Puppet messagePayload(8068032150445748047)
2020-07-03T03:29:44.771273379Z Error [AssertionError]: Assertion failed
2020-07-03T03:29:44.771283764Z at new goog.asserts.AssertionError (/wechaty/node_modules/google-protobuf/google-protobuf.js:81:876)
2020-07-03T03:29:44.771287812Z at Object.goog.asserts.doAssertFailure_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:82:257)
2020-07-03T03:29:44.771290983Z at Object.goog.asserts.assert [as assert] (/wechaty/node_modules/google-protobuf/google-protobuf.js:83:83)
2020-07-03T03:29:44.771297830Z at jspb.BinaryEncoder.writeUnsignedVarint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:458:77)
2020-07-03T03:29:44.771301037Z at jspb.BinaryWriter.writeUnsignedVarint64_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:480:507)
2020-07-03T03:29:44.771304006Z at jspb.BinaryWriter.writeUint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:485:471)
2020-07-03T03:29:44.771306989Z at Function.proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:849:12)
2020-07-03T03:29:44.771310210Z at proto.wechaty.puppet.MessagePayloadResponse.serializeBinary (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:812:47)
2020-07-03T03:29:44.771313120Z at serialize_wechaty_puppet_MessagePayloadResponse (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet_grpc_pb.js:460:26)
2020-07-03T03:29:44.771330478Z at sendUnaryResponse (/wechaty/node_modules/grpc/src/server.js:98:15)
2020-07-03T03:29:44.771333707Z at sendUnaryData (/wechaty/node_modules/grpc/src/server.js:600:9)
2020-07-03T03:29:44.771336483Z at Object. (/wechaty/node_modules/wechaty-puppet-hostie/src/server/puppet-implementation.ts:529:16)
2020-07-03T03:29:44.771339511Z at Generator.next ()
2020-07-03T03:29:44.771342236Z at fulfilled (/wechaty/node_modules/wechaty-puppet-hostie/dist/src/server/puppet-implementation.js:5:58)
2020-07-03T03:29:44.771345086Z at runMicrotasks ()
2020-07-03T03:29:44.771347809Z at processTicksAndRejections (internal/process/task_queues.js:97:5) {
2020-07-03T03:29:44.771353495Z reportErrorToServer: true,
2020-07-03T03:29:44.771358777Z messagePattern: 'Assertion failed',
2020-07-03T03:29:44.771361534Z code: 13
2020-07-03T03:29:44.771364276Z }
2020-07-03T03:29:44.775711043Z 03:29:44 VERB PuppetServiceImpl messagePayload()
2020-07-03T03:29:44.775732115Z 03:29:44 VERB Puppet messagePayload(2149790006771429387)
2020-07-03T03:29:44.775736224Z Error [AssertionError]: Assertion failed
2020-07-03T03:29:44.775739115Z at new goog.asserts.AssertionError (/wechaty/node_modules/google-protobuf/google-protobuf.js:81:876)
2020-07-03T03:29:44.775745666Z at Object.goog.asserts.doAssertFailure_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:82:257)
2020-07-03T03:29:44.775748917Z at Object.goog.asserts.assert [as assert] (/wechaty/node_modules/google-protobuf/google-protobuf.js:83:83)
2020-07-03T03:29:44.775752062Z at jspb.BinaryEncoder.writeUnsignedVarint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:458:77)
2020-07-03T03:29:44.775755041Z at jspb.BinaryWriter.writeUnsignedVarint64_ (/wechaty/node_modules/google-protobuf/google-protobuf.js:480:507)
2020-07-03T03:29:44.775760502Z at jspb.BinaryWriter.writeUint64 (/wechaty/node_modules/google-protobuf/google-protobuf.js:485:471)
2020-07-03T03:29:44.775763984Z at Function.proto.wechaty.puppet.MessagePayloadResponse.serializeBinaryToWriter (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:849:12)
2020-07-03T03:29:44.775767139Z at proto.wechaty.puppet.MessagePayloadResponse.serializeBinary (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet/message_pb.js:812:47)
2020-07-03T03:29:44.775770099Z at serialize_wechaty_puppet_MessagePayloadResponse (/wechaty/node_modules/@chatie/grpc/dist/generated/wechaty/puppet_grpc_pb.js:460:26)
2020-07-03T03:29:44.775773311Z at sendUnaryResponse (/wechaty/node_modules/grpc/src/server.js:98:15)
2020-07-03T03:29:44.775787817Z at sendUnaryData (/wechaty/node_modules/grpc/src/server.js:600:9)
2020-07-03T03:29:44.775790881Z at Object. (/wechaty/node_modules/wechaty-puppet-hostie/src/server/puppet-implementation.ts:529:16)
2020-07-03T03:29:44.775793877Z at Generator.next ()
2020-07-03T03:29:44.775796659Z at fulfilled (/wechaty/node_modules/wechaty-puppet-hostie/dist/src/server/puppet-implementation.js:5:58)
2020-07-03T03:29:44.775799528Z at runMicrotasks ()
2020-07-03T03:29:44.775802263Z at processTicksAndRejections (internal/process/task_queues.js:97:5) {
2020-07-03T03:29:44.775805046Z reportErrorToServer: true,
2020-07-03T03:29:44.775807814Z messagePattern: 'Assertion failed',
2020-07-03T03:29:44.775810645Z code: 13
2020-07-03T03:29:44.775813387Z }
2020-07-03T03:29:44.775816505Z 03:29:44 VERB PuppetServiceImpl messagePayload()

2、 客户端如下
12:25:07.386 [pool-9-thread-3]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1593750307386
12:25:07.386 [pool-13-thread-5]DEBUG io.github.wechaty.grpc.GrpcPuppet-[946] - PuppetHostie EVENT_TYPE_MESSAGE payload {"messageId":"5095696973674313635"}
12:25:07.387 [pool-9-thread-5]DEBUG io.github.wechaty.Puppet-[267] - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
12:25:07.387 [pool-9-thread-5]DEBUG io.github.wechaty.Puppet-[79] - heartbeat -> heartbeat
12:25:07.387 [pool-9-thread-5]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68] - feed dog WatchdogFood(timeout=60000, data=heartbeat)
12:25:07.387 [pool-9-thread-5]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1593750307387
Exception in thread "pool-9-thread-2" java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
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.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
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.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
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)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.helpAsyncBlocker(ForkJoinPool.java:1144)
at java.base/java.util.concurrent.ForkJoinPool.helpAsyncBlocker(ForkJoinPool.java:3151)
at java.base/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1817)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1998)
... 9 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)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.helpAsyncBlocker(ForkJoinPool.java:1144)
at java.base/java.util.concurrent.ForkJoinPool.helpAsyncBlocker(ForkJoinPool.java:3151)
at java.base/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1817)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1998)
... 25 more
Exception in thread "pool-9-thread-10" java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
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.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: Assertion failed
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
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.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

几个常见问题

问题1
02:01:21 ERR Config ###########################
02:01:21 ERR Config unhandledRejection: Error: get contact timeout
at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) [object Promise]
02:01:21 ERR Config ###########################
02:01:21 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
Config Error: get contact timeout
at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
(node:40) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 407)

导致message事件捕捉不到。

心跳包解析异常

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "timeout" (class io.github.wechaty.schemas.EventHeartbeatPayload), not marked as ignorable (one known property: "data"]) at [Source: (String)"{"data":"heartbeat","timeout":60000}"; line: 1, column: 36] (through reference chain: io.github.wechaty.schemas.EventHeartbeatPayload["timeout"])

How to get contactList

When I execute the method "wechaty().getContactManager().findAll(filter)", excepiton occurs.

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: stream has already been operated upon or closed
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_77]
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895) ~[?:1.8.0_77]
at io.github.wechaty.user.manager.ContactManager.findAll(ContactManager.kt:49) ~[wechaty-0.1.3-SNAPSHOT.jar:?]
at io.github.wechaty.example.Main.lambda$1(Main.java:24) ~[classes/:?]
at io.github.wechaty.Wechaty$on$1.handler(Wechaty.kt:119) [wechaty-0.1.3-SNAPSHOT.jar:?]
at io.github.wechaty.eventEmitter.EventEmitter$emit$$inlined$forEach$lambda$1.run(EventEmitter.kt:49) [wechaty-puppet-0.1.3-SNAPSHOT.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_77]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_77]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77]
Caused by: java.lang.IllegalStateException: stream has already been operated upon or closed
at java.util.stream.AbstractPipeline.(AbstractPipeline.java:203) ~[?:1.8.0_77]
at java.util.stream.ReferencePipeline.(ReferencePipeline.java:94) ~[?:1.8.0_77]
at java.util.stream.ReferencePipeline$StatelessOp.(ReferencePipeline.java:618) ~[?:1.8.0_77]
at java.util.stream.ReferencePipeline$3.(ReferencePipeline.java:187) ~[?:1.8.0_77]
at java.util.stream.ReferencePipeline.map(ReferencePipeline.java:186) ~[?:1.8.0_77]
at io.github.wechaty.Puppet$contactSearch$1.get(Puppet.kt:462) ~[wechaty-puppet-0.1.3-SNAPSHOT.jar:?]
at io.github.wechaty.Puppet$contactSearch$1.get(Puppet.kt:37) ~[wechaty-puppet-0.1.3-SNAPSHOT.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_77]
at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582) ~[?:1.8.0_77]
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_77]
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_77]
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_77]
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_77]

Unused import cause failure in JDK11

this import is never used in the code (io.github.wechaty.user.manager.FriendshipManager). And it causes compilation failure in jdk 11.0.5.hs-adpt (AdoptOpenJDK).

import com.sun.xml.internal.ws.message.PayloadElementSniffer

This line shall be able to be remove safely .

SDK的message的type的bug

转发一个网页 得到的类型是Video
不是应该为url么

    <wechaty.version>0.1.4-SNAPSHOT</wechaty.version>

Think about Kotlin: Google's Swift for Java

Today @diaozxin007 talked about the good of Kotlin after we started facing #4 :

  1. It is very flexible, like functional programming and can be fully integrated with JavaScript
  2. Kotlin is now Google’s preferred language for Android app development, May 2019

So let's consider to use Kotlin instead of the Java, to implement our Wechaty for Java users, because the Kotlin is run inside JVM.

BTW: If we final use Kotlin for our project, then I believe it will be better to rename this project from java-wechaty to kotlin-wechaty.

To be discussed.

Links

Link to wechaty/wechaty#1927

Move java modules to their own repos: `wechaty/java-xxx`

In order to make our repo clean and everything to be straightforward, let's plan to separate the following functionalities to different modules in the following repositories:

  1. java-wechaty-puppet
  2. java-wechaty-puppet-hostie
  3. java-wechaty-puppet-mock
  4. java-memory-card
  5. java-file-box

We can develop the above modules in our main java-wechaty at first for convenience, and separate them out when they are ready to be separated.

To be discussed & separated.

最新版本启动报错

Caused by: java.lang.RuntimeException: expect one puppet,but can not found any one.
at io.github.wechaty.user.manager.PuppetManager$Companion.resolveInstance(PuppetManager.kt:29) ~[wechaty-0.1.5-SNAPSHOT.jar:?]
at io.github.wechaty.Wechaty.initPuppet(Wechaty.kt:176) ~[wechaty-0.1.5-SNAPSHOT.jar:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:51) ~[wechaty-0.1.5-SNAPSHOT.jar:?]

使用message.mentionList()触发kotlin.NotImplementedError: An operation is not implemented.

代码重现:

message.mentionList().forEach(c -> System.out.println("mentioned contact:" + c));


Error:

Exception in thread "pool-2-thread-11" kotlin.NotImplementedError: An operation is not implemented.
at io.github.wechaty.Puppet.roomMemberSearch(Puppet.kt:822)
at io.github.wechaty.user.Room.memberAll(Room.kt:365)
at io.github.wechaty.user.Message.mentionList(Message.kt:164)


Root cause:

File: java-wechaty/wechaty-puppet/src/main/kotlin/Puppet.kt

Line:

fun roomMemberSearch(roomId: String, query: RoomMemberQueryFilter): Future<List<String>> {
        TODO()
    }

    fun roomReach(query: RoomQueryFilter?): Future<List<String>> {
        TODO()
    }

请问 近期有没有继续开发的可能? 还是有没有可替代的解决方法?

The JS `bot.Room.find()` API does not fit for Java

In java,
A static field or method should be directly referred to by its class name instead of its corresponding object name.

so

 Room room = bot.Room.find("xxxx");

is not suitable for java api

so I suggest use like

Room room = bot.findRoom("xxx");

Room room = bot.createRoom();

the same as contact

Contact contact = bot.findContact("xxx");

Contact contact = bot.createContact();

SDK的bug:服务重启后,机器人所在群消息不能自动同步消息

WECHATY_PUPPET_PADPLUS_TOKEN
java版本sdk
linux的docker

场景描述:
2个群的消息汇总到第三个群,通过机器人来实现。

程序开发完毕功能正常。
因为各种原因,docker服务和客户端服务重启。
重启后出现本bug:
2个群的消息不能自动同步到第三个群。
第三个群任何人发言后,信息才能同步到发言的那个群中。

第三个群的指定的代码

                    RoomManager roomManager = new RoomManager(message.getWechaty());
                    RoomQueryFilter roomQueryFilter = new RoomQueryFilter();
                    roomQueryFilter.setId("1xxxxx36@chatroom");    
                  
                    List<Room> hisroom = roomManager.findAll(roomQueryFilter);
                    for (int i = 0; i < hisroom.size(); i++) {
                            Room roomsay = hisroom.get(i);      roomsay.say("xxxxxx");
                    }

是缓存问题么?

群内@人文本消息无效

debug 跟进发现这个方法的mentionList参数没有用到

override fun messageSendText(conversationId: String, text: String, mentionList: List<String>?): Future<String?> {
        val request = Message.MessageSendTextRequest.newBuilder()
            .setConversationId(conversationId)
            .setText(text)
           //遗漏了这行
            .addAllMentonalIds(mentionList)
            .build()


        return CompletableFuture.supplyAsync {
            val response = grpcClient!!.messageSendText(request)
            val stringValue = response.id
            stringValue.value
        }
    }

[BUG]查找群聊方法查找聊天室不全

问题描述

当我使用finAll方法的时候,传入一个空的RoomQueryFilter,只会查找到我的第一个群聊

问题代码

public void roomQueryFilter() {
        Wechaty bot = Wechaty.instance(Token.token)
            .onScan((qrcode, statusScanStatus, data) -> System.out.println(QrcodeUtils.getQr(qrcode)))
            .onLogin(user -> System.out.println("User logined :" + user.name()))
            .onMessage(message -> {
                String text = message.text();
                Contact from = message.from();
                Contact to = message.to();
                System.out.println("收到来自" + from.name() + "的消息:" + text);
                RoomManager roomManager = new RoomManager(from.getWechaty());
                // 房间找不全
                // 其他功能应该没问题
                RoomQueryFilter queryFilter = new RoomQueryFilter();
                // 查找全部房间
                List<Room> all = roomManager.findAll(queryFilter);
                System.out.println("查找到的房间个数为" + all.size());
                for (Room room : all) {
                    try {
                        System.out.println("房间名为" + room.topic(null).get());
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    } catch (ExecutionException e) {
                        e.printStackTrace();
                    }
                }

            })
            .onLogout((contactId, reason) -> {
                System.out.println("用户id为:" + contactId);
                System.out.println("理由为:" + reason);
            })
            .start(true);
    }

控制台输出

查找到的房间个数为1
房间名为Wechaty Summer of Code - Announce

message事件一直不触发

1,之前用使用java-wechaty-getting-started或者源码java-wechaty都能跑通,最近创建一个新项目,导入java-wechaty包,可以跑起来,可以扫码登录(scan会触发),但接收不到消息
(message不会触发)。再拿java-wechaty-getting-started去跑也不会触发message了

2,我跑两个java-wechaty的demo,同一个token,登录同一微信号,两个都在运行,正常打印log,正常来说,不是会掉线一个么?

以上使用的都是puppet-hostie的token
image
image

JAVA SDK异常 客户端作业的时候报错如下

2020-07-13 15:06:21.352 ERROR io.github.wechaty.grpc.GrpcPuppet - error
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "timeout" (class io.github.wechaty.schemas.EventHeartbeatPayload), not marked as ignorable (one known property: "data"])
at [Source: (String)"{"data":"2f2b1191-4dc5-4813-b4de-8c57b1bcbae8","timeout":60000}"; line: 1, column: 63] (through reference chain: io.github.wechaty.schemas.EventHeartbeatPayload["timeout"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:855)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1206)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1592)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1570)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:263)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:443)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1310)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:331)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4482)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3434)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3417)
at io.github.wechaty.grpc.GrpcPuppet.onGrpcStreamEvent(GrpcPuppet.kt:1051)
at io.github.wechaty.grpc.GrpcPuppet.access$onGrpcStreamEvent(GrpcPuppet.kt:29)
at io.github.wechaty.grpc.GrpcPuppet$startGrpcStr

升级版本后启动报错

Caused by: java.lang.RuntimeException: expect one puppet,but can not found any one.
at io.github.wechaty.user.manager.PuppetManager$Companion.resolveInstance(PuppetManager.kt:29) ~[wechaty-0.1.4-SNAPSHOT.jar:?]
at io.github.wechaty.Wechaty.initPuppet(Wechaty.kt:176) ~[wechaty-0.1.4-SNAPSHOT.jar:?]
at io.github.wechaty.Wechaty.start(Wechaty.kt:51) ~[wechaty-0.1.4-SNAPSHOT.jar:?]

多二维码问题

1,登录情况下,我重启程序,没自动登录,会显示新的二维码,但微信上没退出登录还是显示windows在线。扫新的二维码显示二维码是过期的
2,我退出windows登录,多试几次,会出现多个二维码,扫码登录收不到消息了
3,修改群名称会报错
2020-06-02 15:57:14.782 ERROR 16040 --- [ool-15-thread-9] io.github.wechaty.grpc.GrpcPuppet : error

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "timestamp" (class io.github.wechaty.schemas.EventRoomTopicPayload), not marked as ignorable (5 known properties: "oldTopic", "timstamp", "changerId", "roomId", "newTopic"])
at [Source: (String)"{"changerId":"suruozhong","newTopic":"robot","oldTopic":"robot1","roomId":"23431178914@chatroom","timestamp":1591084633}"; line: 1, column: 121] (through reference chain: io.github.wechaty.schemas.EventRoomTopicPayload["timestamp"])
at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:855)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1206)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1592)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperties(BeanDeserializerBase.java:1542)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:511)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1310)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:331)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4482)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3434)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3417)
at io.github.wechaty.grpc.GrpcPuppet.onGrpcStreamEvent(GrpcPuppet.kt:1076)
at io.github.wechaty.grpc.GrpcPuppet.access$onGrpcStreamEvent(GrpcPuppet.kt:28)
at io.github.wechaty.grpc.GrpcPuppet$startGrpcStream$streamObserver$1.onNext(GrpcPuppet.kt:165)
at io.github.wechaty.grpc.GrpcPuppet$startGrpcStream$streamObserver$1.onNext(GrpcPuppet.kt:163)
at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onMessage(ClientCalls.java:434)
at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33)
at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:599)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:584)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

发送图片接口会报错

FileBox fileBox = FileBox.fromUrl(img, System.currentTimeMillis() + “.png”)), null);
contact.say(fileBox);

Exception in thread "pool-3-thread-2" java.lang.Error: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: can not get message callback response.
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: io.grpc.StatusRuntimeException: INTERNAL: can not get message callback response.
at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
at io.github.wechaty.user.Contact.say(Contact.kt:48)
at com.zh.zhong.common.service.impl.WechatyService.onMessage(WechatyService.java:158)
at com.zh.zhong.common.service.impl.WechatyService.lambda$init$2(WechatyService.java:58)
at io.github.wechaty.Wechaty$on$3.handler(Wechaty.kt:160)
at io.github.wechaty.eventEmitter.EventEmitter$emit$$inlined$forEach$lambda$1.run(EventEmitter.kt:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
... 2 more
Caused by: io.grpc.StatusRuntimeException: INTERNAL: can not get message callback response.
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.messageSendFile(PuppetGrpc.java:2940)
at io.github.wechaty.grpc.GrpcPuppet$messageSendFile$1.get(GrpcPuppet.kt:593)
at io.github.wechaty.grpc.GrpcPuppet$messageSendFile$1.get(GrpcPuppet.kt:29)
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)

[question] this eventName:START has no listener

昨日还好好地,早上来就是这样,接收不到信息,也不能发送
17:08:12.929 [main]INFO org.reflections.Reflections-[229] - Reflections took 102 ms to scan 4 urls, producing 159 keys and 1545 values
17:08:14.622 [main]DEBUG io.github.wechaty.grpc.GrpcPuppet-[76] - IDLE
17:08:14.964 [main]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43] - this eventName:START has no listener
17:08:14.964 [main]INFO io.github.wechaty.Wechaty-[58] - start Wechaty
17:08:15.003 [pool-14-thread-1]DEBUG io.github.wechaty.grpc.GrpcPuppet-[946] - PuppetHostie EVENT_TYPE_LOGIN payload {"contactId":"wxid_bil9bkbyn47522"}
17:08:15.005 [pool-10-thread-1]DEBUG io.github.wechaty.Puppet-[267] - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
17:08:15.005 [pool-10-thread-1]DEBUG io.github.wechaty.Puppet-[79] - heartbeat -> heartbeat
17:08:15.006 [pool-10-thread-1]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68] - feed dog WatchdogFood(timeout=60000, data=heartbeat)
17:08:15.006 [pool-10-thread-1]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1605258495006
17:08:15.040 [pool-10-thread-2]DEBUG io.github.wechaty.Puppet-[501] - contactPayload is null by id wxid_bil9bkbyn47522
17:08:27.946 [pool-11-thread-1]DEBUG io.github.wechaty.Puppet-[133] - HEARTBEAT_COUNTER #1
17:08:27.979 [pool-14-thread-2]DEBUG io.github.wechaty.grpc.GrpcPuppet-[946] - PuppetHostie EVENT_TYPE_DONG payload {"data":"recover CPR #1"} 17:08:27.979 [pool-10-thread-3]DEBUG io.github.wechaty.Puppet-[267] - class Type is io.github.wechaty.schemas.EventHeartbeatPayload 17:08:27.979 [pool-10-thread-3]DEBUG io.github.wechaty.Puppet-[79] - heartbeat -> heartbeat 17:08:27.979 [pool-10-thread-3]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68] - feed dog WatchdogFood(timeout=60000, data=heartbeat) 17:08:27.979 [pool-10-thread-3]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1605258507979 17:08:27.983 [pool-10-thread-4]DEBUG io.github.wechaty.Puppet-[158] - class Type is io.github.wechaty.schemas.EventDongPayload 17:08:27.983 [pool-10-thread-4]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43] - **this eventName:DONG has no listener** 17:08:42.945 [pool-11-thread-1]DEBUG io.github.wechaty.Puppet-[133] - HEARTBEAT_COUNTER #2 17:08:42.974 [pool-14-thread-3]DEBUG io.github.wechaty.grpc.GrpcPuppet-[946] - PuppetHostie EVENT_TYPE_DONG payload {"data":"recover CPR #2"}
17:08:42.975 [pool-10-thread-5]DEBUG io.github.wechaty.Puppet-[267] - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
17:08:42.975 [pool-10-thread-5]DEBUG io.github.wechaty.Puppet-[79] - heartbeat -> heartbeat
17:08:42.975 [pool-10-thread-5]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68] - feed dog WatchdogFood(timeout=60000, data=heartbeat)
17:08:42.975 [pool-10-thread-6]DEBUG io.github.wechaty.Puppet-[158] - class Type is io.github.wechaty.schemas.EventDongPayload
17:08:42.975 [pool-10-thread-5]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1605258522975
17:08:42.975 [pool-10-thread-6]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43] - this eventName:DONG has no listener
17:08:57.946 [pool-11-thread-1]DEBUG io.github.wechaty.Puppet-[133] - HEARTBEAT_COUNTER #3
17:08:57.975 [pool-14-thread-4]DEBUG io.github.wechaty.grpc.GrpcPuppet-[946] - PuppetHostie EVENT_TYPE_DONG payload {"data":"`recover CPR #3"}
17:08:57.975 [pool-10-thread-7]DEBUG io.github.wechaty.Puppet-[267] - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
17:08:57.975 [pool-10-thread-7]DEBUG io.github.wechaty.Puppet-[79] - heartbeat -> heartbeat
17:08:57.975 [pool-10-thread-7]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68] - feed dog WatchdogFood(timeout=60000, data=heartbeat)
17:08:57.975 [pool-10-thread-8]DEBUG io.github.wechaty.Puppet-[158] - class Type is io.github.wechaty.schemas.EventDongPayload
17:08:57.975 [pool-10-thread-7]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79] - lastFeed is 1605258537975
17:08:57.975 [pool-10-thread-8]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43] - this eventName:DONG has no listener

客户端程序运行起来了,docker也正常运行了 几个问题

各种类型的内容存放在哪里
1、图片 (?)
2、动图 (已经能够获取)
3、视频 (?)
4、语音(?)
5、文字(已经能够获取)
6、网页分享(已经能够获取)
7、小程序分享(已经能够获取)
8、网友补充......

? 不清楚哪里获取

room的群名获取相关

结论如下

topic设置过的 需要docker重启

也就是说:room.say("本群的群名字:"+room.topic(null).get()); 这个可以用

room.topic(“new name”)

这个不好用,慎重

用他后,你再修改群的名字,再获取群的名字,修改不生效

Why does my robot only print the log without displaying the login QR code

16:38:54.387 [main]DEBUG io.github.wechaty.grpc.GrpcPuppet-[77]  - IDLE
16:38:55.132 [main]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43]  - this eventName:START has no listener
16:38:55.133 [main]INFO  io.github.wechaty.Wechaty-[58]  - start Wechaty
16:38:55.168 [pool-12-thread-1]DEBUG io.github.wechaty.grpc.GrpcPuppet-[944]  - PuppetHostie EVENT_TYPE_LOGIN payload {"contactId":"wxid_g2c8qakzm2zn22"}
16:38:55.173 [pool-8-thread-1]DEBUG io.github.wechaty.Puppet-[267]  - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
16:38:55.173 [pool-8-thread-1]DEBUG io.github.wechaty.Puppet-[79]  - heartbeat -> heartbeat
16:38:55.173 [pool-8-thread-1]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68]  - feed dog WatchdogFood(timeout=60000, data=heartbeat)
16:38:55.173 [pool-8-thread-1]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79]  - lastFeed is 1591519135173
16:38:55.939 [pool-8-thread-2]DEBUG io.github.wechaty.Puppet-[499]  - contactPayload is null by id wxid_g2c8qakzm2zn22
io.github.wechaty.user.ContactSelf@15ccc200
16:39:02.556 [pool-9-thread-1]DEBUG io.github.wechaty.Puppet-[133]  - HEARTBEAT_COUNTER #1
16:39:02.614 [pool-12-thread-2]DEBUG io.github.wechaty.grpc.GrpcPuppet-[944]  - PuppetHostie EVENT_TYPE_DONG payload {"data":"`recover CPR #1"}
16:39:02.615 [pool-8-thread-3]DEBUG io.github.wechaty.Puppet-[267]  - class Type is io.github.wechaty.schemas.EventHeartbeatPayload
16:39:02.615 [pool-8-thread-3]DEBUG io.github.wechaty.Puppet-[79]  - heartbeat -> heartbeat
16:39:02.615 [pool-8-thread-3]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[68]  - feed dog WatchdogFood(timeout=60000, data=heartbeat)
16:39:02.615 [pool-8-thread-3]DEBUG io.github.wechaty.io.github.wechaty.watchdag.WatchdogFood-[79]  - lastFeed is 1591519142615
16:39:02.622 [pool-8-thread-4]DEBUG io.github.wechaty.Puppet-[158]  - class Type is io.github.wechaty.schemas.EventDongPayload
16:39:02.622 [pool-8-thread-4]DEBUG io.github.wechaty.eventEmitter.EventEmitter-[43]  - this eventName:DONG has no listener

Suggest that the indent size for this project: 2 spaces

We are kicking off this project by wechaty/java-wechaty-bak#3 with the fantastic work from @diaozxin007 . (thank you very much @diaozxin007 !)

I'd like to suggest that our Java Wechaty project follow the +2 spaces block indentation style, and we have two reasons to follow that:

  1. According to the Google Java Style Guide:

    Block indentation: +2 spaces
    Each time a new block or block-like construct is opened, the indent increases by two spaces. When the block ends, the indent returns to the previous indent level. The indent level applies to both code and comments throughout the block. (See the example in Section 4.1.2, Nonempty blocks: K & R Style.)

  2. All the Wechaty projects (TypeScript) are following the +2 spaces block indentation style.

However, I saw currently we have an indentation set for +4 spaces, which was introduced from PR wechaty/java-wechaty-bak#3:

https://github.com/wechaty/java-wechaty/blob/645486c40642547c82295b66672c5624b5c53397/.editorconfig#L7

So I open this issue for the future discussion about the linting styles of this project.

[Bug and found the cause] Error: io.grpc.StatusRuntimeException: INTERNAL: protocol is empty due to wrong param sequence in Filebox contruction

Scenario and simulation steps:
Trying to receive an image and send to another contact:

Code
` Contact from = message.from();
Room room = message.room();

    switch (message.type()) {
        case Image:
            if (room != null) {
                room.say(message.toImage().artwork());
            } else {
                Image image = message.toImage();
                logger.info("Image String" + image.toString());
                FileBox fileBox = image.artwork();
                logger.info("FileBox name:" + fileBox.getName());
                logger.info("FileBox url:" + fileBox.getRemoteUrl());
                logger.info("FileBox json:" + fileBox.toJsonString());
                from.say(fileBox);
            }

}`

Error in the log:

Caused by: io.grpc.StatusRuntimeException: INTERNAL: protocol is empty
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.messageSendFile(PuppetGrpc.java:2940)
at io.github.wechaty.grpc.GrpcPuppet$messageSendFile$1.get(GrpcPuppet.kt:593)
at io.github.wechaty.grpc.GrpcPuppet$messageSendFile$1.get(GrpcPuppet.kt:29)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

The output from above code is below:

21:05:15.245 [pool-2-thread-2]INFO io.github.charles.model.SingleWechaty-[177] - FileBox name:http://siyouyunsy-1253559996.cos.ap-guangzhou.myqcloud.com/msg/0FAPG/20200924/3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDBi7d3I4UK7iDXkAhQyQsDMNGxY2KmlCY%26q-sign-time%3D1600944110%3B1687257710%26q-key-time%3D1600944110%3B1687257710%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D72784a91be44376ac57b6e8aa41137a00a9b9cd5
21:05:15.245 [pool-2-thread-2]INFO io.github.charles.model.SingleWechaty-[178] - FileBox url:3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png
21:05:15.462 [pool-2-thread-2]INFO io.github.charles.model.SingleWechaty-[179] - FileBox json:{**"remoteUrl":"3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png","name":"http://siyouyunsy-1253559996.cos.ap-guangzhou.myqcloud.com/msg/0FAPG/20200924/3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDBi7d3I4UK7iDXkAhQyQsDMNGxY2KmlCY%26q-sign-time%3D1600944110%3B1687257710%26q-key-time%3D1600944110%3B1687257710%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D72784a91be44376ac57b6e8aa41137a00a9b9cd5"**,"boxType":2}
21:05:15.463 [pool-2-thread-2]DEBUG io.github.wechaty.grpc.GrpcPuppet-[584] - json is {"remoteUrl":"3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png","name":"http://siyouyunsy-1253559996.cos.ap-guangzhou.myqcloud.com/msg/0FAPG/20200924/3556451347864015849_wxid_37gn4v1xgwvf22_1600944110389_.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDBi7d3I4UK7iDXkAhQyQsDMNGxY2KmlCY%26q-sign-time%3D1600944110%3B1687257710%26q-key-time%3D1600944110%3B1687257710%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D72784a91be44376ac57b6e8aa41137a00a9b9cd5","boxType":2}
21:05:15.463 [pool-2-thread-2]DEBUG io.github.wechaty.grpc.GrpcPuppet-[585] - json size is 484

The cause is that the name and value of the filebox.fromUrl() are setup in wrong sequence. so the puppet cannot locate the http protocal from URL value.

Message signature is
fromUrl(url: String, name: String?, headers: OutgoingHttpHeaders? = null)
and the caller is calling in a wrong way:

fileBox = fromUrl(
                        jsonNode.findValue("name").asText(),
                        jsonNode.findValue("remoteUrl").asText()
                    )

The file and line number causes the bug:
FileBox.kt

203
FileBoxType.Url.code -> {
fileBox = fromUrl(
jsonNode.findValue("name").asText(),
jsonNode.findValue("remoteUrl").asText()
)
}

242
@JvmStatic
fun fromUrl(url: String, name: String?, headers: OutgoingHttpHeaders? = null): FileBox {

[Feature] After changed from PadPlus to Donut token, failed to send image due to Error NotImplementedError. will raise a PR soon

Symptom:
After change from PadPlus token to Donut, the working function of sending image is not working anymore.

Cause:
NotImplementedError in
class java-wechaty/wechaty-puppet/src/main/kotlin/io/github/wechaty/filebox/FileBox.kt
function toByte()

Root Cause:
In PadPlus, the filebox is generated as type URL , and In Donut puppet, the filebox is generated as Base64. and In toByte function, Base64 type is not supported and end in default else block, { TODO () }

Propose Solution:
to add support of FileBoxType.Base64 in toByte()

Can't get the number of an unknown enum value

token是申请的15天的token. 企业微信版本. 扫码成功后报错. 求教各位大神我该如何处理该问题呢? 我该如何修复呢?

代码:

class Bot{
    public static void main(String args[]){
        final String token = System.getenv("WECHATY_PUPPET_HOSTIE_TOKEN");
        Wechaty bot = Wechaty.instance(token)
                .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);
    }
}

使用版本:

<dependency>
    <groupId>io.github.wechaty</groupId>
    <artifactId>wechaty</artifactId>
    <version>0.1.5-SNAPSHOT</version>
</dependency>

运行出现:

Can't get the number of an unknown enum value.

完整日志:

Exception in thread "pool-10-thread-7" java.lang.Error: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
	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.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
	at io.github.wechaty.Puppet.contactPayload(Puppet.kt:517)
	at io.github.wechaty.user.Contact.ready(Contact.kt:84)
	at io.github.wechaty.user.Contact.ready$default(Contact.kt:76)
	at io.github.wechaty.Wechaty$initPuppetEventBridge$$inlined$forEach$lambda$5.handler(Wechaty.kt:260)
	at io.github.wechaty.Puppet$on$10.handler(Puppet.kt:241)
	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.lang.IllegalArgumentException: Can't get the number of an unknown enum value.
	at io.github.wechaty.grpc.puppet.Contact$ContactType.getNumber(Contact.java:170)
	at io.github.wechaty.grpc.GrpcPuppet$contactRawPayload$1.get(GrpcPuppet.kt:410)
	at io.github.wechaty.grpc.GrpcPuppet$contactRawPayload$1.get(GrpcPuppet.kt:29)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1604)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596)
	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:172)

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.