It doesn't work, unreachable code error
Closed this issue · 4 comments
Hello good afternoon,
So far I was running the bot with docker-compose, but I just updated docker and when I start it, I get the following error in console:
#FailureMessage Object: 0x7e8cf254
Fatal error in , line 0
unreachable code
My config.json is the same. Any idea?
Thanks for your support
Alex
This problem appears to me with the latest version of docker. I have been installing old versions and it works fine for me with the 3.9.0 image
See this issue on another library: Koenkk/zigbee2mqtt#7662
It seems that this is an issue with the Alpine base image that we now use, in combination with certain things being out of date.
Are your host OS and packages up-to-date?
It doesn't work for me either.
I start the container (compose).
Then in telegram i do /login
and get this error:
Something went wrong
"HTTPError: Response code 403 (Forbidden)\n at Request.<anonymous> (/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)"
So I try the /login my@email.com
and get no response in telegram, but the docker logs tell me this:
(node:1) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/home/node/.config/toogoodtogo-watcher-nodejs/config.json.tmp-541004412081b14d'
at openSync (fs.js:497:3)
at attempt (/home/node/app/node_modules/atomically/dist/utils/retryify.js:33:27)
at Object.writeFileSync (/home/node/app/node_modules/atomically/dist/index.js:136:49)
at Conf._write (/home/node/app/node_modules/conf/dist/source/index.js:374:28)
at Conf.set store [as store] (/home/node/app/node_modules/conf/dist/source/index.js:295:14)
at Conf.set (/home/node/app/node_modules/conf/dist/source/index.js:188:20)
at loginCommand (/home/node/app/lib/telegram-bot.js:134:12)
at /home/node/app/node_modules/telegraf/lib/composer.js:158:111
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async execute (/home/node/app/node_modules/telegraf/lib/composer.js:458:17)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
You are not logged in. Login via the command `toogoodtogo-watcher login` or `/login` with the Telegram Bot
Please retry with 3.10.2
, I updated the Docker image to use Node 18.