Closed rebeccachipps closed 7 months ago
I followed your code and tested it with different country codes, but I keep getting the exception 'Exception in thread "main" java.util.concurrent.CompletionException: java.net.ConnectException.' What could be the possible reasons for this?
Whatsapp.mobileBuilder() .newConnection(phoneNumber) .device(CompanionDevice.android()) .unregistered() .verificationCodeMethod(VerificationCodeMethod.SMS) .verificationCodeSupplier(() -> { System.out.println("Enter OTP : "); return new Scanner(System.in).nextLine().trim(); }) .register(phoneNumber) .join();
i use this code to register on WhatsApp, but after a long time, no error or event occurs. also, when I put the device on Android (
.device(CompanionDevice.android())
), no error or event occurs even after a long time. but when I set the device to iOS (.device(CompanionDevice.ios())
) I encounter the following error every time I requesti tested more than 20 numbers and also each number with a different IP but still the same error occurs how can I fix this problem?