FeedbackID: FB13636921
I'm using /usr/sbin/screencapture -v -x -C -k -R 0,0,500,500 /path/to/a/movfile/in/a/folder/in/my/apps/sandbox/Group/Container
in my app to allow users to capture screenshots and recordings.
Screenshots keep working fine on macOS Sonoma 14.4b23E5196e, but video recordings no longer work.
I'm guessing the following log output has something to do with it:
default 15:01:53.151819+0100 screencapture sampleBuffer: start recording time: 3123.604833 target: 3123.474266, overshot: 0.130568
error 15:01:53.185179+0100 screencapture <private>:246:<private> Not writable url (null).!folderIsWritable == true
error 15:01:53.185236+0100 screencapture <private>:50:<private> We could not create a byte stream!
error 15:01:53.185252+0100 screencapture <private>:87:<private> NULL byte stream.
error 15:01:53.185298+0100 screencapture <private>:3479:<private> ### Err -45,
error 15:01:53.185312+0100 screencapture <private>:3814:<private> ### Err -45,
error 15:01:53.185334+0100 screencapture <<<< AVCaptureMovieFileOutput >>>> Fig assert: "status == 0 " at (AVCaptureMovieFileOutput.m:2522) - CMIOFileWritingControlTokenStartWriting (err=-45)
error 15:01:53.185374+0100 screencapture <private>:1885:<private> ### Err -67452,
error 15:01:53.185388+0100 screencapture <private>:303:<private> FigMovieFormatFileWriter::PostProcessMovie: WriteMovie() errored!!! -67452
error 15:01:53.185476+0100 screencapture <private>:4687:<private> consolidate movie fragments err : -17913
default 15:01:53.185610+0100 screencapture <<<< AVError >>>> AVLocalizedErrorWithUnderlyingOSStatus: Returning error (AVFoundationErrorDomain / -11800) status (-45)
default 15:01:53.186201+0100 screencapture didFinishRecording: No trim finish. duration: 0.000000s size: 0, error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={AVErrorRecordingSuccessfullyFinishedKey=false, NSLocalizedDescription=The operation could not be completed, NSLocalizedFailureReason=An unknown error occurred (-45), NSURL=file:///Users/eternalstorms/Library/Group%20Containers/group.com.apple.screencapture/ScreenRecordings/3ED15EE7-A814-47A7-A398-29D5A6AD03C1.mov, NSUnderlyingError=0x6000031d80c0 {Error Domain=NSOSStatusErrorDomain Code=-45 "fLckdErr: file is locked"}}
error 15:01:53.186290+0100 screencapture recording failed. The operation could not be completed
Are there new entitlements we need for this in our apps starting with macOS Sonoma 14.4? Or is it a bug? Calling it directly from Terminal works.
Thank you,
Matthias