Closed Orbitally closed 3 months ago
Hello, would it be possible for you to test on ios16 since it is stable?
Hey! Sure, I installed the beta my main day to day devices but I can see if I have an old phone lying around which I can install iOS 16 on to see how that works. I'll see what I can do and keep you posted.
Turns out the device I was thinking of was running the latest version of iOS 15 but the issue is still there on that where it'll upload a couple things and then the app will crash. Are there any logs or anything I could send which would help with this?
Just had the crash happen while I was watching the server logs and this is what popped up:
immich_postgres | 2023-08-23 15:40:15.803 UTC [2655] DETAIL: Key ("ownerId", checksum)=(e275a2cf-9991-4587-90f8-e74424bf42da, \x71727b07c21243f56c136ec36d54effe312623fd) already exists.
immich_postgres | 2023-08-23 15:40:15.803 UTC [2655] STATEMENT: INSERT INTO "assets"("id", "deviceAssetId", "ownerId", "deviceId", "type", "originalPath", "resizePath", "webpPath", "thumbhash", "encodedVideoPath", "createdAt", "updatedAt", "fileCreatedAt", "fileModifiedAt", "isFavorite", "isArchived", "isReadOnly", "checksum", "duration", "isVisible", "livePhotoVideoId", "originalFileName", "sidecarPath") VALUES (DEFAULT, $1, $2, $3, $4, $5, $6, $7, $8, $9, DEFAULT, DEFAULT, $10, $11, $12, $13, $14, $15, $16, $17, DEFAULT, $18, $19) RETURNING "id", "webpPath", "encodedVideoPath", "createdAt", "updatedAt", "isFavorite", "isArchived", "isReadOnly", "isVisible"
immich_server | [Nest] 7 - 08/23/2023, 3:40:37 PM LOG [CommunicationGateway] New websocket connection: ppQ6CTtt10NayOhuAAA0
immich_redis | 1:M 23 Aug 2023 15:41:03.007 * 100 changes in 300 seconds. Saving...
immich_redis | 1:M 23 Aug 2023 15:41:03.007 * Background saving started by pid 190
immich_redis | 190:C 23 Aug 2023 15:41:03.097 * DB saved on disk
immich_redis | 190:C 23 Aug 2023 15:41:03.097 * RDB: 0 MB of memory used by copy-on-write
immich_redis | 1:M 23 Aug 2023 15:41:03.108 * Background saving terminated with success
immich_server | [Nest] 7 - 08/23/2023, 3:41:18 PM ERROR [ExpressAdapter] Premature close
immich_server | Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
immich_server | at new NodeError (node:internal/errors:405:5)
immich_server | at ServerResponse.onclose (node:internal/streams/end-of-stream:154:30)
immich_server | at ServerResponse.emit (node:events:526:35)
immich_server | at emitCloseNT (node:_http_server:996:10)
immich_server | at Socket.onServerResponseClose (node:_http_server:278:5)
immich_server | at Socket.emit (node:events:526:35)
immich_server | at TCP.<anonymous> (node:net:323:12)
immich_server | [Nest] 7 - 08/23/2023, 3:41:18 PM ERROR [ExpressAdapter] Premature close
immich_server | Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
immich_server | at new NodeError (node:internal/errors:405:5)
immich_server | at ServerResponse.onclose (node:internal/streams/end-of-stream:154:30)
immich_server | at ServerResponse.emit (node:events:526:35)
immich_server | at emitCloseNT (node:_http_server:996:10)
immich_server | at Socket.onServerResponseClose (node:_http_server:278:5)
immich_server | at Socket.emit (node:events:526:35)
immich_server | at TCP.<anonymous> (node:net:323:12)
immich_server | [Nest] 7 - 08/23/2023, 3:41:18 PM LOG [CommunicationGateway] Client ppQ6CTtt10NayOhuAAA0 disconnected from Websocket
Not sure if that helps and please let me know if you'd like anything else!
My app keeps crashing for me upon upload - I'm having to babysit the upload.
Same here
Also getting this issue exactly as @Rustymage 's video
Also getting same issue as @Rustymage Unless I "cancel and restart" the upload it will also start over at the first starting point after the crash. Hence need to cancel and restart every now and then to update the progress.
Also getting same issue as @Rustymage Unless I "cancel and restart" the upload it will also start over at the first starting point after the crash. Hence need to cancel and restart every now and then to update the progress.
That's how I babysat it. Cancel after a little bit to lock in the upload, then restarted.
+1 Exact sam issue hier on iOS 17.2.1
Hello everyone, did you manage to overcome the problem somehow? Faced the same thing
Can you guys help provide the mobile app log and the server log?
Ребята, можете ли вы помочь предоставить журнал мобильного приложения и журнал сервера? server logs (ios crash).txt Immich_log_2024-02-16T18_35_28.110792.csv Sreen record from iPhone (iOS 17.2.1) - https://streamable.com/1hmnzc
Hello everyone, did you manage to overcome the problem somehow? Faced the same thing
I babysat it and watched it the whole time.
@alextran1502 I am running into this as well. I could not find anything interesting in the app logs but the crash report looked interesting
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"termination" : {"flags":0,"code":6,"namespace":"SIGNAL","indicator":"Abort trap: 6","byProc":"Runner","byPid":2743},
"ktriageinfo" : "VM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\nVM - (arg = 0x3) mach_vm_allocate_kernel failed within call to vm_map_enter\n",
"asi" : {"libsystem_c.dylib":["abort() called"]},
Iphone 12 Pro IOS 17.2.1 Immich App version 1.94.1 Immich Server version 1.91.4
I can share server and client logs and full crash report if you think they would be helpful
My immich ios app also crashed every time I tried to use the foreground / background upload.
It sometimes even led to my phone getting unresponsive or rebooting. I tried solving it by dumping my icloud onto my server and using the immich cli to upload all the files locally.
But the local upload on the server crashed as well. So I inspected the upload on the server and found that it kept on crashing while trying to upload one big 22GB video file. The file itself was perfectly fine and played when opened on my computer.
However, after removing the video from my icloud (and my iphones gallery), both upload tools (app and cli) worked again.
Maybe auto-exclusion of big files from the upload with a warning would be helpful.
PS: I love using immich, great work and vision!
Got the random crashes again, just took a bit of time for one to appear, so I thought the big files were the problem.
@alextran1502 Here are two iOS crash logs. These happened on server version 1.94.1 and 1.95.1. App version is 1.95.0. I haven't been able to recreate it on my device (pulled these off a friend's device who is seeing multiple crashes). This is his initial backup of a moderate sized library. It doesn't seem to fail on any specific image/video that he can identify, and sometimes goes for 15 minutes without a crash, but other times crashes within a minute.
https://gist.github.com/adambeck7/3bb6104ab558994c98e303e63154f1b8 https://gist.github.com/adambeck7/a5c2b0665354dff3d12488e32077cfb9
I have the same issue. The app will crash randomly while uploading. I am on 1.97.0 build 1.41 on iPhone 15 Pro iOS 17.4 (21E217) and 1.97.0 server. Issue is that logs don't show anything on phone or the server.
Same for me (iPhone 14 Pro / iOS 17.4 / server 1.98.2 / mobile 1.98.1 ) - uploaded only 300 photos in foreground mode and had 5 app crashes. Just a note - I have all my photos stored on iCloud so Immich app downloads fullres version of every photo from iCloud.
I have this issue too. I was hoping to migrate to immich but 120k photos at 100/crash might be a bit ambitious...
@josiahw i assume you are using iCloud for photos. I think there is a bug when reading iCloud asset that cause memory leaked that lead to the crash. I will need to investigate this. For the work around, you can toggle ignore iCloud file for the time being
@alextran1502 but what if all my pics go to iCloud? I have iCloud backup also on so pics do get uploaded on there. If I toggle iCloud off in Immich, Immich will possibly not upload any image?
@josiahw i assume you are using iCloud for photos. I think there is a bug when reading iCloud asset that cause memory leaked that lead to the crash. I will need to investigate this. For the work around, you can toggle ignore iCloud file for the time being
Well, that's not a solution as all of my photos are on iCloud. I hope you can find a solution for this bug. Thanks a lot.
As a workaround you can setup an automation in Shortcuts to automatically launch Immich after crash. Just be sure to add some delay so you don't end up in a loop.
I just enable iCloud this week, so hopefully I can find the cause for this behavior. How long into the upload when you guys start seeing crash?
For me almost instantly - after 200 photos.
It's random for me. Sometimes it will go for 20 mins before crashing. Other times it will crash 1 minute into uploading. Haven't seen it go longer than 20 mins before crashing.
Same issue for me. Crashes every 15-20 minutes. On latest iOS (just upgraded last night).
Any progress on this? Immich is not usable like this unfortunatly
@mvenus2 unfortunately not yet, I have heard that PhotoSync app also has this issue when downloading photos and videos from iCloud
I can also reproduce this issue, it keeps crashing every few hundred media files or so.
https://github.com/immich-app/immich/issues/10410
so basically when you have icloud enabled all your photos are downloading then trying to upload to the server it crashes the iphone app.
Debian Dockercontainer
v1.06
v1.06
#
# 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:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- stack.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:
- stack.env
restart: always
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
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:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT SUM(checksum_failures) 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:
UPLOAD_LOCATION=/mnt/raid6/Photos
DB_DATA_LOCATION=/mnt/ssd1/immich_db
IMMICH_VERSION=release
DB_PASSWORD=xxxxxxxxx
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
1. open ios phone app
2. select every single folder possble
3. backup options -> turn off foreground -> enable background wifi / charging
4. make sure it downloads icloud photos.
5. now open the app and hit the start backup button and watch the magic happen
...
2024-06-16 22:55:33.595191 | INFO | AssetNotifier | Load assets: 842ms |
2024-06-16 22:55:33.595149 | INFO | AlbumService | Syncing completed. Changes: false |
2024-06-16 22:55:33.434677 | INFO | AlbumService | Found 17 device albums |
2024-06-16 22:55:04.151098 | INFO | AssetNotifier | Load assets: 689ms |
2024-06-16 22:55:04.151060 | INFO | AlbumService | Syncing completed. Changes: false |
2024-06-16 22:55:03.996580 | INFO | AlbumService | Found 17 device albums |
2024-06-16 22:52:53.617355 | INFO | BackupNotifier | _getBackupAlbumsInfo: Found 24 available albums |
2024-06-16 22:52:53.616741 | INFO | BackupNotifier | Found 24 local albums |
2024-06-16 22:52:52.713621 | INFO | AssetNotifier | Load assets: 111406ms |
2024-06-16 22:52:52.713577 | INFO | AlbumService | Syncing completed. Changes: false |
2024-06-16 22:52:52.592527 | INFO | AlbumService | Found 17 device albums |
2024-06-16 22:52:51.953911 | INFO | AlbumService | refreshDeviceAlbums is already in progress |
2024-06-16 22:52:51.911520 | WARNING | UserService | Failed to refresh users |
2024-06-16 22:52:51.911456 | WARNING | UserService | Failed to refresh users |
2024-06-16 22:52:51.822272 | WARNING | PartnerService | Failed to get partners for direction PartnerDirection.sharedBy | ApiException 400: HTTP connection failed: GET /partners (Inner exception: Bad file descriptor)
#0 IOClient.send (package:http/src/io_client.dart:96)
<asynchronous suspension>
#1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93)
<asynchronous suspension>
#2 ApiClient.invokeAPI (package:openapi/api_client.dart:101)
<asynchronous suspension>
#3 PartnersApi.getPartners (package:openapi/api/partners_api.dart:102)
<asynchronous suspension>
#4 PartnerService.getPartners (package:immich_mobile/services/partner.service.dart:38)
<asynchronous suspension>
#5 UserService.getUsersFromServer (package:immich_mobile/services/user.service.dart:76)
<asynchronous suspension>
#6 UserService.refreshUsers (package:immich_mobile/services/user.service.dart:115)
<asynchronous suspension>
#7 AlbumService.refreshRemoteAlbums (package:immich_mobile/services/album.service.dart:153)
<asynchronous suspension>
#8 Future.wait.<anonymous closure> (dart:async/future.dart:524)
<asynchronous suspension>
|
2024-06-16 22:52:51.820912 | WARNING | PartnerService | Failed to get partners for direction PartnerDirection.sharedBy | ApiException 400: HTTP connection failed: GET /partners (Inner exception: Bad file descriptor)
#0 IOClient.send (package:http/src/io_client.dart:96)
<asynchronous suspension>
#1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93)
<asynchronous suspension>
#2 ApiClient.invokeAPI (package:openapi/api_client.dart:101)
<asynchronous suspension>
#3 PartnersApi.getPartners (package:openapi/api/partners_api.dart:102)
<asynchronous suspension>
#4 PartnerService.getPartners (package:immich_mobile/services/partner.service.dart:38)
<asynchronous suspension>
#5 UserService.getUsersFromServer (package:immich_mobile/services/user.service.dart:76)
<asynchronous suspension>
#6 UserService.refreshUsers (package:immich_mobile/services/user.service.dart:115)
<asynchronous suspension>
#7 AssetNotifier.getAllAsset (package:immich_mobile/providers/asset.provider.dart:53)
<asynchronous suspension>
|
2024-06-16 22:51:01.144492 | INFO | ApiService | Pinging server with response code 200 |
2024-06-16 22:42:33.380739 | INFO | AssetNotifier | Load assets: 2978ms |
2024-06-16 22:42:33.380718 | INFO | AlbumService | Syncing completed. Changes: true |
2024-06-16 22:42:33.380692 | INFO | SyncService | Removed 380 and updated 93 local assets from DB |
2024-06-16 22:42:33.312793 | INFO | SyncService | Synced changes of local album Favorites to DB |
2024-06-16 22:42:33.134606 | INFO | SyncService | Synced changes of local album Videos to DB |
2024-06-16 22:42:33.116734 | WARNING | SyncService | Ignored 1 duplicate assets on device |
2024-06-16 22:42:33.116588 | INFO | SyncService | Ignoring duplicate assets on device:
{
"id": "N/A",
"remoteId": "N/A",
"localId": "C7BE5B03-0EF8-4BAA-BFF5-26ECFA14F9EF/L0/001",
"checksum": "Vcc108c2gwaqgTBthbpzIafK1uI=",
"ownerId": -70510785793649910,
"livePhotoVideoId": "N/A",
"stackCount": "0",
"stackParentId": "N/A",
"fileCreatedAt": "2022-09-20 17:15:53.000",
"fileModifiedAt": "2024-02-02 16:13:17.000",
"updatedAt": "2024-02-02 16:13:17.000",
"durationInSeconds": 13,
"type": "AssetType.video",
"fileName": "",
"isFavorite": false,
"isRemote": false,
"storage": "AssetState.local",
"width": 1080,
"height": 1920,
"isArchived": false,
"isTrashed": false,
"isOffline": false,
}
{
"id": "N/A",
"remoteId": "N/A",
"localId": "808A4A95-9355-4A87-AEA3-289B4B4B1FAE/L0/001",
"checksum": "Vcc108c2gwaqgTBthbpzIafK1uI=",
"ownerId": -70510785793649910,
"livePhotoVideoId": "N/A",
"stackCount": "0",
"stackParentId": "N/A",
"fileCreatedAt": "2022-09-20 17:15:53.000",
"fileModifiedAt": "2024-02-02 16:14:40.000",
"updatedAt": "2024-02-02 16:14:40.000",
"durationInSeconds": 13,
"type": "AssetType.video",
"fileName": "",
"isFavorite": false,
"isRemote": false,
"storage": "AssetState.local",
"width": 1080,
"height": 1920,
"isArchived": false,
"isTrashed": false,
"isOffline": false,
} |
Any progress on this issue on iOS? Thanks for the update.
I mean I dont mind pulling the repo and taking a look sometime, I just didnt want to step on anyones toes
@Custardcs please go ahead!
Accidentally when trying to debug other issue I stumbled on this crash. It seems to be an issue with photo_manager
flutter plugin.
@maksg I wonder if we don't track the download progress of iCloud will help with the issue 🤔
@alextran1502 I doubt that it will help. The notifyProgress
method from PMManager
is called anyway. But as a workaround maybe you could swizzle it and make it do nothing.
I have this issue too with the recent version of the server and app and latest ios version.
The bug
While uploading images to the server through the mobile app (Latest version of the iOS app) it'll crash at seemingly random times.
The OS that Immich Server is running on
Ubuntu 22.04 Server
Version of Immich Server
1.74.0
Version of Immich Mobile App
1.74.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
I'm currently on the iOS 17 Beta