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