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

can not establish connect #176

Closed LGinC closed 2 years ago

LGinC commented 2 years ago

start container, and there is a log.

> epicgames-freegames-node@4.0.0 entrypoint-config /usr/app
> node dist/src/entrypoint-config.js

[2021-10-22 02:05:56.235 +0000] ERROR (RequestError/20 on epicgames-freegames): Client network socket disconnected before secure TLS connection was established
    RequestError: Client network socket disconnected before secure TLS connection was established
        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 connResetException (internal/errors.js:639:14)
        at TLSSocket.onConnectEnd (_tls_wrap.js:1570:19)
        at TLSSocket.emit (events.js:412:35)
        at endReadableNT (internal/streams/readable.js:1334:12)
        at processTicksAndRejections (internal/process/task_queues.js:82:21)

   ╭───────────────────────────────────────────────────────────────╮
   │                                                               │
   │     New major version of npm available! 6.14.15 -> 8.1.1      │
   │   Changelog: https://github.com/npm/cli/releases/tag/v8.1.1   │
   │               Run npm install -g npm to update!               │
   │                                                               │
   ╰───────────────────────────────────────────────────────────────╯

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...

content of config.json

{
  "searchStrategy": "weekly",
  "runOnStartup": false,
  "cronSchedule": "3 10 * * 6",
  "logLevel": "trace",
  "hcaptchaAccessibilityUrl": "https://accounts.hcaptcha.com/verify_email/96e9d77b-21eb-463d-9a21-75237fb27b6c",
  "webPortalConfig": {
    "baseUrl": "http://xxxxx",
  },
  "accounts": [
    {
      "email": "xxx@xx.com",
      "password": "xxxxxx"
    }
  ],
  "notifiers": [
    {
      "type": "local"
    }
  ]
}
claabs commented 2 years ago

This looks like a networking issue. Is your system behind a network that requires a proxy config or man-in-the-middle certs?

LGinC commented 2 years ago

This looks like a networking issue. Is your system behind a network that requires a proxy config or man-in-the-middle certs?

it run on NAS without proxy, and I can open www.epicgames.com in browser

claabs commented 2 years ago

The first call is to https://api.github.com to check for a newer version of the app. Is there trouble connecting to that?

LGinC commented 2 years ago

can not connect to api.github.com. How to set proxy? I add environment "HTTP_PROXY=http://192.168.1.3:7890", but not work

claabs commented 2 years ago

I added "skipVersionCheck": true, as a config option. This will skip the call to api.github.com.

When the build finishes, you can re-pull and try it out,

claabs commented 2 years ago

Also I think the variable needs to be http_proxy lowercase, although I have not tested it.

LGinC commented 2 years ago

Also I think the variable needs to be http_proxy lowercase, although I have not tested it.

docker run -e http_proxy=http://192.168.1.3:7890, not work. so I just wait new version and config "skipVersionCheck", thx