Skip to content

Changedetection: Launch options aren't Base64 encodedΒ #5616

Closed
@Denny-89

Description

@Denny-89

βœ… Have you read and understood the above guidelines?

yes

πŸ“œ What is the name of the script you are using?

Change Detection

πŸ“‚ What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/changedetection.sh)"

βš™οΈ What settings are you using?

  • Default Settings
  • Advanced Settings

πŸ–₯️ Which Linux distribution are you using?

Debian 12

πŸ“ Provide a clear and concise description of the issue.

For some reason the Playwright Chrome fetcher stopped working if the {"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true} portion of PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true isn't Base64 encoded.

Anyway, here's the fix that works for me:

Replace
Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch={"defaultViewport":{"height":720,"width":1280},"headless":false,"stealth":true}&blockAds=true
with
Environment=PLAYWRIGHT_DRIVER_URL=ws://localhost:3000/chrome?launch=eyJkZWZhdWx0Vmlld3BvcnQiOnsiaGVpZ2h0Ijo3MjAsIndpZHRoIjoxMjgwfSwiaGVhZGxlc3MiOmZhbHNlLCJzdGVhbHRoIjp0cnVlfQ==&blockAds=true
inside changedetection-install.sh

The Base64 string can be obtained from any free online Base64 encoder. I've used base64encode.org.

πŸ”„ Steps to reproduce the issue.

Step 1: Make a new Change Detection LXC or update an existing LXC that was made with the script
Step 2: Add a new URL or edit an existing one to use the Playwright fetcher (Edit -> Request -> Save)
Step 3: Recheck the URL from Step 2 and enjoy the error

❌ Paste the full error output (if available).

Exception: BrowserType.connect_over_cdp: WebSocket error: ws://localhost:3000/chrome 400 Bad Request Error parsing launch-options: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2). Launch options must be a JSON or base64-encoded JSON object Call log: - ws://localhost:3000/chrome - ws://localhost:3000/chrome 400 Bad Request Error parsing launch-options: SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2). Launch options must be a JSON or base64-encoded JSON object - ws://localhost:3000/chrome error WebSocket was closed before the connection was established - ws://localhost:3000/chrome WebSocket was closed before the connection was established - ws://localhost:3000/chrome code=1006 reason=

πŸ–ΌοΈ Additional context (optional).

It took me hours of looking through Browserless, Playwright and Changedetection.io commits of the last 14 days without finding out exactly why. Maybe because of Node 22 since they (browserless) recently changed the minimum requirement to 24? No idea. Here's the log from running the script in verbose mode in case it helps:

npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@browserless.io/[email protected]',
npm warn EBADENGINE   required: { node: '>= 24 < 25' },
npm warn EBADENGINE   current: { node: 'v22.17.0', npm: '11.4.2' }
npm warn EBADENGINE }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions