instauto icon indicating copy to clipboard operation
instauto copied to clipboard

Bot not exited but continues to try

Open cajoy opened this issue 5 years ago • 10 comments

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

cajoy avatar Apr 15 '20 11:04 cajoy

Hi. Was the chromium window still responsive? or were you running headless?

mifi avatar May 03 '20 09:05 mifi

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).

icpgithub avatar Oct 05 '20 10:10 icpgithub

Try to use pm2. See the example in readme. pm2 will auto restart when it exits

mifi avatar Oct 05 '20 10:10 mifi

Thank you, it's working! :)

icpgithub avatar Oct 05 '20 11:10 icpgithub

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.

timothe avatar Feb 03 '21 15:02 timothe

Which version of puppeteer do you have?

cat node_modules/puppeteer/package.json |grep version

mifi avatar Feb 03 '21 15:02 mifi

5.5.0

timothe avatar Feb 03 '21 17:02 timothe

Could you try newest (v7)?

mifi avatar Feb 03 '21 19:02 mifi

yarn add puppeteer

mifi avatar Feb 03 '21 19:02 mifi

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.

timothe avatar Feb 03 '21 20:02 timothe