pawelmalak / flame

Flame is self-hosted startpage for your server. Easily manage your apps and bookmarks with built-in editors.
MIT License
5.03k stars 246 forks source link

[BUG] Trying to use docker integration but get [2021-12-06 09:05:34.734 UTC+0] [ERROR] Cannot read properties of undefined (reading 'split') #249

Open mpfl opened 2 years ago

mpfl commented 2 years ago

Deployment details:


Bug description:

Trying to define a bunch of things with labels but I seem to be upsetting flame, which makes me sad.


Steps to reproduce:

  1. Deploy Flame with this docker-compose. I use tecnativa/docker-socket-proxy for security:
version: '3.6'

services:
  flame:
    image: pawelmalak/flame
    container_name: flame
    volumes:
      - /home/flame/data:/app/data
    networks:
      - web
      - default
    secrets:
      - password # optional but required for (1)
    environment:
      - PASSWORD_FILE=/run/secrets/password # optional but required for (1)
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=web"
      - "traefik.http.routers.flame.entrypoints=websecure"
      - "traefik.http.routers.flame.rule=Host(`flame.private`)"
      - "traefik.http.services.flame.loadbalancer.server.port=5005"
    restart: unless-stopped

  docker-socket-proxy:
    image: tecnativa/docker-socket-proxy:latest
    container_name: flame-docker-socket-proxy
    privileged: true
    volumes:
     - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - CONTAINERS=1
    restart: unless-stopped

# optional but required for Docker secrets (1)
secrets:
  password:
    file: /home/flame/secrets/password

networks:
  web:
    external: true

I am also running paperless with labels to add it to flame:

version: "3.4"
services:
  broker:
    image: redis:6.0
    restart: unless-stopped

  webserver:
    image: jonaswinkler/paperless-ng:latest
    restart: unless-stopped
    depends_on:
      - broker
    networks:
      - web
      - default
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000"]
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - /home/paperless/data:/usr/src/paperless/data
      - /home/paperless/media:/usr/src/paperless/media
      - /home/paperless/export:/usr/src/paperless/export
      - /home/paperless/consume:/usr/src/paperless/consume
    environment:
      PAPERLESS_REDIS: redis://broker:6379
      USERMAP_UID: 1111
      USERMAP_GID: 1111
      PAPERLESS_TIME_ZONE: Australia/Perth
    labels:
      - "diun.enable=true"
      - "flame.type=application"
      - "flame.name=Paperless"
      - "flame.url=https://paperless.private/"
      - "traefik.enable=true"
      - "traefik.docker.network=web"
      - "traefik.http.routers.paperless.entrypoints=websecure"
      - "traefik.http.routers.paperless.rule=Host(`paperless.private`)"
      - "traefik.http.services.paperless.loadbalancer.server.port=8000"

networks:
  web:
    external: true
  1. Go to https://flame.private/settings and log in with the password
  2. Go to the docker settings and set the Docker host to flame-docker-socket-proxy:2375
  3. Head back to the homepage and you'll see the eternal loading graphic of doom
  4. Check the flame logs to find something like this: [2021-12-06 08:45:29.424 UTC+0] [ERROR] Cannot read properties of undefined (reading 'split')

What else have I tried?

I gave flame temporary access directly to the docker socket but still get the same issue.

I have tried with another application, but still get the same issues.

I'm quite interested in the idea of a label-defined dashboard, so I might poke into this issue on a future weekend.

enzofoucaud commented 2 years ago

I have the same error on my new server ^^ The old server work well.

mpfl commented 2 years ago

@enzofoucaud Can you share the details of your old server? What practices have you changed when migrating to the new server? Are there any new containers with funky labels you're running?

mpfl commented 2 years ago

Okay, this is weird. I just added Flame labels to a couple of more containers and now it works..?

enzofoucaud commented 2 years ago

@enzofoucaud Can you share the details of your old server? What practices have you changed when migrating to the new server? Are there any new containers with funky labels you're running?

I use the same step than my old server, same docker-compose

Okay, this is weird. I just added Flame labels to a couple of more containers and now it works..?

example ?

mpfl commented 2 years ago

I had only Overseerr and Paperless-NG and was getting the error message. Then I added a weather API key and also Vikunja, TTRSS, and Home Assistant, and it started working.

enzofoucaud commented 2 years ago

Don't work form me .. I wait

xoniq commented 1 year ago

For future people, I have Flame running for months, and today I noticed that it wasn't able to fetch apps. I got the same error as OP (by searching the error I came across this issue).

The problem was running Vikunja. I stopped that, and suddenly it works again.

Chemrat commented 1 year ago

Had same problem, as a workaround added flame tags to one of the containers, but I don't really want that container to be on the app list. Seems like the problem manifests itself when some containers don't have flame tags set up.

mullinmax commented 7 months ago

Can confirm this seems to be a Vikunja + flame incompatibility.