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

Android app - no photos/places at all in the map view: "No photos in this area" #9218

Open
1 of 3 tasks
dgtal1 opened this issue May 2, 2024 · 5 comments
Open
1 of 3 tasks

Comments

@dgtal1
Copy link

dgtal1 commented May 2, 2024

The bug

When I navigate to the map view in the app - it does not show any photos or places. The UI becomes unresponsive - the navigation buttons do not work.
I recorded a video depicting this: https://www.youtube.com/shorts/TUqUN7hTGCs

My source of photos if External library with about 55k photos. DB query run quite fast as my postgre DB is hosted on SSD.
Everything works fine in the web app. It's just the Android app that is failing.

The OS that Immich Server is running on

Synology DSM

Version of Immich Server

v1.103.1

Version of Immich Mobile App

v1.103.1 build.137

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}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
      - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video      
      - /etc/localtime:/etc/localtime:ro
      - "/volume1/photo:/external_originals/photo:ro"
    env_file:
      - .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: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${THUMB_LOCATION}:/usr/src/app/upload/thumbs
      - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video      
      - /etc/localtime:/etc/localtime:ro
      - "/volume1/photo:/external_originals/photo:ro"
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  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_LOCATION}:/cache  #- model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:      
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data    # - pgdata:/var/lib/postgresql/data
    restart: always

    ports:
      - "5433:5432"

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=/volume1/photo/immich_upload
#UPLOAD_LOCATION=./upload
THUMB_LOCATION=./artifacts/thumbs
ENCODED_VIDEO_LOCATION=./artifacts/encoded-video

MODEL_CACHE_LOCATION=./artifacts/model-cache

# 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
DB_PASSWORD=***

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=***
DB_DATABASE_NAME=immich
DB_DATA_LOCATION=./db_data

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Enter the Search view
2. Click 'Your map' tile
3. Observe the issue
...

Relevant log output

2024-05-02 13:08:30.730972 | INFO     | AssetNotifier        | Load partner assets: 811ms |
2024-05-02 13:08:09.332583 | INFO     | AssetNotifier        | Load partner assets: 778ms |
2024-05-02 13:08:03.791186 | INFO     | AssetNotifier        | Load partner assets: 579ms |
2024-05-02 13:07:32.941282 | INFO     | AssetNotifier        | Load partner assets: 503ms |
2024-05-02 13:07:21.171924 | INFO     | AssetNotifier        | Load partner assets: 516ms |
2024-05-02 13:06:28.473824 | INFO     | AssetNotifier        | Load partner assets: 478ms |
2024-05-02 13:05:45.005090 | INFO     | AssetNotifier        | Load partner assets: 452ms |
2024-05-02 13:01:24.349887 | INFO     | AssetNotifier        | Load partner assets: 680ms |
2024-05-02 12:23:51.085616 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | PlatformException(error, Calling addLayer when a newer style is loading/has loaded., null, java.lang.IllegalStateException: Calling addLayer when a newer style is loading/has loaded.
	at com.mapbox.mapboxsdk.maps.a0.y(Unknown Source:19)
	at com.mapbox.mapboxsdk.maps.a0.c(Unknown Source:2)
	at com.mapbox.mapboxgl.MapboxMapController.X(Unknown Source:34)
	at com.mapbox.mapboxgl.MapboxMapController.onMethodCall(Unknown Source:1147)
	at n8.j$a.a(Unknown Source:17)
	at b8.c.l(Unknown Source:18)
	at b8.c.m(Unknown Source:41)
	at b8.c.i(Unknown Source:0)
	at b8.b.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Unknown Source:2)
	at android.os.Handler.dispatchMessage(Unknown Source:4)
	at android.os.Looper.loopOnce(Unknown Source:182)
	at android.os.Looper.loop(Unknown Source:82)
	at android.app.ActivityThread.main(Unknown Source:123)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
	at com.android.internal.os.ZygoteInit.main(Unknown Source:312)
) |
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      MethodChannelMaplibreGl.addHeatmapLayer (package:maplibre_gl_platform_interface/src/method_channel_maplibre_gl.dart:780)
<asynchronous suspension>
#3      MaplibreMapController.addHeatmapLayer (package:maplibre_gl/src/controller.dart:655)
<asynchronous suspension>
#4      MapMarkers.reloadAllLayersForMarkers (package:immich_mobile/extensions/maplibrecontroller_extensions.dart:43)
<asynchronous suspension>

2024-05-02 12:23:48.417977 | INFO     | AssetNotifier        | Load partner assets: 986ms |
2024-05-02 13:08:09.332583 | INFO     | AssetNotifier        | Load partner assets: 778ms |
2024-05-02 13:08:03.791186 | INFO     | AssetNotifier        | Load partner assets: 579ms |
2024-05-02 13:07:32.941282 | INFO     | AssetNotifier        | Load partner assets: 503ms |
2024-05-02 13:07:21.171924 | INFO     | AssetNotifier        | Load partner assets: 516ms |
2024-05-02 13:06:28.473824 | INFO     | AssetNotifier        | Load partner assets: 478ms |
2024-05-02 13:05:45.005090 | INFO     | AssetNotifier        | Load partner assets: 452ms |
2024-05-02 13:01:24.349887 | INFO     | AssetNotifier        | Load partner assets: 680ms |
2024-05-02 12:23:51.085616 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | PlatformException(error, Calling addLayer when a newer style is loading/has loaded., null, java.lang.IllegalStateException: Calling addLayer when a newer style is loading/has loaded.
	at com.mapbox.mapboxsdk.maps.a0.y(Unknown Source:19)
	at com.mapbox.mapboxsdk.maps.a0.c(Unknown Source:2)
	at com.mapbox.mapboxgl.MapboxMapController.X(Unknown Source:34)
	at com.mapbox.mapboxgl.MapboxMapController.onMethodCall(Unknown Source:1147)
	at n8.j$a.a(Unknown Source:17)
	at b8.c.l(Unknown Source:18)
	at b8.c.m(Unknown Source:41)
	at b8.c.i(Unknown Source:0)
	at b8.b.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Unknown Source:2)
	at android.os.Handler.dispatchMessage(Unknown Source:4)
	at android.os.Looper.loopOnce(Unknown Source:182)
	at android.os.Looper.loop(Unknown Source:82)
	at android.app.ActivityThread.main(Unknown Source:123)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
	at com.android.internal.os.ZygoteInit.main(Unknown Source:312)
) |
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334)
<asynchronous suspension>
#2      MethodChannelMaplibreGl.addHeatmapLayer (package:maplibre_gl_platform_interface/src/method_channel_maplibre_gl.dart:780)
<asynchronous suspension>
#3      MaplibreMapController.addHeatmapLayer (package:maplibre_gl/src/controller.dart:655)
<asynchronous suspension>
#4      MapMarkers.reloadAllLayersForMarkers (package:immich_mobile/extensions/maplibrecontroller_extensions.dart:43)
<asynchronous suspension>

Additional information

In the web app it takes about 6-8 seconds to show the places on the map every time I tried. In the mobile app I wanted over 30 seconds and nothing. Tried multiple times as well.

The same happens on my iPad with the iPadOS immich app including UI being frozen/unresponsive.

@dgtal1 dgtal1 changed the title Android app - no photos/places at all in the map view Android app - no photos/places at all in the map view: "No photos in this area" May 2, 2024
@schuhbacca
Copy link

Is this over proxy or local ip?

@dgtal1
Copy link
Author

dgtal1 commented May 2, 2024

Is this over proxy or local ip?

Both. Doesn't matter how I acccess my immich instance in the app - via local IP or proxy.

New finding: after waiting for ages something gets loaded finally - looks like an image from a thermal camera. Altough the performance is still terrible and the buttons are frozen for a long while when I move the map.

There's a huge performance difference between the web app and the mobile apps. The initial view doesn't freeze in the web app and it's responsive all the time. The mobile apps need 3 times as much time to render the initial view with all the photos.
I think the thermal map rendering may be the problem. It looks nice, but doesn't really add much value to me. The simpler view of the web app is much faster.
Actually I very much like how Photoprism does this. It's fast and shows round thumbs from the places rather than just colored circles. The overall look is better. Perhaps an idea immich could borrow from it 😉

@schuhbacca
Copy link

Bug for mobile app performance is open here: #4174

@alextran1502
Copy link
Contributor

@dgtal1 fyi, we are looking at reworking these mechanism for the mobile app. Right now it is fetching all data before building the UI, since it was coming from my initial naive design where I don't have a lot of data to begin with 😅. We plan to make those into streaming and rebuilding at the same time instead.

@dgtal1
Copy link
Author

dgtal1 commented May 2, 2024

@dgtal1 fyi, we are looking at reworking these mechanism for the mobile app. Right now it is fetching all data before building the UI, since it was coming from my initial naive design where I don't have a lot of data to begin with 😅. We plan to make those into streaming and rebuilding at the same time instead.

Great news. Thanks and looking forward!

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

3 participants