So basically my app is crashing on some devices that run Android 11 right after taking a photo using the "Store media for upload" from Camera. I have an Android 9 device where this does not happen. I took the logs from adb catlog and they show that something seems to be off with the paths the image is stored to. It basically can not be found and the app crashes.
04-15 07:12:37.337 23402 23402 V ZCAM_CaptureModule: initModeByIntent bundle :Bundle[{output=content://com.mycompany.lieferscheintest.flutter.image_provider/cached_files/18bfea20-13dc-429d-b26b-64e7548cf66f4408998899045457637.jpg}]
04-15 07:12:41.458 3589 9167 W ModernMediaScanner: Failed to visit /data/data/com.mycompany.lieferscheintest/cache/18bfea20-13dc-429d-b26b-64e7548cf66f4408998899045457637.jpg: java.nio.file.NoSuchFileException: /data/data/com.mycompany.lieferscheintest/cache/18bfea20-13dc-429d-b26b-64e7548cf66f4408998899045457637.jpg
04-15 07:12:41.474 29500 29907 D MediaScannerConnection: Scanned /data/user/0/com.mycompany.lieferscheintest/cache/18bfea20-13dc-429d-b26b-64e7548cf66f4408998899045457637.jpg to null