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

Clicking Networking setting throws exception if Server Endpoint URL is empy at first launch of app #16244

Open
1 of 3 tasks
dearliuliu0522 opened this issue Feb 21, 2025 · 0 comments

Comments

@dearliuliu0522
Copy link

The bug

When launching app first time, click the settings icon:

Image
Then click Networking:

Image

Then below happens:

Image

The OS that Immich Server is running on

Windows 10

Version of Immich Server

v1.126.1

Version of Immich Mobile App

v1.126.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:905c4ee67b8e0aa955331960d2aa745781e6bd89afc44a8584bfd13bc890f0ae
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: always

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

Just as description above:

  1. When launching app first time, click the settings icon:

Image

  1. Then click Networking:

Image

  1. Then below happens:

Image

Relevant log output

======== Exception caught by widgets library =======================================================
The following StoreKeyNotFoundException was thrown building NetworkingSettings(dirty, state: _ConsumerState#c7902):
Key - <serverEndpoint> not available in Store

The relevant error-causing widget was: 
  NetworkingSettings NetworkingSettings:file:///D:/1_project/flutter/immich/mobile/lib/pages/common/settings.page.dart:67:44
When the exception was thrown, this was the stack: 
#0      StoreService.get (package:immich_mobile/domain/services/store.service.dart:72:7)
#1      NetworkingSettings.build (package:immich_mobile/widgets/settings/networking_settings/networking_settings.dart:21:35)
#2      _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:476:19)
#3      StatefulElement.build (package:flutter/src/widgets/framework.dart:5729:27)
#4      ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:539:20)
#5      HookElement.build (package:flutter_hooks/src/framework.dart:438:27)
#6      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5617:15)
#7      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#8      Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#9      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599:5)
#10     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5771:11)
#11     ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593:5)
...     Normal element mounting (25 frames)
#36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468:16)
#37     MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7035:36)
#38     MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:7047:32)
...     Normal element mounting (344 frames)
#382    Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468:16)
#383    MultiChildRenderObjectElement.inflateWidget (package:flutter/src/widgets/framework.dart:7035:36)
#384    Element.updateChild (package:flutter/src/widgets/framework.dart:3963:18)
#385    Element.updateChildren (package:flutter/src/widgets/framework.dart:4150:32)
#386    MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:7060:17)
#387    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#388    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#389    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#390    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#391    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#392    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#393    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#394    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#395    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#396    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#397    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#398    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#399    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#400    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#401    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#402    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#403    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#404    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#405    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#406    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#407    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#408    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#409    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#410    _InheritedNotifierElement.update (package:flutter/src/widgets/inherited_notifier.dart:105:11)
#411    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#412    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#413    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#414    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#415    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#416    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#417    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#418    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#419    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#420    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#421    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#422    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6907:14)
#423    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#424    SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6907:14)
#425    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#426    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#427    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#428    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#429    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#430    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#431    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#432    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#433    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#434    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#435    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#436    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#437    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#438    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#439    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#440    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#441    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#442    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#443    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#444    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#445    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#446    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#447    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#448    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#449    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#450    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#451    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#452    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#453    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#454    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#455    StatefulElement.update (package:flutter/src/widgets/framework.dart:5803:5)
#456    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#457    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#458    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#459    StatelessElement.update (package:flutter/src/widgets/framework.dart:5693:5)
#460    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#461    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#462    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#463    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#464    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#465    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#466    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#467    ProxyElement.update (package:flutter/src/widgets/framework.dart:5946:5)
#468    Element.updateChild (package:flutter/src/widgets/framework.dart:3941:15)
#469    ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642:16)
#470    StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780:11)
#471    Element.rebuild (package:flutter/src/widgets/framework.dart:5333:7)
#472    BuildScope._tryRebuild (package:flutter/src/widgets/framework.dart:2693:15)
#473    BuildScope._flushDirtyElements (package:flutter/src/widgets/framework.dart:2752:11)
#474    BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3048:18)
#475    WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1162:21)
#476    RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:468:5)
#477    SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397:15)
#478    SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318:9)
#479    SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176:5)
#480    _invoke (dart:ui/hooks.dart:312:13)
#481    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:5)
#482    _drawFrame (dart:ui/hooks.dart:283:31)
====================================================================================================

Additional information

I locate the problem code as below:
Image

Maybe it should have a non null judgement while getting endpoint from Store, or should prohibit clicking "Networking" if endpoint is empty?

Thank you very much for your open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant