WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.1k stars 1.07k forks source link

[BUG] Messages Appear Empty in Chat Interface Despite Successful Send #832

Open lucasdoctype opened 1 month ago

lucasdoctype commented 1 month ago

Description

There is a recurring issue where messages appear as empty in the chat interface, despite having content. This problem seems to occur randomly and affects the usability of the service.

Steps to Reproduce

  1. Send a message using the Baileys WhatsApp API.
  2. Observe the message in the chat interface.
  3. Occasionally, the message appears empty even though it was sent successfully according to the logs.

Expected Behavior

Messages sent should consistently appear with their content in the chat interface.

Actual Behavior

Some messages appear as empty boxes in the chat interface, even though the send logs confirm the message content and successful delivery.

Screenshots

Evidence 1 Evidence 2

Additional Information

This issue has been noticed across multiple instances and seems to be intermittent. More details can be provided upon request.

Environment

lucasdoctype commented 1 month ago

const whatsappUpdate = await Whatsapp.findOne({ where: { id: whatsapp.id , idGraf: whatsapp.idGraf } });

    if (!whatsappUpdate) return;

    const { id, name, isMultidevice } = whatsappUpdate;
    const { isLatest, version } = await fetchLatestBaileysVersion();

    //logger.info(`using WA v${version.join(".")}, isLatest: ${isLatest}`);
    //logger.info(`isMultidevice: ${isMultidevice}`);
    //logger.info(`Starting session ${name}`);
    let retriesQrCode = 0;

    let wsocket: Session = null;
    const store = makeInMemoryStore({
      logger: loggerBaileys
    });

    const { state, saveCreds } = await useMultiFileAuthState(whatsapp);

    wsocket = makeWASocket({
      logger: loggerBaileys,
      printQRInTerminal: false,
      auth: state as AuthenticationState,
      version,
      browser: ["ChatMe", "Chrome", "10.15.7"],
      fireInitQueries: false,
      shouldSyncHistoryMessage: () => true,
      syncFullHistory: true,
      generateHighQualityLinkPreview: true,
      markOnlineOnConnect: false,
      msgRetryCounterCache,
      getMessage: async key => {
        if (store) {
          const msg = await store.loadMessage(key.remoteJid!, key.id!);
          return msg?.message || undefined;
        }
      }
    });

    This is my WaSocket config
dephea commented 3 weeks ago

I didn't experience literally empty message, but I face a lot of "Waiting for this message. This may take a while." during last month. Is there a possibility that if you switch the language on your device to English, the messages might appear differently?

roysG commented 1 week ago

Any update about that?

roysG commented 1 week ago

@dephea

PurpShell commented 4 days ago

more info

dephea commented 4 days ago

@roysG @PurpShell I don't have any updates. I still experience this issue. Could you describe your problem?