Closed DaruinHerrera closed 2 years ago
Update to the latest version
✓ Version: 4.31.8 undefined ✓ No session data file found for session : session ✓ Page loaded ┌─────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ (index) │ Values │ ├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ WA_VERSION │ '2.2206.9' │ │ PAGE_UA │ 'WhatsApp/2.2147.16 Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36' │ │ WA_AUTOMATE_VERSION │ '4.31.8 UPDATE AVAILABLE: 4.31.13' │ │ BROWSER_VERSION │ 'HeadlessChrome/99.0.4844.0' │ │ OS │ 'Windows 10' │ │ START_TS │ 1646691147722 │
The latest version is 4.31.13, you are using 4.31.8
to update:
> npm i @open-wa/wa-automate@latest
If it still doesn't work after updating please let me know
Are you using the latest version of the library?
What type of session are you experiencing this issue on?
Legacy (Normal)
What type of host account are you experiencing this issue on?
Personal account (normal)
Mode
My own code
Current Behavior
When I try to use the multisession from an api, I manage to scan the first one and create the first session for a device, when I try to connect the second device the console stays in Launch inject: 150ms
Expected Behavior
I expected another qr to be generated to link another whatsapp line
Steps To Reproduce
function qrs(req, res) {
const { sessionId } = req.body;
const clientSessionRegistry = {};
async function start(client){ //save for later clientSessionRegistry[client.getSessionId()] = client;
}
create({sessionId:sessionId}).then(client => start(client));
ev.on('qr.**', async (qrcode,sessionId) => { //base64 encoded qr code image const imageBuffer = Buffer.from(qrcode.replace('data:image/png;base64,',''), 'base64'); fs.writeFileSync(
qr_code${sessionId?'_'+sessionId:''}.png
, imageBuffer); });return res.status(200).send({ message:'conectado' });
}
create() code
DEBUG INFO
Environment
Screenshots/Logs
`function qrs(req, res) {
const { sessionId } = req.body;
const clientSessionRegistry = {};
async function start(client){ //save for later clientSessionRegistry[client.getSessionId()] = client;
}
create({sessionId:sessionId}).then(client => start(client));
ev.on('qr.**', async (qrcode,sessionId) => { //base64 encoded qr code image const imageBuffer = Buffer.from(qrcode.replace('data:image/png;base64,',''), 'base64'); fs.writeFileSync(
qr_code${sessionId?'_'+sessionId:''}.png
, imageBuffer); });return res.status(200).send({ message:'conectado' });
/client.onMessage(async message => { if (message.body === 'Hi') { await client.sendText(message.from, '👋 Hello!'); } });/ }`
Anything else?
https://ibb.co/N1WYYx4