[BUG] Error while getting remote assets: Null check operator used on a null value #1934

Closed
opened 2026-02-05 04:30:10 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @illnesse on GitHub (Jan 4, 2024).

The bug

I'd love to get Immich to work properly as it seems very promising, but i have a few issues with uploading. I've been trying to fix things on and off for months now (sadly didn't have a lot of time for debugging though)

Clients are Web, 2 Androids and one iOS device. all up to date.
Server stack is in Docker, running in an LXC container

When refreshing the "Photos" tab in the app i keep getting following error in the log

from AssetService

#0      AssetResponseDto.fromJson (package:openapi/model/asset_response_dto.dart:310)
#1      ApiClient._deserialize (package:openapi/api_client.dart:239)
#2      ApiClient._deserialize.<anonymous closure> (package:openapi/api_client.dart:502)
#3      MappedListIterable.elementAt (dart:_internal/iterable.dart:415)
#4      ListIterator.moveNext (dart:_internal/iterable.dart:344)
#5      new _List._ofEfficientLengthIterable (dart:core-patch/array.dart:162)
#6      new _List.of (dart:core-patch/array.dart:127)
#7      new List.of (dart:core-patch/array_patch.dart:49)
#8      SetBase.toList (dart:collection/set.dart:119)
#9      ApiClient._deserialize (package:openapi/api_client.dart:503)
#10     ApiClient.deserialize (package:openapi/api_client.dart:158)
<asynchronous suspension>
#11     AssetApi.getAllAssets (package:openapi/api/asset_api.dart:409)
<asynchronous suspension>
#12     AssetService._getRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:72)
<asynchronous suspension>
#13     SyncService._syncRemoteAssetsFull (package:immich_mobile/shared/services/sync.service.dart:209)
<asynchronous suspension>
#14     SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/shared/services/sync.service.dart:53)
<asynchronous suspension>

Probably separate issue but previously uploaded images still have the cloud-dash icon, indicating that it hasn't been uploaded yet:

immich1

i can see the file in /library/admin/2024/2024-01-03/ though

The OS that Immich Server is running on

Ubuntu 22.04

Version of Immich Server

v1.91.4

Version of Immich Mobile App

v1.91.4

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ["start.sh", "immich"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /media/crypt1/:/media/crypt1/:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
     #extends:
       #file: hwaccel.yml
       #service: hwaccel
    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /media/crypt1/:/media/crypt1/:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

UPLOAD_LOCATION=/media/crypt1/Immich
IMMICH_VERSION=release
TYPESENSE_API_KEY=[redacted]
DB_PASSWORD=[redacted]
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=[redacted]
REDIS_HOSTNAME=immich_redis

Reproduction steps

1. open app
2. swipe down to refresh
3. check logs

Additional information

No response

Originally created by @illnesse on GitHub (Jan 4, 2024). ### The bug I'd love to get Immich to work properly as it seems very promising, but i have a few issues with uploading. I've been trying to fix things on and off for months now (sadly didn't have a lot of time for debugging though) Clients are Web, 2 Androids and one iOS device. all up to date. Server stack is in Docker, running in an LXC container When refreshing the "Photos" tab in the app i keep getting following error in the log from AssetService ``` #0 AssetResponseDto.fromJson (package:openapi/model/asset_response_dto.dart:310) #1 ApiClient._deserialize (package:openapi/api_client.dart:239) #2 ApiClient._deserialize.<anonymous closure> (package:openapi/api_client.dart:502) #3 MappedListIterable.elementAt (dart:_internal/iterable.dart:415) #4 ListIterator.moveNext (dart:_internal/iterable.dart:344) #5 new _List._ofEfficientLengthIterable (dart:core-patch/array.dart:162) #6 new _List.of (dart:core-patch/array.dart:127) #7 new List.of (dart:core-patch/array_patch.dart:49) #8 SetBase.toList (dart:collection/set.dart:119) #9 ApiClient._deserialize (package:openapi/api_client.dart:503) #10 ApiClient.deserialize (package:openapi/api_client.dart:158) <asynchronous suspension> #11 AssetApi.getAllAssets (package:openapi/api/asset_api.dart:409) <asynchronous suspension> #12 AssetService._getRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:72) <asynchronous suspension> #13 SyncService._syncRemoteAssetsFull (package:immich_mobile/shared/services/sync.service.dart:209) <asynchronous suspension> #14 SyncService.syncRemoteAssetsToDb.<anonymous closure> (package:immich_mobile/shared/services/sync.service.dart:53) <asynchronous suspension> ``` Probably separate issue but previously uploaded images still have the cloud-dash icon, indicating that it hasn't been uploaded yet: ![immich1](https://github.com/immich-app/immich/assets/40355982/6c637419-7573-496c-96e5-7aba715c7e82) i can see the file in /library/admin/2024/2024-01-03/ though ### The OS that Immich Server is running on Ubuntu 22.04 ### Version of Immich Server v1.91.4 ### Version of Immich Mobile App v1.91.4 ### Platform with the issue - [X] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: ["start.sh", "immich"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /media/crypt1/:/media/crypt1/:ro - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} #extends: #file: hwaccel.yml #service: hwaccel command: ["start.sh", "microservices"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /media/crypt1/:/media/crypt1/:ro - /etc/localtime:/etc/localtime:ro env_file: - stack.env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - stack.env restart: always redis: container_name: immich_redis image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3 restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell UPLOAD_LOCATION=/media/crypt1/Immich IMMICH_VERSION=release TYPESENSE_API_KEY=[redacted] DB_PASSWORD=[redacted] DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=[redacted] REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. open app 2. swipe down to refresh 3. check logs ``` ### Additional information _No response_
OVERLORD added the 📱mobile label 2026-02-05 04:30:10 +03:00
Author
Owner

@brennoflaviodaloopa commented on GitHub (Mar 18, 2024):

Same here but it's preventing login since a few days ago:

#0      UserResponseDto.fromJson (package:openapi/model/user_response_dto.dart:176)
#1      ApiClient.fromJson (package:openapi/api_client.dart:508)
#2      ApiClient.deserialize (package:openapi/api_client.dart:158)
<asynchronous suspension>
#3      UserApi.getMyUserInfo (package:openapi/api/user_api.dart:295)
<asynchronous suspension>
#4      AuthenticationNotifier.setSuccessLoginInfo (package:immich_mobile/modules/login/providers/authentication.provider.dart:185)
<asynchronous suspension>
#5      LoginForm.build.login (package:immich_mobile/modules/login/ui/login_form.dart:152)
<asynchronous suspension>

Screenshot_20240318_134401
Screenshot_20240318_134356

@brennoflaviodaloopa commented on GitHub (Mar 18, 2024): Same here but it's preventing login since a few days ago: ``` #0 UserResponseDto.fromJson (package:openapi/model/user_response_dto.dart:176) #1 ApiClient.fromJson (package:openapi/api_client.dart:508) #2 ApiClient.deserialize (package:openapi/api_client.dart:158) <asynchronous suspension> #3 UserApi.getMyUserInfo (package:openapi/api/user_api.dart:295) <asynchronous suspension> #4 AuthenticationNotifier.setSuccessLoginInfo (package:immich_mobile/modules/login/providers/authentication.provider.dart:185) <asynchronous suspension> #5 LoginForm.build.login (package:immich_mobile/modules/login/ui/login_form.dart:152) <asynchronous suspension> ``` ![Screenshot_20240318_134401](https://github.com/immich-app/immich/assets/141926999/e8d5799c-f563-48db-b2c2-3ac66df9ebef) ![Screenshot_20240318_134356](https://github.com/immich-app/immich/assets/141926999/78820040-502c-48a4-a57f-f0b56267d0ca)
Author
Owner

@alextran1502 commented on GitHub (Mar 18, 2024):

@brennoflaviodaloopa can you make sure your server is on the latest version?

@alextran1502 commented on GitHub (Mar 18, 2024): @brennoflaviodaloopa can you make sure your server is on the latest version?
Author
Owner

@brennoflavio commented on GitHub (Mar 18, 2024):

@brennoflaviodaloopa can you make sure your server is on the latest version?

Confirmed that works on latest version, my bad

@brennoflavio commented on GitHub (Mar 18, 2024): > @brennoflaviodaloopa can you make sure your server is on the latest version? Confirmed that works on latest version, my bad
Author
Owner

@pretorean commented on GitHub (Apr 22, 2024):

Hello @illnesse
I'm trying to reproduce this issue with the server and mobile application version 1.102.3 and everything works fine.
Is this error still relevant?

@pretorean commented on GitHub (Apr 22, 2024): Hello @illnesse I'm trying to reproduce this issue with the server and mobile application version 1.102.3 and everything works fine. Is this error still relevant?
Author
Owner

@shenlong-tanwen commented on GitHub (Apr 7, 2025):

This particular error from the open-api generated code usually comes when there is a mismatch between the server and the mobile app. We have since then added logic to provide backward compatibility to prevent such issues.

@shenlong-tanwen commented on GitHub (Apr 7, 2025): This particular error from the open-api generated code usually comes when there is a mismatch between the server and the mobile app. We have since then added logic to provide backward compatibility to prevent such issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1934