Ventura generates corrupt preview files of RAW images in Photos after initial edits (error 3306)
This is an issue that seems to have been floating around these forums since Ventura was introduced (I only recently upgraded). It has completely broken the Photos application and I can assume has gone unfixed because nobody inside Apple is using Photos on Mac to manage and edit RAW images.
The issue occurs for me both on a 2017 iMac Pro (Intel) and 2022 Mac Studio (M1 Max), so it's not machine or library-specific. And it can be replicated using any RAW image from either my iPhone 14 Pro or from my Nikon DSLR.
Once a RAW image is imported into Photos, the first initial edits to the image triggers Photos to generate a jpeg preview of those edits. What's happening in Ventura seems to be that the jpeg preview is corrupt; returning to the image in Photos will display a low-resolution pixelated preview. Attempting to export or share the image will fail. Attempting to edit the image in an external editor will trigger the attached error message:
An error occurred while preparing external edit. The operation couldn't be completed. (PHPhotosErrorDomain error 3306).
The only workaround I've discovered is to either not apply any edits in Photos or use the "Revert to Original' option after the image is corrupted and then re-apply the edits. This process must be repeated for every single image. If anyone has discovered a solution please advise, although I suspect this is just something Apple's going to have to fix in a software update.
Mac Studio, macOS 13.3