question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to send message after session restore

See original GitHub issue

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

  1. Run the whatsapp-web using LocalAuth
  2. Register a WhatsApp number by scanning QR code
  3. After registration is successful, test sending a message
  4. Kill the node server using Ctrl + C
  5. Start the server again
  6. Load the clients by token
  7. Send message for old client
  8. 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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:17

github_iconTop GitHub Comments

3reactions
crazytweekscommented, Oct 19, 2022

Clearing session or clearing pupeteer user-data and login again fixed the problem

3reactions
jonylimcommented, Oct 19, 2022

I also experience the same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Help! "Session Expired" message and I've lost an
I just spent nearly 2 hours constructing an email that I have to send this morning, and suddenly I got a pop up...
Read more >
How to Fix Session Has Expired Error on the Internet
If your Internet connection is unstable, periodically disconnecting and reconnecting, it can cause a website session to expire. When the ...
Read more >
how to fix the session expired email?? - Gmail Community
It is best to ensure recovery attempts are made from the most recent/usual location involving the setup the system considers familiar and hence, ......
Read more >
Resolving Session Time-Out Errors - Support Center
The Session Time-Out message is normally displayed after several hours have elapsed since your last interaction with the server. If this happens, you...
Read more >
Why is my session expiring immediately after I log in to ...
If you are encountering a message, "Your session has expired. Please relogin" and are prompted to log back in with your email address...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found