-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 CameraRuntimeError: Unknown / Unknown: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" #2632
Comments
What exactly is Error |
@mrousavy I did a bunch of googling and docs reading on it, but truthfully everyone says that "it doesn't provide any helpful info". Hate to be that guy, but I asked GPT-4 as a last resort and the response was: GPT ResponseThe AVFoundationErrorDomain Code=-11800 is an error that occurs in the context of iOS development when dealing with media playback, and it generally indicates that "The operation could not be completed". It's a broad error that can be caused by various issues related to media loading and playback, often indicating that the media file could not be loaded due to issues with its format, encoding, or the way it is being accessed.Several common reasons for this error could be: Insecure HTTP URLs being blocked by App Transport Security in iOS, requiring HTTPS instead, or needing exceptions configured in Info.plist if HTTP must be used. I know that it isn't coming from the react-native-video package because it's being thrown in the onCameraError package. The resolution to this issue may be just "hey fix your shit timer code" lol. But figured it may be some edge case you could protect for in the react-native-vision-camera package. I spent a good amount of time making a reproducible demo for you and adding logs this time, hopefully it doesn't take you long to dig into. There is a line in the logs implying that some sort of state operation interrupted the camera: VisionCamera.updateCategory(_:mode:options:): AVAudioSession category changed!
<<<< FigSharedMemPool >>>> Fig assert: "blkHdr->useCount > 0" at (FigSharedMemPool.c:591) - (err=0)
VisionCamera.sessionRuntimeError(notification:): Unexpected Camera Runtime Error occured! |
@mrousavy Okay so this issue has plagued me now for a few weeks and I've tried a lot of updates.
I'm going to assume it's some sort of conflict between react-native-vision-camera and react-native-video. Maybe the AVAudioSessions or something? |
Good point, yea it could be the audio sessions. |
Closing this for now, as I think I am doing nothing wrong in my audio session - maybe RN Video doesn#t clean up after they are done with audio. |
What's happening?
I'm using a custom countdown timer component to invoke a callback when the timer hits 0 to start the camera recording. When the timer hits 0, sometimes the camera records perfectly, other times it throws the error above. I've narrowed the cause down to my countdown component. When I start the recording with a button, it works perfectly every time.
Reproduceable Code
Take this page and copy it directly. Upon countdown completion, you will get this to replicate. If it doesn't work the first time, try it several times until it works.
COUNTDOWN TIMER COMPONENT
Relevant log output
Camera Device
Device
iPhone 12 Physical Device
VisionCamera Version
3.9.0
Can you reproduce this issue in the VisionCamera Example app?
No, I cannot reproduce the issue in the Example app
Additional information
The text was updated successfully, but these errors were encountered: