wechaty / grpc

gRPC Service & Protocol Buffers for Wechaty Puppet
https://wechaty.github.io/grpc/
Apache License 2.0
26 stars 22 forks source link

when download file,report :FileBox.toJSON() can only work on limited FileBoxType(s) #197

Open SolomonFly opened 1 year ago

SolomonFly commented 1 year ago

when i use grpc(java) [grpcClient!!.messageFile(request)] to download file,report a error:

Exception in thread "pool-35-thread-11" java.lang.Error: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: FileBox.toJSON() can only work on limited FileBoxType(s). See: https://github.com/huan/file-box/issues/25 2023-05-21 21:05:01.409 : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1155) 2023-05-21 21:05:01.410 : at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 2023-05-21 21:05:01.413 : at java.lang.Thread.run(Thread.java:750) 2023-05-21 21:05:01.414 : Caused by: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: INTERNAL: FileBox.toJSON() can only work on limited FileBoxType(s). See: https://github.com/huan/file-box/issues/25 2023-05-21 21:05:01.414 : at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) 2023-05-21 21:05:01.414 : at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) 2023-05-21 21:05:01.414 : at io.github.wechaty.user.Message.toFileBox(Message.kt:343) 2023-05-21 21:05:01.415 : at io.github.wechaty.user.Message.file(Message.kt:290) 2023-05-21 21:05:01.415 : at biz.module.tm.customer.service.WechatyListener.handler(WechatyListener.java:40) 2023-05-21 21:05:01.415 : at io.github.wechaty.Wechaty$on$3.handler(Wechaty.kt:160) 2023-05-21 21:05:01.415 : at io.github.wechaty.eventEmitter.EventEmitter$emit$$inlined$forEach$lambda$1.run(EventEmitter.kt:49) 2023-05-21 21:05:01.416 : at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 2023-05-21 21:05:01.416 : ... 2 more 2023-05-21 21:05:01.428 : Caused by: io.grpc.StatusRuntimeException: INTERNAL: FileBox.toJSON() can only work on limited FileBoxType(s). See: https://github.com/huan/file-box/issues/25 2023-05-21 21:05:01.435 : at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:244) 2023-05-21 21:05:01.436 : at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:225) 2023-05-21 21:05:01.436 : at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:142) 2023-05-21 21:05:01.436 : at io.github.wechaty.grpc.PuppetGrpc$PuppetBlockingStub.messageFile(PuppetGrpc.java:2905) 2023-05-21 21:05:01.437 : at io.github.wechaty.grpc.GrpcPuppet$messageFile$1.get(GrpcPuppet.kt:514) 2023-05-21 21:05:01.438 : at io.github.wechaty.grpc.GrpcPuppet$messageFile$1.get(GrpcPuppet.kt:29) 2023-05-21 21:05:01.438 : at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) 2023-05-21 21:05:01.438 : at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) 2023-05-21 21:05:01.438 : at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 2023-05-21 21:05:01.438 : at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1067) 2023-05-21 21:05:01.441 : at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1703) 2023-05-21 21:05:01.441 : at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:172)

Environment: wechaty:0.78 java:

io.github.wechaty grpc 0.16.1

TypeScripts can receive files! and i search for the difference between the two of them and i find it: java: 1684674870326

TypeScripts:

1684674883442

Is this causing the problem? fix it please