Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot not exited but continues to try #19

Open
cajoy opened this issue Apr 15, 2020 · 10 comments
Open

Bot not exited but continues to try #19

cajoy opened this issue Apr 15, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@cajoy
Copy link

cajoy commented Apr 15, 2020

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

@mifi
Copy link
Owner

mifi commented May 3, 2020

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

@icpgithub
Copy link

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

@mifi
Copy link
Owner

mifi commented Oct 5, 2020

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

@icpgithub
Copy link

Thank you, it's working! :)

@timothe
Copy link

timothe commented Feb 3, 2021

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.

@mifi
Copy link
Owner

mifi commented Feb 3, 2021

Which version of puppeteer do you have?

cat node_modules/puppeteer/package.json |grep version

@timothe
Copy link

timothe commented Feb 3, 2021

5.5.0

@mifi
Copy link
Owner

mifi commented Feb 3, 2021

Could you try newest (v7)?

@mifi
Copy link
Owner

mifi commented Feb 3, 2021

yarn add puppeteer

@timothe
Copy link

timothe commented Feb 3, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants