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.38k stars 93 forks source link

Couldn't establish a connection "wss://xxx". Is your browser running? #256

Closed Aerya closed 2 years ago

Aerya commented 2 years ago

Hi,

Thanks for the job! I just need help to go on and use it wide :)

Describe the bug I got my notification on Discord to solve the captcha

But once I get to https://epic.domain.tld/?targetId=A6423E30A5626BFC0FEC26FB1A3F17BF, I got this error Couldn't establish a connection "wss://epic.domain.tld/ws/A6423E30A5626BFC0FEC26FB1A3F17BF". Is your browser running?

Screenshots or Logs

> epicgames-freegames-node@4.1.0 entrypoint-config
> node dist/src/entrypoint-config.js

Setting timezone: Europe/Paris
Run on startup: true
[2022-06-30 16:15:17.892 +0200] INFO: Started epicgames-freegames-node
    COMMIT_SHA: "a7629cb5b837b3a9242bf0a0e13b94006bc58dad"
    BRANCH: "master"
    DISTRO: "debian"
[2022-06-30 16:15:17.893 +0200] DEBUG: Performing version check
    PROJECT_NAME: "epicgames-freegames-node"
    BRANCH: "master"
    COMMIT_SHA: "a7629cb5b837b3a9242bf0a0e13b94006bc58dad"
[2022-06-30 16:15:18.221 +0200] INFO: Checking free games for mail@mail.com 
    user: "mail@mail.com"
[2022-06-30 16:15:18.221 +0200] DEBUG: Launching a new browser
    user: "mail@mail.com"
[2022-06-30 16:15:18.631 +0200] DEBUG: hcaptchaAccessibilityUrl not configured, captchas are less likely to be bypassed. Follow this guide to set it up: https://github.com/claabs/epicgames-freegames-node#hcaptcha-accessibility-cookies
[2022-06-30 16:15:18.633 +0200] DEBUG: Logging in with puppeteer
    user: "mail@mail.com"
[2022-06-30 16:15:18.633 +0200] DEBUG: Launching a new browser
    user: "mail@mail.com"
[2022-06-30 16:15:18.819 +0200] DEBUG: Launching a new page
    user: "mail@mail.com"
[2022-06-30 16:15:28.829 +0200] DEBUG: Could not refresh credentials. Logging in fresh.
    user: "mail@mail.com"
[2022-06-30 16:15:38.492 +0200] INFO: Go to this URL and do something
    user: "mail@mail.com"
    url: "https://epic.domain.tld/?targetId=A6423E30A5626BFC0FEC26FB1A3F17BF"

Configuration: I tried both ghcr.io/claabs/epicgames-freegames-node:bullseye-slim and charlocharlie/epicgames-freegames:latest Also tried -e BROWSER_NAVIGATION_TIMEOUT=100000 \

docker run -d \
--name=epic \
--restart always \
-e TZ=Europe/Paris \
-e BROWSER_NAVIGATION_TIMEOUT=100000 \
-v /volume1/docker/epicgames:/usr/app/config:rw \
-p 4207:3000 \
-m 2g \
--label=com.centurylinklabs.watchtower.enable=true \
charlocharlie/epicgames-freegames:latest
{
  "runOnStartup": true,
  "cronSchedule": "5 16 * * *",
  "logLevel": "debug",
  "webPortalConfig": {
    "baseUrl": "https://epic.domain.tld",
    },
  "accounts": [
    {
      "email": "mail@mail.com",
      "password": "xx",
      "totp": "xx"
    },
  ],
  "notifiers": [
    {
      "type": "discord",
      "webhookUrl": "https://discordapp.com/api/webhooks/x/x",
    },
  ],
}

I use Nginx Proxy Manager for reverse proxy with Cloudflare.

Thanks for any help, A.

Aerya commented 2 years ago

I don't understand the wss://epic.domain.tld

Aerya commented 2 years ago

Ok solved... WSS stands for WebSocket Secured. Had to activate WebSocket for the reverse-proxy.