instauto
instauto copied to clipboard
Bot not exited but continues to try
Hi, the bot is awesome and I run it using forever
but I noticed the bot doesn't exit when lost connection to Chromium. For example when macbook goes sleep.
and it constantly writing the same error:
Failed to unfollow, continuing with next Error: Protocol error (Page.navigate): Session closed. Most likely the page has been closed.
It should exit or try to restart chromium
Hi. Was the chromium window still responsive? or were you running headless?
Hi, sorry to hijack this but how do you run instauto continuously using forever? I'm trying to make this run like this (not to close after the long sleep at the end of the script) without using cron in mac os x, but didn't succeed (I'm a newbie so it's a lack of knowledge).
Try to use pm2. See the example in readme. pm2 will auto restart when it exits
Thank you, it's working! :)
This error happened to me, it was on headless on OSX on a MacBookPro.
To reproduce the issue, launch the script with node example.js and let it run with the lid open. After a few hours the terminal will show the error constantly.
I did not reproduce the issue on a Mac Mini after more than 12h running. Again I think this is because of Chromium going into idle mode and not responding. I still think we should find a workaround.
Which version of puppeteer do you have?
cat node_modules/puppeteer/package.json |grep version
5.5.0
Could you try newest (v7)?
yarn add puppeteer
That's what I used on a fresh install, not sure why it installs 5.5. Anyway even with 5.5 on the Mac Mini, I don't have any issue. The laptop run was only temporary as a test, I just wanted to flag it to you.