Skip to content

Print error when youtube.js can't write in its directory /var/tmp/youtubei.js #88

@BenLangers

Description

@BenLangers

EDIT: Print error when unable to write in the youtubei.js directory.


I am trying to switch to the new companion instead of sig_helper. The companion container keeps restarting and never seems to come online.

Compose used:

version: "3.8"
services:
  invidious:
    image: quay.io/invidious/invidious:master
    restart: unless-stopped
    ports:
      - "12201:3000"
    environment:
      # https://github.com/iv-org/invidious/blob/master/config/config.example.yml
      INVIDIOUS_CONFIG: |
        db:
          dbname: [redacted]
          user: [redacted]
          password: [redacted]
          host: invidious-db
          port: 5432
        invidious_companion:
        - private_url: "http://companion:8282"
          public_url: "https://[redacted]"
        invidious_companion_key: [redacted]
        check_tables: true
        external_port: 443
        domain: [redacted]
        https_only: false
        hmac_key: "[redacted]"
    depends_on:
      - invidious-db

  invidious-db:
    image: docker.io/library/postgres:14
    restart: unless-stopped
    volumes:
      - postgresdata:/var/lib/postgresql/data
      - /mnt/shive01/invidious/repo/config/sql:/config/sql
      - /mnt/shive01/invidious/repo/docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
    environment:
      POSTGRES_DB: [redacted]
      POSTGRES_USER: [redacted]
      POSTGRES_PASSWORD: [redacted]
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]

  companion:
    image: quay.io/invidious/invidious-companion:latest
    environment:
      SERVER_SECRET_KEY: [redacted]
      HOST: 0.0.0.0
      SERVER_BASE_URL: "https://[redacted]"
    restart: unless-stopped
    ports:
      - "12202:8282"
    cap_drop:
      - ALL
    read_only: true
    volumes:
      - /mnt/shive01/invidious/companion:/var/tmp/youtubei.js:rw
    security_opt:
      - no-new-privileges:true

volumes:
  postgresdata:

The log of the companion container only shows

[INFO] No local config file found, using default config
Loaded Configuration {
  server: {
    port: 8282,
    host: "0.0.0.0",
    secret_key: "[redacted]",
    verify_requests: false
  },
  cache: { enabled: true, directory: "/var/tmp" },
  networking: { ump: false, proxy: null },
{
    youtube_session: { po_token_enabled: true, frequency: "*/5 * * * *" }
  },
  youtube_session: { oauth_enabled: false, cookies: "" }
}
[INFO] job po_token is active.
[INFO] the "Not implemented: HTMLCanvasElement.prototype.getContext" error is normal. Please do not open a bug report about it.
Error: Not implemented: HTMLCanvasElement.prototype.getContext (without installing the canvas npm package)
...

it repeats the HTMLCanvasElement three times, then exits the container with exit code 143, and tries to restart another instance of the container. No additional information is logged.
/mnt/shive01/invidious/repo is a clone of the invidious repository
/mnt/shive01/invidious/companion is an empty directory with currently permissions set to 777.
The cache volume remains empty.

When trying to play a video, invidious complains:
Error while communicating with Invidious companion: Hostname lookup for companion failed: No address found
which makes sense as the container never seems to reach 'running' state.
The additional routes for the companion container have been added to the external NGINX reverse proxy as documented.

Any indication what I am missing to get this show on the road?
Thanks in advance!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Necessary

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions