rohitsangwan01 / whatsapp_bot_flutter

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

Error Bad state: No element #54

Closed ferdead closed 7 months ago

ferdead commented 8 months ago

my code:

WhatsappClient client = await WhatsappBotFlutter.connect(
      sessionDirectory: './chrome/cache',
      chromiumDownloadDirectory: './chrome/local-chromium',
      headless: false,
      onConnectionEvent: (ConnectionEvent event) {
        print(event.toString());
      },
      onQrCode: (String qr, Uint8List? imageBytes) {
        final qrText = WhatsappBotUtils.convertStringToQrCode(qr);
        print(qrText);
      },
      onBrowserCreated: (browser) {
        pid = browser.process?.pid ?? 0;
        print('pid=$pid');
        file.writeAsStringSync(pid.toString());
      },
    );

I got the error: Exception has occurred. StateError (Bad state: No element)

Google chrome is opened, but i got the error before that the whatsapp web shown

rohitsangwan01 commented 7 months ago

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