endmr11 / ed_screen_recorder

Screen recorder plugin for Flutter. Supports IOS and Android devices.
MIT License
26 stars 34 forks source link

Recording not start on first attempt #35

Open rahul-devronins opened 2 years ago

rahul-devronins commented 2 years ago

I called startRecording function on button click, below are the logs:

startRecording: w x h = 750 x 1334 pixels Error Error Domain=NSCocoaErrorDomain Code=4 "“birdiecoach_1661925966390.mp4” couldn’t be removed." UserInfo={NSUserStringVariant=( Remove ), NSFilePath=/var/mobile/Containers/Data/Application/B31012C1-1DBC-46C2-8CB7-0856A1C943FA/Documents/birdiecoach_1661925966390.mp4, NSUnderlyingError=0x283f221c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} flutter: >>> Start Record Response Output: flutter: File: File: '/var/mobile/Containers/Data/Application/B31012C1-1DBC-46C2-8CB7-0856A1C943FA/Documents/birdiecoach_1661925966390.mp4' flutter: Event Name: startRecordScreen flutter: Progressing: true flutter: Message: Started Video flutter: Success: false flutter: Video Hash: 00339d6028f311edb735894bc50ea3f4 flutter: Start Date: 1661925966399 flutter: End Date: 1661925955517 flutter: flutter: Start Recording Response: {success: false, file: File: '/var/mobile/Containers/Data/Application/B31012C1-1DBC-46C2-8CB7-0856A1C943FA/Documents/birdiecoach_1661925966390.mp4', progressing: true, eventname: startRecordScreen, message: Started Video, videohash: 00339d6028f311edb735894bc50ea3f4, startdate: 1661925966399, enddate: 1661925955517} starting audio.... starting audio.... starting audio.... starting audio.... starting audio.... starting audio.... starting audio....

I am testing it on real device iPhone 6S. As per logs, audio recording is started but I am getting success: false and progressing: true. When I click the start recording button again, now recording will start. Also following error occur few times on same device (iPhone 6s)

Problems writing audio

starting audio.... Problems writing audio starting audio.... Problems writing audio startRecording: w x h = 750 x 1334 pixels Error Error Domain=NSCocoaErrorDomain Code=4 "“Eren.mp4” couldn’t be removed." UserInfo={NSUserStringVariant=( Remove ), NSFilePath=/Eren.mp4, NSUnderlyingError=0x280fa49c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} starting audio.... Problems writing audio Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: ' -[AVAssetWriter addInput:] Cannot call method when status is 3' *** First throw call stack: (0x181b37d1c 0x199357ee4 0x18a929cdc 0x10048bf7c 0x10048916c 0x10048ab14 0x102ef0b14 0x1029dba8c 0x1817f7094 0x1817f8094 0x1817a4d44 0x1817a4994 0x181af30d4 0x181ab05f8 0x181ac3250 0x1a25ce988 0x1842c3a94 0x18405cfd4 0x10015fbdc 0x1002984d0) libc++abi: terminating with uncaught exception of type NSException

  • thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00000001bc3e2bbc libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib__pthread_kill: -> 0x1bc3e2bbc <+8>: b.lo 0x1bc3e2bd8 ; <+36> 0x1bc3e2bc0 <+12>: stp x29, x30, [sp, #-0x10]! 0x1bc3e2bc4 <+16>: mov x29, sp 0x1bc3e2bc8 <+20>: bl 0x1bc3de60c ; cerror_nocancel Target 0: (Runner) stopped.
Theunodb commented 1 year ago

I'm also experiencing this. I'm getting this error in xcode

[ERROR] -[RPScreenRecorder startCaptureWithHandler:completionHandler:]_block_invoke_2:482 failed to start due to error: Error Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5807 "Recording interrupted by multitasking and content resizing" UserInfo={NSLocalizedDescription=Recording interrupted by multitasking and content resizing}
nguyenleanhkhoa commented 1 year ago

I'm also experiencing with this bug , how to fix it?

endmr11 commented 1 year ago

Version 0.0.13 has been released. Could you please check again and report back to me?

rahul-devronins commented 1 year ago

It seems to working now. Can you let me know if we can record a particular widget only? e.g. We have a paint section where we are drawing items, I would like to record only the paint section not other part of the screen e.g. status bar, navigation bar etc @endmr11