whatsapp-web.js: Unable to send message after session restore
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I am trying to restore session after the server restart. No exception comes while startup and restoration. I could see puppeteer using the right file where session details are saved but while sending message on old session it fails.
Evaluation failed: TypeError: chat.isEphemeralSettingOn is not a function at Object.window.WWebJS.sendMessage (__puppeteer_evaluation_script__:157:37)
Expected behavior
Message should go as usual.
Steps to Reproduce the Bug or Issue
- Run the whatsapp-web using LocalAuth
- Register a WhatsApp number by scanning QR code
- After registration is successful, test sending a message
- Kill the node server using Ctrl + C
- Start the server again
- Load the clients by token
- Send message for old client
- You get the error
Relevant Code
const client = new Client({ puppeteer: { handleSIGINT: false, headless: true, args: [‘–no-sandbox’, ‘–disable-setuid-sandbox’] }, // Make headless true or remove to run browser in background authStrategy: new LocalAuth({ clientId: token }), });
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
No, I am not using Multi Device
Environment
- Ubuntu 22.04 LTS
- whatsapp-web.js 1.16.7
- node v14.17.5
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17
Clearing session or clearing pupeteer user-data and login again fixed the problem
I also experience the same error.