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.9 Cannot decrypt data #555

Open
guilherme-gmonteiro opened this issue Mar 2, 2025 · 0 comments
Open

Cobalt:0.0.9 Cannot decrypt data #555

guilherme-gmonteiro opened this issue Mar 2, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@guilherme-gmonteiro
Copy link

Hello, i'm trying to create a new application using cobalt just created a rest endpoint to test the code provided on the example, that its exactly like this:

    @GetMapping("getqr")
    private Boolean getQRCode(){
        Whatsapp.webBuilder() // Use the Web api
                .newConnection() // Deserialize the last connection, or create a new one if it doesn't exist
                .unregistered(QrHandler.toTerminal()) // Print the QR to the terminal
                .addLoggedInListener(api -> System.out.printf("Connected: %s%n", api.store().privacySettings())) // Print a message when connected
                .addDisconnectedListener(reason -> System.out.printf("Disconnected: %s%n", reason)) // Print a message when disconnected
                .addNewChatMessageListener(message -> System.out.printf("New message: %s%n", message.toJson())) // Print a message when a new chat message arrives
                .connect() // Connect to Whatsapp asynchronously
                .join() // Await the result
                .awaitDisconnection(); // Wait
        return true;
    }

after i read the QR Code it get's me the following error:

java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "it.auties.whatsapp.model.newsletter.NewsletterMetadata.invite()" because the return value of "it.auties.whatsapp.model.newsletter.Newsletter.metadata()" is null
	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$UniAccept.tryFire(CompletableFuture.java:722)
	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.NullPointerException: Cannot invoke "it.auties.whatsapp.model.newsletter.NewsletterMetadata.invite()" because the return value of "it.auties.whatsapp.model.newsletter.Newsletter.metadata()" is null
	at it.auties.whatsapp.implementation.SocketHandler.queryNewsletterMessages(SocketHandler.java:632)
	at it.auties.whatsapp.implementation.StreamHandler.onNewsletters(StreamHandler.java:1187)
	at it.auties.whatsapp.implementation.StreamHandler.parseNewsletters(StreamHandler.java:1176)
	at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
	... 6 more

anyone can help me with that?

@Auties00 Auties00 added the bug Something isn't working label Mar 3, 2025
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

2 participants