Code 3300 error while trying to save a photo to iOS album

While trying to save a photo to a custom album on some devices we get the following error:

The operation couldn’t be completed. (PHPhotosErrorDomain error 3300).

code: 3300

This is the part of the code where the issue happens

PHPhotoLibrary.shared().performChanges({
                let assetChangeRequest = PHAssetChangeRequest.creationRequestForAsset(from: image)
                guard let placeholder = assetChangeRequest.placeholderForCreatedAsset else { return }
                let albumChangeRequest = PHAssetCollectionChangeRequest(for: album)
                albumChangeRequest?.addAssets([placeholder] as NSArray)
            }, completionHandler: { success, error in
                completion(success, error)
            })

I would be thankful for any tips since I am out of ideas.

We also have this problem with all our apps since iOS 15. Before that, the pictures were saved in the album for years without any problems. This only happens on some of my users' devices. We could not reproduce the problem on our test devices. Unfortunately, we can't fix this issue.

I was able to reproduce this issue in the Shortcuts app on my iPhone 14 Pro (iOS 17.0.3). You can replicate it by using two blocks: "Find Photos" with some filters and "Save to Album." This issue is more likely to occur when attempting to save a large number of media files to the album, typically around 5,000 to 7,000 items. However, it can also happen with a smaller quantity of items.

Code 3300 error while trying to save a photo to iOS album
 
 
Q