[Bug]: Error 500 when call list contacts
Pre-flight
- [x] I searched existing issues and this isn't a duplicate
- [x] I'm on the latest released version (or noted my version below)
OpenWA version
v0.23.7
Deployment
Docker Compose
Database
PostgreSQL
WhatsApp engine
whatsapp-web.js
What happened?
Hello, Although you previously fixed the issue with retrieving contacts, a problem has appeared in the current version as well as the previous one which you can see in the event log:
Steps to reproduce
n/a
Expected behavior
No response
Relevant logs
[Nest] 7 - 09/25/2026, 8:54:28 PM ERROR [ExceptionsHandler] Error: getAlternateUserWid - Invalid get call using deviceWid
at window.WWebJS.getContactModel (evaluate at Binding.<anonymous> (/app/node_modules/whatsapp-web.js/src/Client.js:330:40), <anonymous>:1065:17)
at readLeanContacts (evaluate at WwebjsContacts.getContacts (/app/dist/engine/adapters/wwebjs-contacts.js:56:33), <anonymous>:5:27)
at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)
at async ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)
at async IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)
at async CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:362:20)
at async CdpPage.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:830:20)
at async WwebjsContacts.getContacts (/app/dist/engine/adapters/wwebjs-contacts.js:56:21)
at T (https://static.whatsapp.net/rsrc.php/v4i5Se4/y2/l/ar_AR-j/-xExU3fv1x-H1GqxrpuEjgFF4EPMmEylsMcobKcyBn-6o5H867o5DQG11mga38g9yElVUU3z1DTN30Dr5E4kn-fZ3SzglqxtByDDloYasBEsdIEeERygdpyb4L2BjPoPIjKSgoIvDcIITDUhKFyYHJMOrq6IOd11UMmS7Y3AgoYWmFOM7HIRVJopaqjimXTyCTiBBusogLLEYcgQ55lB8TH4Wm19A6jdoFKbwkbbu0M8pG9dHchlKTG3NtFvB9iZIl2ksQoyTfbLCHDWbK7_Wcy64cYh-moeADd02q3v9N9VNtzCQtRDhRgxME01XdE_5RfQZEnJBV.js:171:3136)
at s (https://static.whatsapp.net/rsrc.php/v4/yh/r/gromeMe_cpc.js:84:179)
Environment / additional context
No response
Thanks for the stack trace, @onepay-ye. This is a different cause from #1476. One entry in WhatsApp Web's contact store makes whatsapp-web.js throw inside getContactModel (getAlternateUserWid - Invalid get call using deviceWid), and OpenWA let that single entry fail the whole list with a 500.
#1728 isolates each entry: an entry WhatsApp Web cannot read is skipped and counted in one warning, and the rest of the list is returned. The Baileys engine reads contacts from its own store and is not affected.