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.33k stars 90 forks source link

RequestError: getaddrinfo EAI_AGAIN api.github.com #168

Closed Tiippex closed 2 years ago

Tiippex commented 2 years ago

Describe the bug I migrated everything to v4 and the app does not startup. I mounted the config dir. I attached my config further below. I'm trying to run the provided container on my QNAP NAS. That used to work with v3.

The v4 container works on my PC but not on my NAS. Is that caused by dropping the arm/v6 arm/v7 support?

Screenshots or Logs

RequestError: getaddrinfo EAI_AGAIN api.github.com
at ClientRequest.<anonymous> (/usr/app/node_modules/got/dist/source/core/index.js:956:111)
at Object.onceWrapper (events.js:520:26)
at ClientRequest.emit (events.js:412:35)
at ClientRequest.origin.emit (/usr/app/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:400:28)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)
parse error: Expected another key-value pair at line 9, column 3
node dist/src/entrypoint-config.js

[2021-10-16 04:59:13.963 +0200] ERROR (RequestError/18 on 581164b8b054): getaddrinfo EAI_AGAIN api.github.com
    RequestError: getaddrinfo EAI_AGAIN api.github.com
        at ClientRequest.<anonymous> (/usr/app/node_modules/got/dist/source/core/index.js:956:111)
        at Object.onceWrapper (events.js:520:26)
        at ClientRequest.emit (events.js:412:35)
        at ClientRequest.origin.emit (/usr/app/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
        at TLSSocket.socketErrorListener (_http_client.js:475:9)
        at TLSSocket.emit (events.js:400:28)
        at emitErrorNT (internal/streams/destroy.js:106:8)
        at emitErrorCloseNT (internal/streams/destroy.js:74:3)
        at processTicksAndRejections (internal/process/task_queues.js:82:21)
        at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)
cat: can't open '/tmp/config.json': No such file or directory
cat: can't open '/tmp/config.json': No such file or directory
cat: can't open '/tmp/config.json': No such file or directory
cat: can't open '/tmp/config.json': No such file or directory
Setting timezone: 
Run on startup: 
Run once: 
Exiting...

docker-compose

version: '3'

services:
  epicgames-freegames:
    restart: always
    container_name: epicgamesfreegames
    environment:
      - TZ=Europe/Berlin
    volumes:
      - /share/CACHEDEV1_DATA/Container/epicgamesFreegames/config/:/usr/app/config
    image: charlocharlie/epicgames-freegames:latest
    ports:
      - 3000:3000

config.json

{
  "searchStrategy": "weekly",
  "runOnStartup": true,
  "cronSchedule": "5 16 * * *",
  "logLevel": "info",
  "hcaptchaAccessibilityUrl": "https://accounts.hcaptcha.com/verify_email/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "webPortalConfig": {
    "baseUrl": "http://192.168.16.80:3000",
  },
  "accounts": [
    {
        "email": "XX@XX.XX",
        "password": "XXXXXXXXXXXXXXX",
        "totp": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    {
        "email": "XX.XX@googlemail.com",
        "password": "XXXXXXXXXXXXXXX",
        "totp": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    }
  ],
  "notifiers": [
    {
      "type": "email",
      "smtpHost": "XX.XX.XX",
      "smtpPort": 587,
      "emailSenderAddress": "XX@XX.XX",
      "emailSenderName": "Epic Games Captchas",
      "emailRecipientAddress": "XXX.XXX@XXX.XXX",
      "secure": false,
      "auth": {
          "user": "XXX.XXX@XXX.XXX",
          "pass": "XXXXXXXXXXXX"
      }
    }
  ]
}
claabs commented 2 years ago

I doubt it's arm/v6 arm/v7 related, as Docker wouldn't even pull the image if a compatible architecture didn't exist.

Searching for getaddrinfo EAI_AGAIN shows that it's likely a DNS misconfiguration on the Docker host side.

I'm not familiar with QNAP, so I'm afraid there's not much I can help with here.

Tiippex commented 2 years ago

Oh, that helped a lot thank you!

I just had to add the following DNS settings in the docker-compose:


    dns:
      - 8.8.8.8
      - 1.1.1.1