#Execution context was destroyed

5 messages · Page 1 of 1 (latest)

peak lava
#

Hi all,
I am getting this error:
node main.js
/path/to/project/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:284
throw new Error('Execution context was destroyed, most likely because of a navigation.');
^

Error: Execution context was destroyed, most likely because of a navigation.
at rewriteError (/path/to/project/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:284:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext._ExecutionContext_evaluate (/path/to/project/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:227:56)
at async ExecutionContext.evaluate (/path/to/project/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
at async Client.getWWebVersion (/path/to/project/node_modules/whatsapp-web.js/src/Client.js:811:16)
at async Client.inject (/path/to/project/node_modules/whatsapp-web.js/src/Client.js:98:25)
at async /path/to/project/node_modules/whatsapp-web.js/src/Client.js:339:13

There is a sporadic disconnect I cannot pinpoint why. So I turned on LocalAuth, and I am restarting the bot via .sh script.

The thing is, bot needs some time to restart, and if new messages come during the restart window, this error will occur. Otherwise, bot start and functions normal.

Any hints/solutions?
Dj

dark pulsar
#

Delete .wwebjs_cache and Session

calm oak
#

hi, have been seeing the same problem. Will deleting .wwebjs_cache remove all user's sessions so they need to load the html page again, or what happens in a multi-user case @dark pulsar ?

dark pulsar
#

delete .wwebjs_cache not delete the session data, but delete the Session folder can delete the session.

calm oak
#

ok thanks for comment. yes I am aware that deleting Sessions-folder will then erase the login session.

  • these temp-named folders I am not sure of when they are used, because they don't exist for all users: wwebjs_temp_session_xxxxx. Do you know @dark pulsar when do those pop up? I have also seen some errors related to "temp.." in the error logs.