From 384faa6942945ffd59f9b74bd2b16ade8bb2b025 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 4 May 2026 15:34:04 +0300 Subject: [PATCH] fix ios image cropping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- package.json | 2 +- src/state/gallery.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index fc7a097858..1787e76315 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/state/gallery.ts b/src/state/gallery.ts index c122ca6df4..c9c7f37750 100644 --- a/src/state/gallery.ts +++ b/src/state/gallery.ts @@ -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 { } } catch (e) { if (!isCancelledError(e)) { + logger.error('Failed to crop image', {safeMessage: e}) return img }