Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Frontend error makes it impossible to do anything with Revolt #111

Closed
JVT038 opened this issue Oct 19, 2024 · 2 comments
Closed

bug: Frontend error makes it impossible to do anything with Revolt #111

JVT038 opened this issue Oct 19, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@JVT038
Copy link

JVT038 commented Oct 19, 2024

What happened?

The problem

When I visit my Revolt instance, I see the following error with Firefox:
Image

Strangely enough, with Chrome I get a different error:
Image

Firefox error in text:

w<@https://mydomain.com/assets/Login.4910d9cf.js:1:12487
observer/ar/<@https://mydomain.com/assets/main.6f5b3d00.js:134:51427
useObserver/<@https://mydomain.com/assets/main.6f5b3d00.js:134:50450
trackDerivedFunction$1@https://mydomain.com/assets/main.6f5b3d00.js:114:20016
er.track@https://mydomain.com/assets/main.6f5b3d00.js:114:26644
useObserver@https://mydomain.com/assets/main.6f5b3d00.js:134:50426
ar@https://mydomain.com/assets/main.6f5b3d00.js:134:51397
O$4@https://mydomain.com/assets/main.6f5b3d00.js:1:10247
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7692
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
L$5@https://mydomain.com/assets/main.6f5b3d00.js:1:9345
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:8166
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
L$5@https://mydomain.com/assets/main.6f5b3d00.js:1:9345
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:8166
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
L$5@https://mydomain.com/assets/main.6f5b3d00.js:1:9345
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:8166
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
w$8@https://mydomain.com/assets/main.6f5b3d00.js:1:3465
j$6@https://mydomain.com/assets/main.6f5b3d00.js:1:7952
g$7/<@https://mydomain.com/assets/main.6f5b3d00.js:1:2714
g$7@https://mydomain.com/assets/main.6f5b3d00.js:1:2592

Chrome error in text:

Revolt has crashed. Here's the error:
TypeError: Cannot read properties of undefined (reading 'invite_only')
    at https://mydomain.com/assets/Login.4910d9cf.js:1:12505
    at https://mydomain.com/assets/main.6f5b3d00.js:134:51427
    at https://mydomain.com/assets/main.6f5b3d00.js:134:50450
    at trackDerivedFunction$1 (https://mydomain.com/assets/main.6f5b3d00.js:114:20016)
    at er.track (https://mydomain.com/assets/main.6f5b3d00.js:114:26622)
    at useObserver (https://mydomain.com/assets/main.6f5b3d00.js:134:50426)
    at _$6.ar [as constructor] (https://mydomain.com/assets/main.6f5b3d00.js:134:51397)
    at _$6.O$4 [as render] (https://mydomain.com/assets/main.6f5b3d00.js:1:10247)
    at j$6 (https://mydomain.com/assets/main.6f5b3d00.js:1:7692)
    at https://mydomain.com/assets/main.6f5b3d00.js:1:2714
This error has been automatically reported.

Setup

I'm not using Caddy, but Traefik:

version: '3.8'
name: revolt
networks:
  traefik:
    external: true
    name: traefik_proxy
  default:

services:
  # MongoDB database
  database:
    image: mongo:4.4.6
    restart: always
    volumes:
      - $DOCKERDIR/revolt/2/data/db:/data/db

  # Redis server
  redis:
    image: eqalpha/keydb:unstable
    restart: always

  # S3-compatible storage server
  minio:
    image: minio/minio
    command: server /data
    env_file: .env
    volumes:
      - $DOCKERDIR/revolt/2/data/minio:/data
    restart: always
    environment:
      MINIO_BROWSER_REDIRECT_URL: https://console.s3.${DOMAIN}
      MINIO_ROOT_USER: ${MINIO_ROOT_USER}
      MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      # HTTP Routers
      - traefik.http.routers.revolt-minio-rtr.rule=Host(`console.s3.${DOMAIN}`)
      - traefik.http.routers.revolt-minio-rtr.tls=true
      - traefik.http.routers.revolt-minio-rtr.entrypoints=https
      - traefik.http.routers.revolt-minio-rtr.service=revolt-minio-svc
      - traefik.http.routers.revolt-minio-rtr.middlewares=chain-basic-lan@file
      # HTTP services
      - traefik.http.services.revolt-minio-svc.loadbalancer.server.port=8000

  # Caddy web server
#   caddy:
#     image: caddy
#     restart: always
#     env_file: .env
#     ports:
#       - "80:80"
#       - "443:443"
#     volumes:
#       - $DOCKERDIR/revolt/2/Caddyfile:/etc/caddy/Caddyfile
#       - $DOCKERDIR/revolt/2/data/caddy-data:/data
#       - $DOCKERDIR/revolt/2/data/caddy-config:/config

  # API server (delta)
  api:
    image: ghcr.io/revoltchat/server:20240929-1
    env_file: .env
    depends_on:
      - database
      - redis
    #   - caddy
    volumes:
      - $DOCKERDIR/revolt/2/Revolt.toml:/Revolt.toml
    restart: always
    networks:
      - default
      - traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      # HTTP Routers
      - traefik.http.routers.revolt-api-rtr.rule=Host(`${DOMAIN}`) && PathPrefix(`/api`)
      - traefik.http.routers.revolt-api-rtr.tls=true
      - traefik.http.routers.revolt-api-rtr.entrypoints=https
      - traefik.http.routers.revolt-api-rtr.middlewares=chain-basic@file
    #   - traefik.http.routers.revolt-api-rtr.priority=10
      # HTTP services
    # - traefik.http.routers.revolt-api-rtr.service=revolt-api-svc    
    #   - traefik.http.services.revolt-api-svc.loadbalancer.server.port=14702
      - traefik.http.middleware.revolt-api-stripprefix.stripprefix.prefixes=/api

  # Events service (quark)
  events:
    image: ghcr.io/revoltchat/bonfire:20240929-1
    env_file: .env
    depends_on:
      - database
      - redis
    #   - caddy
    volumes:
      - $DOCKERDIR/revolt/2/Revolt.toml:/Revolt.toml
    restart: always
    networks:
      - default
      - traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      - traefik.http.routers.revolt-events-rtr.entrypoints=https
      - traefik.http.routers.revolt-events-rtr.rule=Host(`${DOMAIN}`) && Path(`/ws`)
      - traefik.http.routers.revolt-events-rtr.middlewares=chain-basic@file
    #   - traefik.http.routers.revolt-events-rtr.priority=10
      - traefik.http.routers.revolt-events-rtr.tls=true
      - traefik.http.routers.revolt-events-rtr.tls.certResolver=https
    #   - traefik.http.routers.revolt-events-rtr.service=revolt-events-svc
    #   - traefik.http.services.revolt-events-svc.loadbalancer.server.port=14703

  # Web App (revite)
  web:
    image: ghcr.io/revoltchat/client:master
    env_file: .env
    # depends_on:
    #   - caddy
    restart: always
    networks:
      - default
      - traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      - traefik.http.routers.revolt-web-rtr.entrypoints=https
      - traefik.http.routers.revolt-web-rtr.rule=Host(`${DOMAIN}`)
      - traefik.http.routers.revolt-web-rtr.middlewares=chain-basic@file
    #   - traefik.http.routers.revolt-web-rtr.priority=5
      - traefik.http.routers.revolt-web-rtr.tls=true
      - traefik.http.routers.revolt-web-rtr.tls.certResolver=https
      # - traefik.http.routers.revolt-web-rtr.service=revolt-web-svc
      # - traefik.http.services.revolt-web-svc.loadbalancer.server.port=5000

  # File server (autumn)
  autumn:
    image: ghcr.io/revoltchat/autumn:1.1.11
    env_file: .env
    depends_on:
      - database
      - createbuckets
    #   - caddy
    environment:
      - AUTUMN_MONGO_URI=mongodb://database
    restart: always
    networks:
      - default
      - traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      - traefik.http.routers.revolt-autumn-rtr.rule=Host(`${DOMAIN}`) && PathPrefix(`/autumn`)
      - traefik.http.routers.revolt-autumn-rtr.entrypoints=https
      - traefik.http.routers.revolt-autumn-rtr.middlewares=chain-basic@file
    #   - traefik.http.routers.revolt-autumn-rtr.priority=10
      - traefik.http.routers.revolt-autumn-rtr.tls=true
      - traefik.http.routers.revolt-autumn-rtr.tls.certResolver=https
    #   - traefik.http.routers.revolt-autumn-rtr.service=revolt-autumn-svc
    #   - traefik.http.services.revolt-autumn-svc.loadbalancer.server.port=14704

  # Metadata and image proxy (january)
  january:
    image: ghcr.io/revoltchat/january:0.3.5
    # depends_on:
    #   - caddy
    restart: always
    networks:
      - default
      - traefik
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy
      - traefik.http.routers.revolt-january-rtr.rule=Host(`${DOMAIN}`) && PathPrefix(`/january`)
      - traefik.http.routers.revolt-january-rtr.entrypoints=https
      - traefik.http.routers.revolt-january-rtr.middlewares=chain-basic@file
    #   - traefik.http.routers.revolt-january-rtr.priority=10
      - traefik.http.routers.revolt-january-rtr.tls=true
      - traefik.http.routers.revolt-january-rtr.tls.certResolver=https
    #   - traefik.http.routers.revolt-january-rtr.service=revolt-january-svc
    #   - traefik.http.services.revolt-january-svc.loadbalancer.server.port=7000

  # Create buckets for minio.
  createbuckets:
    image: minio/mc
    depends_on:
      - minio
    env_file: .env
    entrypoint: >
      /bin/sh -c "
      /usr/bin/mc config host add minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD;
      while ! /usr/bin/mc ready minio; do echo 'Waiting minio...' && sleep 1; done;
      /usr/bin/mc mb minio/attachments;
      /usr/bin/mc mb minio/avatars;
      /usr/bin/mc mb minio/backgrounds;
      /usr/bin/mc mb minio/icons;
      /usr/bin/mc mb minio/banners;
      /usr/bin/mc mb minio/emojis;
      exit 0;
      "
@JVT038 JVT038 added the bug Something isn't working label Oct 19, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Untriaged in Revolt Project Oct 19, 2024
@insertish
Copy link
Member

Check REVOLT_PUBLIC_URL is correct, presumably it's not pointing to the API server.

@insertish
Copy link
Member

Closing stale.

@insertish insertish closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Untriaged to ✅ Done in Revolt Project Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants