[BUG] immich-web container unable to find /sw.js #589

Closed
opened 2026-02-04 21:26:13 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @Mortein on GitHub (Jan 17, 2023).

Describe the bug
The immich-web container is unable to find /sw.js and throws an error constantly.

Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • I have read thoroughly the README setup and installation instructions.
  • I have included my docker-compose file.
  • I have included my redacted .env file.
  • I have included information on my machine, and environment.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the logs for the immich-web container: docker-compose logs -tf immich-web or docker-compose logs -tf immich_web
  2. Browse to Immich
  3. Error that /sw.js cannot be found, repeats every 10-ish seconds for as long as Immich website is open

Expected behavior
No error displayed in log

Log

tier3-immich-web-1  | 2023-01-17T09:10:39.051409210Z Error: Not found: /sw.js
tier3-immich-web-1  | 2023-01-17T09:10:39.051434806Z     at resolve (file:///usr/src/app/build/server/index.js:3011:18)
tier3-immich-web-1  | 2023-01-17T09:10:39.051437637Z     at resolve (file:///usr/src/app/build/server/index.js:2898:34)
tier3-immich-web-1  | 2023-01-17T09:10:39.051439470Z     at Object.handle (file:///usr/src/app/build/server/chunks/hooks.server-0cd76f6e.js:2:16)
tier3-immich-web-1  | 2023-01-17T09:10:39.051441068Z     at respond (file:///usr/src/app/build/server/index.js:2896:42)

System

  • Server Version: v1.41.1
  • Client OS: Windows 10
  • Browser: Firefox 108.02

Additional context

Snippet of docker-compose.yaml for immich containers. I don't use container names as there cannot be multiple containers with the same name (which makes it difficult to run multiple instances at the same time).

  immich-server:
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-server.sh" ]
    volumes:
      - immich_nfs:/usr/src/app/upload
    env_file:
      - environment/production/immich.env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich_redis
      - immich_db
    restart: unless-stopped

  immich_redis:
    # container_name: immich_redis
    image: redis:6.2
    restart: unless-stopped

  immich_db:
    # container_name: immich_postgres
    image: postgres:14
    env_file:
      - environment/production/immich.env
    volumes:
      - /data/immich/db:/var/lib/postgresql/data
    restart: unless-stopped

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: [ "/bin/sh", "./start-microservices.sh" ]
    volumes:
      - immich_nfs:/usr/src/app/upload
    env_file:
      - environment/production/immich.env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich_redis
      - immich_db
    restart: unless-stopped

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
    volumes:
      - immich_nfs:/usr/src/app/upload
    env_file:
      - environment/production/immich.env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich_db
    restart: unless-stopped

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: [ "/bin/sh", "./entrypoint.sh" ]
    env_file:
      - environment/production/immich.env
    restart: unless-stopped

  immich-proxy:
    # container_name: immich_proxy
    image: altran1502/immich-proxy:release
    depends_on:
      - immich-server
      - web
    restart: unless-stopped
    environment:
      VIRTUAL_HOST: "immich.example.com"
      VIRTUAL_PORT: 8080
      LETSENCRYPT_HOST: "immich.example.com"
Originally created by @Mortein on GitHub (Jan 17, 2023). <!-- Note: Please search to see if an issue already exists for the bug you encountered. --> **Describe the bug** The immich-web container is unable to find `/sw.js` and throws an error constantly. **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [x] I have read thoroughly the README setup and installation instructions. - [x] I have included my `docker-compose` file. - [ ] I have included my redacted `.env` file. - [x] I have included information on my machine, and environment. **To Reproduce** Steps to reproduce the behavior: 1. Follow the logs for the immich-web container: `docker-compose logs -tf immich-web` or `docker-compose logs -tf immich_web` 2. Browse to Immich 3. Error that `/sw.js` cannot be found, repeats every 10-ish seconds for as long as Immich website is open **Expected behavior** No error displayed in log **Log** ``` tier3-immich-web-1 | 2023-01-17T09:10:39.051409210Z Error: Not found: /sw.js tier3-immich-web-1 | 2023-01-17T09:10:39.051434806Z at resolve (file:///usr/src/app/build/server/index.js:3011:18) tier3-immich-web-1 | 2023-01-17T09:10:39.051437637Z at resolve (file:///usr/src/app/build/server/index.js:2898:34) tier3-immich-web-1 | 2023-01-17T09:10:39.051439470Z at Object.handle (file:///usr/src/app/build/server/chunks/hooks.server-0cd76f6e.js:2:16) tier3-immich-web-1 | 2023-01-17T09:10:39.051441068Z at respond (file:///usr/src/app/build/server/index.js:2896:42) ``` **System** - Server Version: `v1.41.1` - Client OS: `Windows 10` - Browser: `Firefox 108.02` **Additional context** Snippet of docker-compose.yaml for immich containers. I don't use container names as there cannot be multiple containers with the same name (which makes it difficult to run multiple instances at the same time). ```yaml immich-server: image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-server.sh" ] volumes: - immich_nfs:/usr/src/app/upload env_file: - environment/production/immich.env environment: - NODE_ENV=production depends_on: - immich_redis - immich_db restart: unless-stopped immich_redis: # container_name: immich_redis image: redis:6.2 restart: unless-stopped immich_db: # container_name: immich_postgres image: postgres:14 env_file: - environment/production/immich.env volumes: - /data/immich/db:/var/lib/postgresql/data restart: unless-stopped immich-microservices: image: altran1502/immich-server:release entrypoint: [ "/bin/sh", "./start-microservices.sh" ] volumes: - immich_nfs:/usr/src/app/upload env_file: - environment/production/immich.env environment: - NODE_ENV=production depends_on: - immich_redis - immich_db restart: unless-stopped immich-machine-learning: image: altran1502/immich-machine-learning:release entrypoint: [ "/bin/sh", "./entrypoint.sh" ] volumes: - immich_nfs:/usr/src/app/upload env_file: - environment/production/immich.env environment: - NODE_ENV=production depends_on: - immich_db restart: unless-stopped immich-web: image: altran1502/immich-web:release entrypoint: [ "/bin/sh", "./entrypoint.sh" ] env_file: - environment/production/immich.env restart: unless-stopped immich-proxy: # container_name: immich_proxy image: altran1502/immich-proxy:release depends_on: - immich-server - web restart: unless-stopped environment: VIRTUAL_HOST: "immich.example.com" VIRTUAL_PORT: 8080 LETSENCRYPT_HOST: "immich.example.com" ```
Author
Owner

@Mortein commented on GitHub (Jan 17, 2023):

Sorry, forgot to mention that even with the error, Immich works as expected.

@Mortein commented on GitHub (Jan 17, 2023): Sorry, forgot to mention that even with the error, Immich works as expected.
Author
Owner

@bo0tzz commented on GitHub (Jan 17, 2023):

This is your browser trying to update a serviceworker that was loaded by another application that you previously hosted on the address that Immich is at. Try clearing all your local browser data for your Immich URL, or if that doesn't work give this a try.

@bo0tzz commented on GitHub (Jan 17, 2023): This is your browser trying to update a serviceworker that was loaded by another application that you previously hosted on the address that Immich is at. Try clearing all your local browser data for your Immich URL, or if that doesn't work give [this](https://www.codementor.io/@himank/how-to-unregister-service-workers-n8mzf5jce) a try.
Author
Owner

@Mortein commented on GitHub (Jan 18, 2023):

Thanks @bo0tzz, you were exactly right!

@Mortein commented on GitHub (Jan 18, 2023): Thanks @bo0tzz, you were exactly right!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#589