rohitsangwan01 / whatsapp_bot_flutter

Whatsapp bot for flutter desktop
MIT License
41 stars 27 forks source link

HandshakeException error when trying to connect #45

Closed elobeparfait closed 7 months ago

elobeparfait commented 1 year ago

I get the following error when try to initialize WhatsappClient on windows: flutter: HandshakeException: Handshake error in client (OS Error: SSLV3_ALERT_HANDSHAKE_FAILURE(../../third_party/boringssl/src/ssl/tls_record.cc:594) HANDSHAKE_FAILURE_ON_CLIENT_HELLO(../../third_party/boringssl/src/ssl/handshake.cc:644))

rohitsangwan01 commented 1 year ago

@elobeparfait can you try to run puppeteer on your windows, seems like some issue in downloading chrome instance using puppeteer dart, or to verify is chrome is installed fine , try to run with headless = false parameter

elobeparfait commented 1 year ago

This is what i get when running puppetee: `[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: HandshakeException: Handshake error in client (OS Error: SSLV3_ALERT_HANDSHAKE_FAILURE(../../third_party/boringssl/src/ssl/tls_record.cc:594) HANDSHAKE_FAILURE_ON_CLIENT_HELLO(../../third_party/boringssl/src/ssl/handshake.cc:644))

0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:99:46)

1 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:142:25)

2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:918:54)

3 _RawSecureSocket._closeHandler (dart:io/secure_socket.dart:911:15)

4 _RawSecureSocket._eventDispatcher (dart:io/secure_socket.dart:854:9)

5 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)

6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)

7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)

8 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)

9 _StreamController._add (dart:async/stream_controller.dart:650:7)

10 _StreamController.add (dart:async/stream_controller.dart:598:5)

11 new _RawSocket. (dart:io-patch/socket_patch.dart:1906:35)

12 _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1349:18)

13 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)

14 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)`

rohitsangwan01 commented 1 year ago

@elobeparfait seems like puppeteer error then You can look for similar issue on puppeteer repo, and if not found any similar, you can submit new one

elobeparfait commented 1 year ago

ok thanks let me do that now

elobeparfait commented 1 year ago

My probleme got solved, it was a network connection problem. But now chrome has been downloaded and i initialise it after opening whatsapp and loading qr code, it exits with error: the semaphore timeout period has expired

rohitsangwan01 commented 1 year ago

My probleme got solved, it was a network connection problem. But now chrome has been downloaded and i initialise it after opening whatsapp and loading qr code, it exits with error: the semaphore timeout period has expired

Have you scanned the qrCode properly ? Are you able to connect to whatsapp web manually ??

elobeparfait commented 1 year ago

when i connect with headless mode set to true, qrCode is not display just the error after some time of waiting and when headless set to false, browser opens and launches whatsapp, but when i scan the qrCode nothing happens, sfter the browser exits and the error comes on

rohitsangwan01 commented 1 year ago

when i connect with headless mode set to true, qrCode is not display just the error after some time of waiting and when headless set to false, browser opens and launches whatsapp, but when i scan the qrCode nothing happens, sfter the browser exits and the error comes on

if you are using any cache directory or session directory paramter for connection, please make sure to clean it, for now headless mode cache not working with nonHeadless and vice versa, Are you getting this issue in example app ?

elobeparfait commented 1 year ago

Video_23-08-04_10-10-02 This what happens when i press connect in the example app

rohitsangwan01 commented 1 year ago

@elobeparfait please try without headless mode to see whats going on in chrome, and where exactly you stuck

elobeparfait commented 1 year ago

Without headless mode, chrome opens whatsapp web and load qrCode, After scanning the code chrome exits with same error

rohitsangwan01 commented 7 months ago

Just released new Version: 2.0.4, please try with it, reopen if still getting issues