dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
15.79k stars 882 forks source link

Won't connect to Playwright browser.. Protocol "ws:" not supported #2417

Closed sabot105mm closed 2 weeks ago

sabot105mm commented 2 weeks ago

Describe the bug Playwright browser fails to connect. Protocol "ws:" not supported

Version Exact version in the top right area: 0.... v0.45.23 To Reproduce

Steps to reproduce the behavior:

  1. Go to any website using Playwright Chromium/Javascript

Expected behavior Changedetection can not connect to Playwright browser, yet browserless works

Screenshots If applicable, add screenshots to help explain your problem. Screenshot 2024-06-16 at 11 08 49 AM

Desktop (please complete the following information):

Additional context

2024-06-16 14:32:33.009 | ERROR    | changedetectionio.update_worker:run:464 - BrowserType.connect_over_cdp: Protocol "ws:" not supported. Expected "http:"
Call log:
<ws preparing> retrieving websocket url from  ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true

2024-06-16 14:32:33.009 | DEBUG    | changedetectionio.update_worker:run:541 - Watch b09469b8-f3d2-4aea-ab05-0ba357731828 done in 0.24s

---
services:
  changedetection.io:
    image: lscr.io/linuxserver/changedetection.io:latest
    container_name: changedetection
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - BASE_URL= #optional
      - PLAYWRIGHT_DRIVER_URL= ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true
    volumes:
      - /home/gary/docker/changedetection/config2:/config
    ports:
      - 5000:5000
    restart: unless-stopped
    depends_on:
        playwright-chrome:
            condition: service_started
#  browserless:
#    image: browserless/chrome:latest
#    environment:
#      - DEBUG=browserless:*
      #- MAX_CONCURRENT_SESSIONS=10
      #- CONNECTION_TIMEOUT=60000
      #- MAX_QUEUE_LENGTH=20
#      - PREBOOT_CHROME=true
#      - DEMO_MODE=false
      #- HOST=0.0.0.0
#      - ENABLE_DEBUGGER=false
      #- TOKEN=H48$Dl89EePXOAR@^!b&#^Vm5Zv#8g
#      - PORT=3001
#      - WORKSPACE_DELETE_EXPIRED=true
#    container_name: "browserless"

  playwright-chrome:
    hostname: playwright-chrome
    image: dgtlmoon/sockpuppetbrowser:latest
    cap_add:
      - SYS_ADMIN

    restart: unless-stopped
    environment:
      - SCREEN_WIDTH=1920
      - SCREEN_HEIGHT=1024
      - SCREEN_DEPTH=16
      - ENABLE_DEBUGGER=false
      - PREBOOT_CHROME=true
      - CONNECTION_TIMEOUT=300000
      - MAX_CONCURRENT_SESSIONS=10
      - CHROME_REFRESH_TIME=600000
      - DEFAULT_BLOCK_ADS=true
      - DEFAULT_STEALTH=true
      - DEFAULT_IGNORE_HTTPS_ERRORS=true```
sabot105mm commented 2 weeks ago

what ever I did different this worked

services:
    changedetection:
      image: ghcr.io/dgtlmoon/changedetection.io
      container_name: changedetection
      hostname: changedetection
      volumes:
        - /home/gary/docker/changedetection/config:/datastore

      environment:
        - PUID=1000
        - PGID=1000
        - PLAYWRIGHT_DRIVER_URL=ws://playwright-chrome:3000/?stealth=1&--disable-web-security=true
        - USE_X_SETTINGS=1
        - HIDE_REFERER=true
        - FETCH_WORKERS=10
        - MINIMUM_SECONDS_RECHECK_TIME=3
        - HTTPS_PROXY=socks5h://xxxxxxxx
      ports:
        - 5000:5000
      restart: unless-stopped
      depends_on:
          playwright-chrome:
              condition: service_started
    playwright-chrome:
        hostname: playwright-chrome
        image: dgtlmoon/sockpuppetbrowser:latest
        cap_add:
            - SYS_ADMIN
        restart: unless-stopped
        environment:
            - SCREEN_WIDTH=1920
            - SCREEN_HEIGHT=1024
            - SCREEN_DEPTH=16
            - MAX_CONCURRENT_CHROME_PROCESSES=10
dgtlmoon commented 2 weeks ago

You are doing some custom config without understanding the docker system cap-add i think

sabot105mm commented 2 weeks ago

I think it was the space PLAYWRIGHT_DRIVER_URL= ws.