claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.39k stars 92 forks source link

GCP config file not found - " no such file or directory" #6

Closed Andrej730 closed 4 years ago

Andrej730 commented 4 years ago

When i'm trying to run the script as follows:

docker run -e TZ=America/Chicago -e EMAIL=example@mail.com -e PASSWORD=1231231123 -e GCP_CONFIG_NAME=weeklyepicgames-xxxxxxxxxxx.json -e RUN_ON_STARTUP=true -v /mnt/user/appdata/epicgames-freegames/:/usr/app/config:rw charlocharlie/epicgames-freegames:latest

I receive the error even though I've checked "/usr/app/config/" directory and the "fweeklyepicgames-xxxxxxxxxxx.json" is clearly there.

> epicgames-freegames-node@1.0.0 start /usr/app
> node dist/index.js

[2020-04-25 02:16:10.405 -0500] ERROR (24 on 0da6d9c67ee3): ENOENT: no such file or directory, open '/usr/app/config/fweeklyepicgames-xxxxxxxxxxx.json'
    Error: ENOENT: no such file or directory, open '/usr/app/config/weeklyepicgames-xxxxxxxxxxx.json'
(node:24) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'body' of undefined
    at main (/usr/app/dist/index.js:309:24)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:24) 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: 1)
(node:24) [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.
claabs commented 4 years ago

Are you mixing up the host and container directory? /usr/app/config is the container directory. The host directory is the first of the pair, so /mnt/user/appdata/epicgames-freegames/ in the example.

Andrej730 commented 4 years ago

Yes, I mixed up directories. Moved my "fweeklyepicgames-xxxxxxxxxxx.json" to "/mnt/user/appdata/epicgames-freegames/" and it worked.