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

IOS problem with upload #9216

Closed
1 of 3 tasks
Smiehoo opened this issue May 2, 2024 · 21 comments
Closed
1 of 3 tasks

IOS problem with upload #9216

Smiehoo opened this issue May 2, 2024 · 21 comments

Comments

@Smiehoo
Copy link

Smiehoo commented May 2, 2024

The bug

On iOS (iPhone 15 Pro) photos are no uploaded on server when I open the app. The upload stuck. I must restart app and then the photos are on timeline but with wrong cloud indicator. Cloud icons show there are only on mobile but I have this photos on server (web). I have second phone with Android 13 and there everything works perfect.

The OS that Immich Server is running on

Synology DSM

Version of Immich Server

1.103.1

Version of Immich Mobile App

1.103.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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

  immich-microservices:
    container_name: immich-mcs
    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
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich-mlr
    # 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:
      - /volume1/docker/immich-model:/cache
    env_file:
      - .env
    restart: always

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

  database:
    container_name: immich-db
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

Your .env content

x

Reproduction steps

1. Take a photos.
2. Open app.
3. No new photos are show on timeline but backup icon show thats something is in progress.
4. Detail info about uploading file show no file uploading progress,
5. Restart app.
6. New photos is now on timeline but cloud icon show thats only on mobile (but in fact there is copy on server (visible on web).
7. Logs show error below.

Relevant log output

PlatformDispatcher - Catch all
type '_Map<String, dynamic>' is not a subtype of type 'String' in type cast
#0 _CastListBase.[] (dart:_internal/cast.dart:99)
#1 ListBase.toList (dart:collection/list.dart:225)
#2 AuditDeletesResponseDto.fromJson (package:openapi/model/audit_deletes_response_dto.dart:54)
#3 ApiClient.fromJson (package:openapi/api_client.dart:262)
#4 ApiClient.deserialize (package:openapi/api_client.dart:158)

#5 AuditApi.getAuditDeletes (package:openapi/api/audit_api.dart:74)

#6 AssetService._getRemoteAssetChanges (package:immich_mobile/shared/services/asset.service.dart:57)

#7 SyncService._syncRemoteAssetChanges (package:immich_mobile/shared/services/sync.service.dart:161)

#8 SyncService.syncRemoteAssetsToDb. (package:immich_mobile/shared/services/sync.service.dart:53)

#9 AssetService.refreshRemoteAssets (package:immich_mobile/shared/services/asset.service.dart:45)

#10 AssetNotifier.getAllAsset (package:immich_mobile/shared/providers/asset.provider.dart:52)

Additional information

No response

@cgeheim
Copy link

cgeheim commented May 2, 2024

same here also on IOS

@raisinbear
Copy link
Contributor

Try to log out in the mobile app and back in. Fixed it for me, also see #9065.

@schinken
Copy link

schinken commented May 2, 2024

Same here on android btw. Login/Logout as mentioned by @raisinbear fixed it also

@flyotlin
Copy link
Contributor

flyotlin commented May 3, 2024

same here, but logout/login not fixing the issue

@domocorn
Copy link

domocorn commented May 3, 2024

A login/logout on iOS does not work for me in this instance. iOS 17.2.1 App and server version same as original issue

@alextran1502
Copy link
Contributor

alextran1502 commented May 3, 2024

@fyfrey What do you think about the error that could cause such parsing issue on audit_deletes_response_dto? We are not using this anymore in the new sync PR, correct?

@fyfrey
Copy link
Contributor

fyfrey commented May 3, 2024

No idea, it's generated open API code. We'd need to see the actual JSON.
The new sync does not use this method/API anymore

@Smiehoo
Copy link
Author

Smiehoo commented May 3, 2024

Login/logout partial works (previous wrong marked photos it is now ok) for couple hours and the problem back.

@sidamos
Copy link

sidamos commented May 4, 2024

Just installed Immich and have a similar problem on iOS. I take a new photo, navigate to the app and the photo shows. Then it seems to take forever to automatically upload using the foreground backup.
When I tap on the cloud icon and stop the backup and manually start it again, it is finished super fast.
Workaround for me: While the automatic foreground upload takes forever, lock the screen and unlock it again. Then the upload finishes fast. Seems to have the same effect as stop and start backup.

@Smiehoo
Copy link
Author

Smiehoo commented May 4, 2024

I think problem is not with uploading to server but with detecting new photos on local phone storage and accessing to this new photos. I tested this some more. I turned off autobackup, taked new photos and open Immich app. Immich was not detect that new photos was taken but when I closed app and restart this new photos was showed at once. The manual backup to server was very fast after that.

@raisinbear
Copy link
Contributor

A login/logout on iOS does not work for me in this instance. iOS 17.2.1 App and server version same as original issue

Right, it took a while, but the issue came back for me, too, on two different iOS devices.

@alextran1502
Copy link
Contributor

@raisinbear The fix is in and I believe should fix it in the next release

@schinken
Copy link

@alextran1502 Just for curiosity do you have a pr/commit link for me?

@alextran1502
Copy link
Contributor

@schinken #9295

@sidamos
Copy link

sidamos commented May 14, 2024

Is that fix in version 1.104.0? I have iOS app version 1.104.0 and server version 1.104.0 and the foreground sync is still wonky:

  • I take a photo
  • I open Immich app
  • the photo does not appear but sync starts
  • sync takes forever
  • I lock and unlock the screen
  • a few seconds later sync stops and the photo appears, but it has the wrong icon (cloud without content)
  • I force refresh the timeline and then the photo has the right icon (cloud with checkmark)
    I can provide logs if needed.

@alextran1502
Copy link
Contributor

@sidamos it is fixed and will be available in the next release

@sidamos
Copy link

sidamos commented May 14, 2024

@alextran1502 Just checked the release log of 1.104.0 and it says:

Revert "feat(android) Check server is reachable before starting background backup (#8989)" by @alextran1502 in #9324

This is the fix that you mentioned here, so it should be in 1.104.0?

@alextran1502
Copy link
Contributor

No, the actual fix is #9479

@sidamos
Copy link

sidamos commented May 15, 2024

Still not working reliable with server v.1.105.1 and iOS app v1.105.1. It is a bit better sometimes, but not fixed.
1st try:

  • I take a new photo
  • I start Immich app
  • foreground sync starts
  • the new photo appears in the app, cloud icon without checkmark
  • sync spins forever
  • to fix it, I lock and unlock the phone
  • shortly after that, sync is finished
  • shortly after that, cloud icon has the checkmark

2nd try:

  • I take a new photo
  • I start Immich app
  • foreground sync starts,
  • new photo does not appear
  • sync spins forever
  • to fix it, I lock and unlock the phone
  • shortly after that, sync is finished
  • the new photo appears in the app, cloud icon without checkmark
  • after multiple pulls to refresh, the cloud icon has the checkmark

@Smiehoo
Copy link
Author

Smiehoo commented May 15, 2024

Still not working reliable with server v.1.105.1 and iOS app v1.105.1. It is a bit better sometimes, but not fixed. 1st try:
......"

Yes, it is better, but still, something is not right. I got the same symptoms.

Maybe upload is too soon? Before app, check new photos?

When autobackup is off new photos appear very quick and manual backup is very fast.

@sidamos
Copy link

sidamos commented May 15, 2024

Also, background sync works fine (if you have a valid SSL cert).

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

9 participants