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.

Error when trying to logout

See original GitHub issue

Description

Venom throws an error while calling client.logout();

Environment

  • Venom version(s): 4.3.3
  • Browser: Chromium
  • OS: Windows 10
  • Node version: Node v18.0.0

Steps to Reproduce

Create a client, login, then call client.logout();

Log Output

...\project\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:286
        throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails));              ^

Error: Evaluation failed: TypeError: window.Store.Login.triggerCriticalSyncLogout is not a function
    at window.WAPI.window.WAPI.logout (<anonymous>:1:76909)
    at pptr://__puppeteer_evaluation_script__:1:13
    at ExecutionContext._ExecutionContext_evaluate (...\project\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:286:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (...\project\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:117:16)
    at async Whatsapp.logout (...\project\node_modules\venom-bot\dist\api\whatsapp.js:59:16)

Your Code

/// create client
this.client = await venom.create({
    "session": "session-main",
    "multidevice": true,
    "mkdirFolderToken": path.join(this.app.dir.data, "whatsapp"),
    "headless": this.app.config.HEADLESS_BROWSER,
    "logQR": false,
    "puppeteerOptions": {
        args: ["--no-sandbox"]
    },
    "disableWelcome": true,
});
/// logout
this.client.logout();

Additional context / Screenshot

none

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
orkestralcommented, Nov 19, 2022

resolve with version 4.3.4 afea4e4

0reactions
Pedro-Coimbracommented, Nov 21, 2022

I keep getting the same error even after the update

Read more comments on GitHub >

github_iconTop Results From Across the Web

Runtime Exception Error when trying to logout from firebase ...
This is the javascript code for the page where the user can see their profile and logout. The register and login works but...
Read more >
'Can't Log Out of Facebook' Issue: How To Fix - Nerds Chalk
How to fix 'Can't log out of Facebook' issue · Next, click Security and login in the sidebar on the left side. ·...
Read more >
I cannot sign out of my apple ID. can you assist?
When I try to sign out of my AppleID, I keep getting the following error message: "COULD NOT SIGN OUT - There was...
Read more >
Microsoft Teams errored and won't let me log out?
Microsoft Teams errored and won't let me log out? I am currently trying to log into my Teams account on my laptop, but...
Read more >
400 Bad Request Error when trying to logout - Questions
I'm getting 400 bad request error when trying to logout my app using the code on the documentation HttpContext.GetOwinContext().
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