Bot works fine locally and even in the simlulated Heroku local heroku local web, but crashes after a minute or two when hosted on their servers online.
- I have installed the buildpack for puppeteer: https://github.com/jontewks/puppeteer-heroku-buildpack
- I cleared my build cache: https://help.heroku.com/18PI5RSY/how-do-i-clear-the-build-cache
I have tried to manually set my worker scaling to 1
heroku ps:scale web=1This is my puppeteer browser launch arguments:
{args: ["--no-sandbox", "--disable-setuid-sandbox"],}
List of my dependencies below:
- discord.js
- dotenv
- node-fetch
- puppeteer
- fs
Logs are useless:
2020-05-15T11:40:56.804117+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-15T11:41:22.345051+00:00 app[web.1]:
2020-05-15T11:41:22.345073+00:00 app[web.1]: > discordbot@1.0.0 start /app
2020-05-15T11:41:22.345073+00:00 app[web.1]: > node bot.js
2020-05-15T11:41:22.345074+00:00 app[web.1]:
2020-05-15T11:42:20.278141+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-15T11:53:02.553013+00:00 heroku[web.1]: State changed from crashed to starting
2020-05-15T11:53:25.758932+00:00 app[web.1]:
2020-05-15T11:53:25.758955+00:00 app[web.1]: > discordbot@1.0.0 start /app
2020-05-15T11:53:25.758956+00:00 app[web.1]: > node bot.js
2020-05-15T11:53:25.758956+00:00 app[web.1]:
2020-05-15T11:54:18.310840+00:00 heroku[web.1]: State changed from starting to crashed