immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.77k stars 2.17k forks source link

Error after crop and save to gallery #11800

Open lukanowa opened 1 month ago

lukanowa commented 1 month ago

The bug

After cropping a photo and trying to save it to the gallery: Screenshot_20240815_103146

The OS that Immich Server is running on

Unraid

Version of Immich Server

1.112.0-1

Version of Immich Mobile App

1.112.1 b154

Platform with the issue

Your docker-compose.yml content

.

Your .env content

.

Reproduction steps

1. Crop photo,
2. Save to gallery
3. Error: Null check operator used on a null value

Relevant log output

No response

Additional information

No response

etymotic commented 4 weeks ago

I have the same error when cropping images on Android. App version is 1.112.1 installed from github through Obtanium.

Docker logs for immich_server don't show anything unusual. I believe this must be an Android app problem and not a server problem.

helloworld1987 commented 3 weeks ago

I have the same issue on Docker/Debian.

Benedolt commented 3 weeks ago

I get exactly the same issue. I didn't even crop, just rotate from the mobile app.

mikerjensen commented 2 weeks ago

Same issue, on a Pixel 7A. I think i've had about 2 successful crops out of about 10 attempts. Most of the crops don't appear anywhere on the phone or on the server, despite the 'Image saved' notification (which appears before the 'Null check operator...' notification. Android App v1.112.1 build.154 Server (Docker) v1.112.1

Not sure it's related, but often when i launch the Android app, i just get the Immich logo frozen on the screen for a minute or so before loading the thumbnails.

plord12 commented 2 weeks ago

I saw the same error when trying a rotate (no crop).

jakev383 commented 2 weeks ago

Seeing the same issue on a Pixel 8, running Android 14. Immich android app version 1.112.1 build.154, server version 1.112.1 as a docker container. On the Android app, I only have "Camera" selected as the album to backup, not "Recent" (picks up images I do not wish backed up in Immich). Server logs do not really show much at this detail level, just the websocket connect and disconnect.

Steps to reproduce:

  1. Open app and select image to bring it to full screen
  2. Select Edit from bottom menu
  3. Select Crop from bottom menu
  4. Click rotate-right icon, then the checkmark at top right of screen
  5. Select "Save to gallery"
  6. App pauses for 10 seconds
  7. App shows "Images saved!" message
  8. 2 seconds later app shows "Null check operator used on null value" message
  9. Rotated/edited image is saved to device, but does not show in Immich Photo Browser

Turning the app log level to INFO, I believe this is the relevant log entries to coincide with the app error:

2024-08-26 12:25:01.853038 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | Null check operator used on a null value |
#0      MediaQuery._of (package:flutter/src/widgets/media_query.dart:1169)
#1      MediaQuery.of (package:flutter/src/widgets/media_query.dart:1164)
#2      FToast.showToast (package:fluttertoast/fluttertoast.dart:247)
#3      ImmichToast.show (package:immich_mobile/widgets/common/immich_toast.dart:49)
#4      EditImagePage.build.<anonymous closure> (package:immich_mobile/pages/editing/edit.page.dart:107)
<asynchronous suspension>

2024-08-26 11:19:40.316636 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | Null check operator used on a null value |
#0      MediaQuery._of (package:flutter/src/widgets/media_query.dart:1169)
#1      MediaQuery.of (package:flutter/src/widgets/media_query.dart:1164)
#2      FToast.showToast (package:fluttertoast/fluttertoast.dart:247)
#3      ImmichToast.show (package:immich_mobile/widgets/common/immich_toast.dart:49)
#4      EditImagePage.build.<anonymous closure> (package:immich_mobile/pages/editing/edit.page.dart:107)
<asynchronous suspension>

2024-08-26 11:19:07.126812 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | Null check operator used on a null value |
#0      MediaQuery._of (package:flutter/src/widgets/media_query.dart:1169)
#1      MediaQuery.of (package:flutter/src/widgets/media_query.dart:1164)
#2      FToast.showToast (package:fluttertoast/fluttertoast.dart:247)
#3      ImmichToast.show (package:immich_mobile/widgets/common/immich_toast.dart:49)
#4      EditImagePage.build.<anonymous closure> (package:immich_mobile/pages/editing/edit.page.dart:107)
<asynchronous suspension>

2024-08-26 11:19:00.568383 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | Null check operator used on a null value |
#0      MediaQuery._of (package:flutter/src/widgets/media_query.dart:1169)
#1      MediaQuery.of (package:flutter/src/widgets/media_query.dart:1164)
#2      FToast.showToast (package:fluttertoast/fluttertoast.dart:247)
#3      ImmichToast.show (package:immich_mobile/widgets/common/immich_toast.dart:49)
#4      EditImagePage.build.<anonymous closure> (package:immich_mobile/pages/editing/edit.page.dart:107)
<asynchronous suspension>

2024-08-26 11:18:52.252627 | SEVERE   | ImmichErrorLogger    | PlatformDispatcher - Catch all | Null check operator used on a null value |
#0      MediaQuery._of (package:flutter/src/widgets/media_query.dart:1169)
#1      MediaQuery.of (package:flutter/src/widgets/media_query.dart:1164)
#2      FToast.showToast (package:fluttertoast/fluttertoast.dart:247)
#3      ImmichToast.show (package:immich_mobile/widgets/common/immich_toast.dart:49)
#4      EditImagePage.build.<anonymous closure> (package:immich_mobile/pages/editing/edit.page.dart:107)
<asynchronous suspension>

2024-08-26 11:18:32.618419 | INFO     | AssetNotifier        | Load assets: 1090ms |
2024-08-26 11:18:32.618339 | INFO     | AlbumService         | Syncing completed. Changes: false |
2024-08-26 11:18:31.836496 | INFO     | AlbumService         | 'Recents' is not selected, keeping only selected albums |
jakev383 commented 2 weeks ago

With version 1.113.0 it no longer displays the error message and seems to save the cropped image, although in a different location. Original image was at /storage/emulated/0/DCIM/Camera and crop save location is /storage/emulated/0/Pictures

mikerjensen commented 1 week ago

Yes, great progress, i'm now able to save cropped images to the server. Would be great if the cropped image could preserve the date of the original image. And maybe ask if the original (uncropped image) should be deleted?