Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cobalt-0.0.7 Image & Document sending not working, using web pairing method #515

Open
BodduSatya opened this issue Sep 6, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@BodduSatya
Copy link

cobalt-0.0.7 Image & Document sending not working, using web pairing method

java.lang.IllegalStateException: Unsupported mobile osjava.util.concurrent.CompletionException: java.lang.IllegalStateException: Unsupported mobile os
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.IllegalStateException: Unsupported mobile os
at it.auties.whatsapp.model.companion.CompanionDevice.platformName(CompanionDevice.java:180)
at it.auties.whatsapp.model.companion.CompanionDevice.toUserAgent(CompanionDevice.java:127)
at it.auties.whatsapp.implementation.MessageHandler.attributeMediaMessage(MessageHandler.java:235)
at it.auties.whatsapp.implementation.MessageHandler.prepareOutgoingChatMessage(MessageHandler.java:139)
at it.auties.whatsapp.implementation.MessageHandler.encodeChatMessage(MessageHandler.java:109)
at it.auties.whatsapp.implementation.MessageHandler.encode(MessageHandler.java:103)
at it.auties.whatsapp.implementation.SocketHandler.sendMessage(SocketHandler.java:487)
at it.auties.whatsapp.api.Whatsapp.lambda$sendMessage$20(Whatsapp.java:820)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
... 6 more

2024-09-06 06:28:58 [ForkJoinPool.commonPool-worker-6] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:29:18 [ForkJoinPool.commonPool-worker-4] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:29:38 [ForkJoinPool.commonPool-worker-8] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:29:58 [ForkJoinPool.commonPool-worker-2] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:30:18 [ForkJoinPool.commonPool-worker-7] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:30:38 [ForkJoinPool.commonPool-worker-9] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:30:58 [ForkJoinPool.commonPool-worker-10] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:31:18 [ForkJoinPool.commonPool-worker-10] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:31:38 [ForkJoinPool.commonPool-worker-8] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file
2024-09-06 06:31:58 [ForkJoinPool.commonPool-worker-7] ERROR Serializer - java.util.concurrent.CompletionException: java.io.UncheckedIOException: Cannot write file

@Pachuchi420
Copy link

Pachuchi420 commented Sep 6, 2024

This is also the case for me, I was waiting for version 0.0.7 to get image uploads going but alas it doesn't work. Granted I don't get any error messages but nothing really happens. Text messages work fine, but other than that its still broken for me...

Here's a quick demo to show what I mean (link for better view):

Attached is the project that I'm using. On version 0.0.6 I would get a 415 HTTP error but now this is not even displaying anything?
whatsappTest.zip

@Pachuchi420
Copy link

Yeah after further testing, I found that I get the same error as Boddu:

java.util.concurrent.CompletionException: java.lang.IllegalStateException: Unsupported mobile os at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) Caused by: java.lang.IllegalStateException: Unsupported mobile os at [email protected]/it.auties.whatsapp.model.companion.CompanionDevice.platformName(CompanionDevice.java:180) at [email protected]/it.auties.whatsapp.model.companion.CompanionDevice.toUserAgent(CompanionDevice.java:127) at [email protected]/it.auties.whatsapp.implementation.MessageHandler.attributeMediaMessage(MessageHandler.java:235) at [email protected]/it.auties.whatsapp.implementation.MessageHandler.prepareOutgoingChatMessage(MessageHandler.java:139) at [email protected]/it.auties.whatsapp.implementation.MessageHandler.encodeChatMessage(MessageHandler.java:109) at [email protected]/it.auties.whatsapp.implementation.MessageHandler.encode(MessageHandler.java:103) at [email protected]/it.auties.whatsapp.implementation.SocketHandler.sendMessage(SocketHandler.java:487) at [email protected]/it.auties.whatsapp.api.Whatsapp.lambda$sendMessage$20(Whatsapp.java:820) at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ... 6 more

There's some sort of lack of handling for the web client I suppose? I tried looking into it but honestly I'm clueless as to how to fix it. I guess there's something missing within CompanionDevice.java? I tried looking into it and found two methods that might need some sort of extra handling, especially the web case:

  • deviceName()
  • platformName()

But again I'm not too sure. I tried to find a fix but without further understanding of the whole code base I can't do much. The code is really well put together tho, the java docs are great, but again I'm kind of new at this so it's out of my pay grade lol.

Attached are my project files.

As well as a quick nice video demonstrating the error again:

Hopefully we can figure something out!

@Auties00
Copy link
Owner

will be fixed in 0.0.8

@Auties00 Auties00 added the bug Something isn't working label Sep 14, 2024
@piLovr
Copy link

piLovr commented Oct 5, 2024

Same error here, I was trying to send a StickerMessage

@pcvarma-sayukth
Copy link

I too get the same error with v0.0.7, WEB mode and trying to send Image and PDF files

Caused by: java.lang.IllegalStateException: Unsupported mobile os
at it.auties.whatsapp.model.companion.CompanionDevice.platformName(CompanionDevice.java:180)
at it.auties.whatsapp.model.companion.CompanionDevice.toUserAgent(CompanionDevice.java:127)
at it.auties.whatsapp.implementation.MessageHandler.attributeMediaMessage(MessageHandler.java:235)
at it.auties.whatsapp.implementation.MessageHandler.prepareOutgoingChatMessage(MessageHandler.java:139)
at it.auties.whatsapp.implementation.MessageHandler.encodeChatMessage(MessageHandler.java:109)
at it.auties.whatsapp.implementation.MessageHandler.encode(MessageHandler.java:103)
at it.auties.whatsapp.implementation.SocketHandler.sendMessage(SocketHandler.java:487)
at it.auties.whatsapp.api.Whatsapp.lambda$sendMessage$20(Whatsapp.java:820)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1194)
... 5 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants