immich icon indicating copy to clipboard operation
immich copied to clipboard

Android - OpenCamera ignore some photos and not uploading

Open ScaredyCat opened this issue 1 year ago • 14 comments

The bug

Today I took some photos at my workshop of a cutting board I made. Those pictures appear in Google photos application, they do not show up anywhere in the Immich android app.

The images are stored in /storage/emulated/0/DCIM/OpenCamera but the OpenCamera backup album in Immich doesn't show them. There's an OpenCamera album in the 'select albums' section but Immich doesn't appear to refresh this automatically and I can't see how to force it to do so. The Immich app sees 1730 images in that album but there are 1783 if I look in that album in the file manager - which leads me to suspect it's ignored some other images too.

When I first installed the app it uploaded fine and the images that were created beforehand were all uploaded (11,471) without issue. The screenshots that I've uploaded here were automatically uploaded, I did nothing other than crop one of them

Screenshot_20240817-224739~2 Screenshot_20240817-190836 Screenshot_20240817-224651

The OS that Immich Server is running on

Proxmox -> Docker -> Linux 506c1393a36b 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 GNU/Linux

Version of Immich Server

v1.112.1

Version of Immich Mobile App

1.112.1 build 15.4

Platform with the issue

  • [ ] Server
  • [ ] Web
  • [X] 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:3001
    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:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
    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='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --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=/mnt/data/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
DB_PASSWORD=mypasswordhere

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=mypostgresuser
DB_DATABASE_NAME=mydatabasename

Reproduction steps

1. Turn on background and foreground backups
2. Select folders to be backed up
3. Take pictures with OpenCamera
4. Images are never synced.

Relevant log output

No response

Additional information

No response

ScaredyCat avatar Aug 17 '24 21:08 ScaredyCat

Can you select only OpenCamera, then take a photo and see if it shows up

alextran1502 avatar Aug 17 '24 22:08 alextran1502

Can you select only OpenCamera, then take a photo and see if it shows up

Tried this. No images backed up and image doesn't appear in the app timeline. I turned logging to 'Finest' and, on the surface, it appears that the app sees no changes in the album.

Screenshot_20240818-114019

ScaredyCat avatar Aug 18 '24 10:08 ScaredyCat

@ScaredyCat Can you go into the App Settings > Advanced > clear duplicate and check again?

What phone model is this? And if you take a photo using the stock camera app, what happens?

alextran1502 avatar Aug 18 '24 13:08 alextran1502

Clear duplicates did not work.

Taking a picture with standard camera app and it's uploaded as expected.

OnePlus 5 running android 10.

Just as a quick test I completely removed OpenCamera. Set all the defaults to use the standard camera and took some pictures. They were uploaded fine. I then reinstalled OpenCamera and took some pictures and those too uploaded fine.

My cutting board photos haven't uploaded though and they still don't appear in the app timeline. I presume those images have been marked as done or something, even thought they haven't actually completed.

So sort of solved-not_solved.

ScaredyCat avatar Aug 18 '24 16:08 ScaredyCat

Can you help me grab the full logs on the mobile app?

alextran1502 avatar Aug 19 '24 02:08 alextran1502

Logfile attached

SC_Immich logs 2024-08-19T09_06_45.log

ScaredyCat avatar Aug 19 '24 08:08 ScaredyCat

Can you help clear the Immich app data/app cache and check again?

alextran1502 avatar Aug 19 '24 12:08 alextran1502

Cleared the cache/date re logged in. All the other images show up after a short while except those cutting board ones ones I took in my workshop.

Log file attached after clearing cache/date and logging in again.

sc2_Immich logs 2024-08-19T14_54_49.log

ScaredyCat avatar Aug 19 '24 13:08 ScaredyCat

so just the cutting board ones that are missing? if you take new photos, they still get uploaded, even with OpenCamera?

alextran1502 avatar Aug 19 '24 17:08 alextran1502

Yes, that's the situation now. I have no idea what caused it and why it isn't even seen by the app.

ScaredyCat avatar Aug 19 '24 20:08 ScaredyCat

They must be one shiny cutting board, haha

alextran1502 avatar Aug 19 '24 20:08 alextran1502

Similar #11164 ?

zlo2k avatar Aug 22 '24 07:08 zlo2k

我的也是,有25张照片就是无法上传

zmz125 avatar Aug 25 '24 13:08 zmz125

Similar bug here. Oneplus 6 running LineageOS 21 (Android 14). Camera app is the default org.lineageos.aperture. Images show up in Gallery (org.lineageos.glimpse) fine, and also in Google Photos, but only sporadically show up in Immich. Photos go into /storage/emulated/0/DCIM/Camera/. Looking at the directory structure the only thing I can see which might be tripping up Immich is the fact that there are also images present in the /storage/emulated/0/DCIM/ directory (i.e. one directory up from the location where Apature places them), which were put there by a different app. All images have rw permission to the everybody group.

linuxtim avatar Oct 31 '24 15:10 linuxtim

Similar issue here. Google Pixel 8a running stock Android with default camera app. Images show up in other apps just fine, but some are ignored by immich for sync (and do not show up in the main overview). In the album picker (where you select which albums to sync) there is a preview button behind each directory. The preview DOES show all images, even those which are not picked up by the sync task. Immich does not report issues (as far as I can see).

joostthehost avatar Jan 14 '25 14:01 joostthehost

Same issue Redmy Note 13 5g+. The photos are shown in Immich app but there aren't synced with server. Also, it seems that the app is turning off syncing off randomly :/. I open the settings and can see that syncing on the foreground/background is disabled.

salacr avatar Apr 15 '25 20:04 salacr

I have the same problem. Some pictures I take with the stock camera app on my pixel 8 pro are not shown in immich and not uploaded. Not all pictures but some of them, very strange. I have the latest version installed.

malpre avatar Sep 26 '25 18:09 malpre

I have the same issue. I use the stock google pixel camera app and some pictures do not show up on immich but exist in the stock photos folder.

Gabislak avatar Nov 15 '25 14:11 Gabislak

Have same issue, where some photos from phone Camera album are missing in android immich app. Logging out and back in again helped, images were now found by immich and synced. Issue with this fix is that networking setup has to be re-added again. Found a few reddit threads with this issue, that's where I learned about re-login fix. Would be great to have at least an option to re-scan the local images folder. Using latest 2.2.3 build 3026 android app on android 16, vivo x300. Logs showed no errors.

drulia avatar Nov 16 '25 07:11 drulia