Closed BodduSatya closed 1 month ago
i am using
whatsappweb4j 3.5.1
yeah but, why are u using whatsappweb4j? whatsappweb4j changed to Cobalt
can you show your dependencies?
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
<relativePath/>
</parent>
<groupId>org.satya</groupId>
<artifactId>whatsapp</artifactId>
<version>0.0.5-SNAPSHOT</version>
<name>whatsapp</name>
<packaging>jar</packaging>
<description>whatsapp</description>
<properties>
<java.version>21</java.version>
<mapstruct.version>1.4.2.Final</mapstruct.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>21</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.auties00/whatsappweb4j -->
<dependency>
<groupId>com.github.auties00</groupId>
<artifactId>whatsappweb4j</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>com.github.auties00</groupId>
<artifactId>cobalt</artifactId>
<version>0.0.5</version>
</dependency>
<!-- AGREGO LAS LIBRERIAS DE JACKSON MANUALMENTE PORQUE SINO SPRINGBOOT ME PONE UNA VERSION MAS NUEVA Y ME DA ERROR-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-smile</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.17.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- read xls -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.3.0</version> <!-- or the latest version -->
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.3.0</version> <!-- or the latest version -->
</dependency>
<!-- json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.3</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven_central</id>
<name>Maven Central</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
working fine with cobalt alone. thank you @Darker935
Frequently getting following Exception:
04:48:05.413 [ForkJoinPool.commonPool-worker-9] ERROR ErrorHandler - Socket failure at MESSAGE java.util.concurrent.CompletionException: java.lang.RuntimeException: Node[description=iq, attributes={xmlns=usync, to=s.whatsapp.net, id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, type=get}, content=[Node[description=usync, attributes={mode=query, last=true, context=message, index=0, sid=xxxxxxxx-xxxx-xxxxxxxxx-xxxxxxxxxxxx}, content=[Node[description=query, content=[Node[description=devices, attributes={version=2}]]], Node[description=list, content=[Node[description=user, attributes={jid=xxxxxxxxxxxx@s.whatsapp.net}], Node[description=user, attributes={jid=xxxxxxxxxxxx@s.whatsapp.net}]]]]]]] node timed out at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:332) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:347) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:636) at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2194) at it.auties.whatsapp.model.request.Request.cancelTimedFuture(Request.java:58) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423) 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.RuntimeException: Node[description=iq, attributes={xmlns=usync, to=s.whatsapp.net, id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, type=get}, content=[Node[description=usync, attributes={mode=query, last=true, context=message, index=0, sid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}, content=[Node[description=query, content=[Node[description=devices, attributes={version=2}]]], Node[description=list, content=[Node[description=user, attributes={jid=xxxxxxxxxxxx@s.whatsapp.net}], Node[description=user, attributes={jid=xxxxxxxxxxxx@s.whatsapp.net}]]]]]]] node timed out at it.auties.whatsapp.socket.SocketHandler.send(SocketHandler.java:437) at it.auties.whatsapp.socket.SocketHandler.send(SocketHandler.java:430) at it.auties.whatsapp.socket.SocketHandler.sendQuery(SocketHandler.java:426) at it.auties.whatsapp.socket.SocketHandler.sendQuery(SocketHandler.java:406) at it.auties.whatsapp.socket.MessageHandler.queryDevices(MessageHandler.java:301) at it.auties.whatsapp.socket.MessageHandler.getDevices(MessageHandler.java:289) at it.auties.whatsapp.socket.MessageHandler.encodeConversation(MessageHandler.java:159) at it.auties.whatsapp.socket.MessageHandler.encodeMessageNode(MessageHandler.java:95) at it.auties.whatsapp.socket.MessageHandler.lambda$encode$2(MessageHandler.java:85) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) 04:48:05.451 [ForkJoinPool.commonPool-worker-9] WARN ErrorHandler - Ignored failure