[BUG] Timeout when trying to get catalog/collections.
Author: aleancarCreated Jul 18, 2026Updated Sep 10, 2026
Labelsbug
Describe the bug
Timeout when trying to get catalog of a business account. Even when using your own JID or trying to get a catalog from another business account. The method sock.getCatalog() returns a promise normally that is timed out 1 min later, with an empty response.
To Reproduce Steps to reproduce the behavior:
- Create a connection normally (with qrcode or loaded state).
- Wait for connection update to open.
- Call
sock.getCatalog({ jid: businessJid)})that returns a promise. - The promise is resolved 1min later, with a log message
timed out waiting for messageand returns{"products": []}.
import makeWASocket, { Browsers, DisconnectReason, useMultiFileAuthState, jidEncode, jidNormalizedUser } from 'baileys';
import pino from 'pino';
import QRCode from 'qrcode';
let sock: any;
let businessPhoneNumber = "5511999999999"; //Example number, country code is 55
let businessJid = jidEncode(businessPhoneNumber, "s.whatsapp.net");
const logger = pino({
name: 'index',
level: 'info',
transport: {
target: 'pino-pretty',
options: {
singleLine: true,
ignore: "pid,hostname"
}
},
});
async function connectToWhatsapp() {
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')
sock = makeWASocket({
auth: state,
browser: Browsers.ubuntu('Desktop'),
syncFullHistory: false,
markOnlineOnConnect: false,
logger: logger.child({ name: 'baileys' })
});
sock.ev.on('creds.update', () => {
saveCreds();
logger.info('Credentials saved!');
});
sock.ev.on('connection.update', async (update: any) => {
const { connection, lastDisconnect, qr } = update
if(qr) {
logger.info('QrCode:\n' + await QRCode.toString(qr, {type:'terminal'}))
}
if(connection === 'open') {
logger.info('Connected!');
onConnected();
}
if(connection === 'close') {
logger.info('Disconnected!');
const shouldReconnect = lastDisconnect?.error?.output?.statusCode !== DisconnectReason.loggedOut
if(shouldReconnect) {
logger.info('Reconnecting...');
connectToWhatsapp();
}
}
});
}
async function onConnected() {
try {
sock.getBusinessProfile(businessJid)
.then((result: any) => logger.info(result, 'business info'))
.catch((err: any) => logger.error(err, 'Business info'));
sock.getCollections(businessJid, 10)
.then((result: any) => logger.info(result, 'business collections'))
.catch((err: any) => logger.error(err, 'Error in business collections'));
sock.getCatalog({jid: businessJid, limit: 10})
.then((result: any) => logger.info(result, 'business catalog'))
.catch((err: any) => logger.error(err, 'Error in business catalog'));
sock.productCreate({
originCountryCode: 'BR',
name: 'Product #1',
currency: 'BRL',
description: '',
price: 0,
images: [
{
url: 'https://example.com/image.png'
}
]
})
.then((result: any) => logger.info(result, 'business product create'))
.catch((err: any) => logger.error(err, 'Error in Business product create'));
} catch(err) {
logger.error(err, 'An error occurred');
}
}
async function onExit() {
try {
if (sock) {
await sock.end();
console.log('Socket closed');
}
process.exit(0);
} catch (err) {
console.error(err);
process.exit(1);
}
}
process.on('SIGINT', onExit);
process.on('SIGTERM', onExit);
connectToWhatsapp();Expected behavior
Environment (please complete the following information):
- Running
[email protected]and[email protected]onWindows. - Is this on a server?
- No, running locally.
- What do your
connectOptionslook like?- This?
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys') sock = makeWASocket({ auth: state, browser: Browsers.ubuntu('Desktop'), syncFullHistory: false, markOnlineOnConnect: false, logger: logger.child({ name: 'baileys' }) }); - Do you have multiple clients on the same IP?
- No
- Are you using a proxy?
- No
Additional context It seens that everything related doesn't work? Examples:
sock.getCollections(businessJid, 10)
.then((result: any) => logger.info(result, 'business collections'))
.catch((err: any) => logger.error(err, 'Error in business collections'));
sock.getCatalog({jid: businessJid, limit: 10})
.then((result: any) => logger.info(result, 'business catalog'))
.catch((err: any) => logger.error(err, 'Error in business catalog'));
sock.productCreate({
originCountryCode: 'BR',
name: 'Product #1',
currency: 'BRL',
description: '',
price: 0,
images: [
{
url: 'https://example.com/image.png'
}
]
})
.then((result: any) => logger.info(result, 'business product create'))
.catch((err: any) => logger.error(err, 'Error in Business product create'));Source: WhiskeySockets/Baileys