Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

[BUG] contacts.upsert not emitted after upgrading to v7.0.0-rc.5

Open alejandro-aurora opened this issue 2 months ago • 14 comments

Describe the bug After upgrading from v6.7.19 to v7.0.0-rc.5, changes to a contact’s display name on the phone no longer emit the contacts.upsert event. Rolling back to v6.7.19 (no other changes) restores the event.

To Reproduce Steps to reproduce the behavior:

  1. Create a new Baileys connection.
  2. Update a contact name on the mobile app
  3. Observe that contacts.upsert do not get fired

Expected behavior contacts.upsert with the updated contact record (same as 6.7.19 behavior).

Environment (please complete the following information): Baileys version: 7.0.0-rc.5 Using proxy: No

alejandro-aurora avatar Oct 10 '25 22:10 alejandro-aurora

1+

ecatugy avatar Oct 11 '25 02:10 ecatugy

Tested and working on the master branch. This was tested in a fresh session

Code used for testing in example.ts:

sock.ev.on('contacts.upsert', contacts => {
    console.log('Received contacts.upsert event:', contacts);
});

Resulting Log Output (Masked):

[
  {
    id: '[email protected]',
    name: 'Contact Name 1',
    lid: 'xxxxxxxxxxxxxxxx@lid',
    phoneNumber: undefined
  },
  {
    id: '[email protected]',
    name: 'Contact Name 2',
    lid: 'xxxxxxxxxxxxxxxx@lid',
    phoneNumber: undefined
  },
  {
    id: '[email protected]',
    name: 'Contact Name 3',
    lid: 'xxxxxxxxxxxxxxxx@lid',
    phoneNumber: undefined
  },
  ... 164 more items
]

jlucaso1 avatar Oct 14 '25 01:10 jlucaso1

Was you able to solve it? I'm facing the same issue :(

wilsinho8 avatar Oct 16 '25 14:10 wilsinho8

No, I just tried with the latest commit and it still not getting triggered

alejandro-aurora avatar Oct 16 '25 14:10 alejandro-aurora

1+

ecatugy avatar Oct 16 '25 14:10 ecatugy

+1

wilsinho8 avatar Oct 16 '25 18:10 wilsinho8

messages.upsert too, same problem

wilsinho8 avatar Oct 16 '25 18:10 wilsinho8

messages.upsert too, same problem

That one is working fine for me

alejandro-aurora avatar Oct 16 '25 18:10 alejandro-aurora

+1

didi6135 avatar Oct 17 '25 07:10 didi6135

1+

ecatugy avatar Oct 18 '25 19:10 ecatugy

+1

jeankassio avatar Oct 20 '25 05:10 jeankassio

@jlucaso1 this is what i see on the logs every time I test a contact name update.

[09:51:00.632] INFO (critical_unblock_low/744): failed to sync state from version
    error: "Error: failed to find key \"AAAAAImd\" to decode mutation\n    at getKey (C:\\Users\\alej\\source\\repos\\project\\node_modules\\@whiskeysockets\\baileys\\src\\Utils\\chat-utils.ts:260:10)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async decodeSyncdMutations (C:\\Users\\alej\\source\\repos\\project\\node_modules\\@whiskeysockets\\baileys\\src\\Utils\\chat-utils.ts:223:15)\n    at async decodeSyncdSnapshot (C:\\Users\\alej\\source\\repos\\project\\node_modules\\@whiskeysockets\\baileys\\src\\Utils\\chat-utils.ts:385:34)\n    at async <anonymous> (C:\\Users\\alej\\source\\repos\\project\\node_modules\\@whiskeysockets\\baileys\\src\\Socket\\chats.ts:525:50)\n    at async <anonymous> (C:\\Users\\alej\\source\\repos\\project\\node_modules\\@whiskeysockets\\baileys\\src\\Utils\\auth-utils.ts:292:21)"
[09:51:00.683] DEBUG (744): sent ack
    recv: {
      "tag": "notification",
      "attrs": {
        "from": "@s.whatsapp.net",
        "type": "server_sync",
        "id": "xxxxx",
        "t": "xxxxx"
      }
    }
    sent: {
      "id": "xxxxxxx",
      "to": "@s.whatsapp.net",
      "class": "notification",
      "type": "server_sync"
    }
[09:51:00.683] DEBUG (744): Flushing event buffer
    bufferCount: 1

alejandro-aurora avatar Oct 20 '25 15:10 alejandro-aurora

It' same with rc6 as well

supersyntx avatar Oct 28 '25 04:10 supersyntx

1+

Ruben-Rey avatar Nov 14 '25 15:11 Ruben-Rey

@jlucaso1 This is referring likely to contact updates rather than upserts and it is closely related to the app state failed to sync state from version error

purpshell avatar Nov 20 '25 14:11 purpshell