I migrate my ionic app from cordova to capacitor. When I test camera(with cordova plugin) I have this bug. So I test also with capacitor camera and I have the same bug.
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'main thread only'
terminating with uncaught exception of type NSException
(lldb)
If you can consistently cause the error, I’d suggest creating a code reproduction and opening an issue on the capacitor plugins GitHub repo. That way the team can reproduce it and fix your issue. Your JavaScript code seems fine to me.