fix ios image cropping

Bumps @bsky.app/expo-image-crop-tool to 0.5.1, which writes cropped
images into the caches directory instead of NSTemporaryDirectory. The
old temp dir was not on expo-file-system's scoped-write allowlist, so
moveAsync failed with "File '…/tmp/…/..' is not writable" — leaving
the composer silently showing the original uncropped image.

Also logs non-cancellation crop errors via logger.error so future
failures in this path surface instead of silently falling back to the
original image.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-05-04 15:34:04 +03:00
parent 5281c48de3
commit 384faa6942
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -98,7 +98,7 @@
"@braintree/sanitize-url": "^6.0.2",
"@bsky.app/alf": "^0.1.9",
"@bsky.app/expo-guess-language": "^0.2.8",
"@bsky.app/expo-image-crop-tool": "^0.5.0",
"@bsky.app/expo-image-crop-tool": "^0.5.1",
"@bsky.app/expo-scroll-edge-effect": "^0.1.4",
"@bsky.app/expo-translate-text": "^0.2.9",
"@bsky.app/react-native-mmkv": "2.12.5",
+2
View File
@@ -19,6 +19,7 @@ import {openCropper} from '#/lib/media/picker'
import {type PickerImage} from '#/lib/media/picker.shared'
import {getDataUriSize} from '#/lib/media/util'
import {isCancelledError} from '#/lib/strings/errors'
import {logger} from '#/logger'
import {IS_NATIVE, IS_WEB} from '#/env'
export type ImageTransformation = {
@@ -149,6 +150,7 @@ export async function cropImage(img: ComposerImage): Promise<ComposerImage> {
}
} catch (e) {
if (!isCancelledError(e)) {
logger.error('Failed to crop image', {safeMessage: e})
return img
}