Closed Skowt closed 3 years ago
@Skowt try setting this env to false:
If that solves the problem for you then I will go ahead and remove that as an option
@smashah It's not trying to update but it does crash:
2021-03-08T17:50:19.288138+00:00 heroku[web.1]: State changed from up to crashed
2021-03-08T17:50:19.291915+00:00 heroku[web.1]: State changed from crashed to starting
2021-03-08T17:50:43.414599+00:00 heroku[web.1]: Starting process with command `npm start`
2021-03-08T17:50:46.962189+00:00 app[web.1]: [heroku-exec] Starting
2021-03-08T17:50:47.542404+00:00 app[web.1]:
2021-03-08T17:50:47.542442+00:00 app[web.1]: > open-wa-deploy-heroku@1.0.0 start /app
2021-03-08T17:50:47.542446+00:00 app[web.1]: > npx @open-wa/wa-automate --disable-spins --port $PORT --popup --in-docker --qr-timeout 0 -k $API_KEY --keep-alive --keep-updated --executable-path="/app/.apt/usr/bin/google-chrome"
2021-03-08T17:50:47.542447+00:00 app[web.1]:
2021-03-08T17:50:49.617321+00:00 app[web.1]: fresh run
2021-03-08T17:50:49.975386+00:00 app[web.1]: ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
2021-03-08T17:50:49.975445+00:00 app[web.1]: ┃ ┃
2021-03-08T17:50:49.975446+00:00 app[web.1]: ┃ @open-wa/wa-automate ┃
2021-03-08T17:50:49.975446+00:00 app[web.1]: ┃ 💬 🤖 The most reliable NodeJS whatsapp library for chatbots with advanced features. ┃
2021-03-08T17:50:49.975447+00:00 app[web.1]: ┃ Version: 3.1.10 ┃
2021-03-08T17:50:49.975447+00:00 app[web.1]: ┃ Check out the latest changes: https://github.com/open-wa/wa-automate-nodejs#latest-changes ┃
2021-03-08T17:50:49.975448+00:00 app[web.1]: ┃ ┃
2021-03-08T17:50:49.975449+00:00 app[web.1]: ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
2021-03-08T17:50:50.074307+00:00 app[web.1]: You can also authenticate the session at: NA
2021-03-08T17:50:50.076507+00:00 app[web.1]: - Initializing WA
2021-03-08T17:50:50.509249+00:00 heroku[web.1]: State changed from starting to up
2021-03-08T17:50:52.578764+00:00 app[web.1]: - Browser Launched
2021-03-08T17:50:52.599040+00:00 app[web.1]: ┌─────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
2021-03-08T17:50:52.599052+00:00 app[web.1]: │ (index) │ Values │
2021-03-08T17:50:52.599053+00:00 app[web.1]: ├─────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
2021-03-08T17:50:52.599053+00:00 app[web.1]: │ WA_VERSION │ '2.2106.5' │
2021-03-08T17:50:52.599054+00:00 app[web.1]: │ PAGE_UA │ 'WhatsApp/2.2037.6 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36' │
2021-03-08T17:50:52.599054+00:00 app[web.1]: │ WA_AUTOMATE_VERSION │ '3.1.10' │
2021-03-08T17:50:52.599055+00:00 app[web.1]: │ BROWSER_VERSION │ 'HeadlessChrome/88.0.4324.96' │
2021-03-08T17:50:52.599055+00:00 app[web.1]: │ OS │ 'Linux 4.4' │
2021-03-08T17:50:52.599055+00:00 app[web.1]: │ START_TS │ 1615225852586 │
2021-03-08T17:50:52.599056+00:00 app[web.1]: └─────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
2021-03-08T17:50:52.599339+00:00 app[web.1]: - Authenticating
2021-03-08T17:50:54.483197+00:00 app[web.1]: - Authenticate to continue
2021-03-08T17:50:56.522025+00:00 app[web.1]: Error: Evaluation failed: ReferenceError: getQrPng is not defined
2021-03-08T17:50:56.522075+00:00 app[web.1]: at __puppeteer_evaluation_script__:1:1
2021-03-08T17:50:56.522086+00:00 app[web.1]: at ExecutionContext._evaluateInternal (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:171:23)
2021-03-08T17:50:56.522087+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)
2021-03-08T17:50:56.522087+00:00 app[web.1]: at async ExecutionContext.evaluate (/app/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:106:16)
2021-03-08T17:50:56.588875+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-03-08T17:50:56.589323+00:00 app[web.1]: npm ERR! errno 1
2021-03-08T17:50:56.599928+00:00 app[web.1]: npm ERR! open-wa-deploy-heroku@1.0.0 start: `npx @open-wa/wa-automate --disable-spins --port $PORT --popup --in-docker --qr-timeout 0 -k $API_KEY --keep-alive --keep-updated --executable-path="/app/.apt/usr/bin/google-chrome"`
2021-03-08T17:50:56.600039+00:00 app[web.1]: npm ERR! Exit status 1
2021-03-08T17:50:56.600157+00:00 app[web.1]: npm ERR!
2021-03-08T17:50:56.600258+00:00 app[web.1]: npm ERR! Failed at the open-wa-deploy-heroku@1.0.0 start script.
2021-03-08T17:50:56.600478+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-03-08T17:50:56.610053+00:00 app[web.1]:
2021-03-08T17:50:56.610248+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-08T17:50:56.610383+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-08T17_50_56_601Z-debug.log
2021-03-08T17:50:56.665055+00:00 heroku[web.1]: Process exited with status 1
2021-03-08T17:50:56.716771+00:00 heroku[web.1]: State changed from up to crashed
I'll reauthenticate to fix that. Thanks :)
Wow I am surprised in this new way that heroku has become a nuisance in my life. I will be switching deployment stuff to DO or some other less horrible service.
In order to fix this issue, you will need to redeploy using the Heroku button with the same environmental variables since dependabot PRs for open-wa will be automerged from now on.
Ah yeah @smashah, it's a con of using the 'Deploy to Heroku' button:
So my 'fix' in the meantime is to fork your repo, then I can set that as a deployment target in Heroku so whenever my repo updates, it will deploy. I then installed wei/Pull to automatically pull commits from your repo to my fork every few hours.
This should work for now. Happy to update the. README if it helps!
Going to close this issue out since it's been resolved. Feel free to reopen but I don't think there are any actions left. Unless @smashah decides to update the default params to not 'AUTO_UPDATE'.
@Skowt done thanks. I will look into this and find a better way to interface with heroku (i think their marketplace apps update automatically)
@smashah Sweet. Shout if you need some testing done
I've deployed the API to Heroku and it appears that it's constantly trying to update and it saves changes to
package-lock.json
which is ephemeral because Heroku doesn't store files between reboots, so it results in a reboot loop.Is there a way to either disable updates or prevent this loop from occurring?
Logs: