Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Samsung Galaxy S7 for some permission error #10

Open
sbannigan opened this issue Jan 17, 2019 · 1 comment
Open

Crash on Samsung Galaxy S7 for some permission error #10

sbannigan opened this issue Jan 17, 2019 · 1 comment

Comments

@sbannigan
Copy link
Collaborator

Android Studio error:

FATAL EXCEPTION: CameraThread
Lacking privileges to access camera service

May be related to this? https://stackoverflow.com/questions/40943378/lacking-privileges-to-access-camera-service-with-permission-granted. The accepted answer calls out the S7 as having a similar issue.

triniwiz added a commit that referenced this issue Jan 22, 2019
fix(): #8
fix(): #10
@disbelief
Copy link

disbelief commented Apr 6, 2020

Any resolution for this? I'm experiencing crashes on a Samsung device as well. I added the following permissions to AndroidManifest.xml which removed the permission error:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

but then there is an underlying IOException which crashes the app when startRecording() is called:

2020-04-06 13:29:36.878 V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 120090530, pluginId: VideoRecorder, methodName: startRecording
2020-04-06 13:29:36.878 V/Capacitor: callback: 120090530, pluginId: VideoRecorder, methodName: startRecording, methodData: {}
2020-04-06 13:29:36.879 I/RequestQueue: Repeating capture request cancelled.
2020-04-06 13:29:36.879 I/MediaRecorderJNI: native_reset
2020-04-06 13:29:36.879 I/MediaRecorderJNI: release
2020-04-06 13:29:36.883 I/MediaRecorderJNI: setup
2020-04-06 13:29:36.884 I/MediaRecorderJNI: setAudioSource(1)
2020-04-06 13:29:36.890 I/MediaRecorderJNI: setVideoSource(2)
2020-04-06 13:29:36.905 I/MediaRecorderJNI: setVideoSize(640, 480)
2020-04-06 13:29:36.905 I/MediaRecorderJNI: setParameter()
2020-04-06 13:29:36.907 I/MediaRecorderJNI: setParameter()
2020-04-06 13:29:36.908 I/MediaRecorderJNI: setVideoFrameRate(30)
2020-04-06 13:29:36.908 I/MediaRecorderJNI: setParameter()
2020-04-06 13:29:36.908 I/MediaRecorderJNI: setParameter()
2020-04-06 13:29:36.909 I/MediaRecorderJNI: setVideoEncoder(5)
2020-04-06 13:29:36.910 I/MediaRecorderJNI: setAudioEncoder(3)
2020-04-06 13:29:36.921 I/MediaRecorderJNI: setOutputFile
2020-04-06 13:29:36.922 I/MediaRecorderJNI: prepare
2020-04-06 13:29:36.926 E/MediaRecorder: prepare failed: -2147483648
2020-04-06 13:29:36.926 W/System.err: java.io.IOException: prepare failed.
2020-04-06 13:29:36.927 W/System.err:     at android.media.MediaRecorder._prepare(Native Method)
2020-04-06 13:29:36.927 W/System.err:     at android.media.MediaRecorder.prepare(MediaRecorder.java:1164)
2020-04-06 13:29:36.927 W/System.err:     at co.fitcom.fancycamera.Camera2.setUpMediaRecorder(Camera2.java:607)
2020-04-06 13:29:36.927 W/System.err:     at co.fitcom.fancycamera.Camera2.startRecording(Camera2.java:837)
2020-04-06 13:29:36.927 W/System.err:     at co.fitcom.fancycamera.FancyCamera.startRecording(FancyCamera.java:323)
2020-04-06 13:29:36.927 W/System.err:     at com.github.sbannigan.capacitor.VideoRecorder.startRecording(VideoRecorder.java:282)
2020-04-06 13:29:36.927 W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2020-04-06 13:29:36.927 W/System.err:     at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:99)
2020-04-06 13:29:36.927 W/System.err:     at com.getcapacitor.Bridge$1.run(Bridge.java:520)
2020-04-06 13:29:36.927 W/System.err:     at android.os.Handler.handleCallback(Handler.java:751)
2020-04-06 13:29:36.927 W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
2020-04-06 13:29:36.928 W/System.err:     at android.os.Looper.loop(Looper.java:154)
2020-04-06 13:29:36.928 W/System.err:     at android.os.HandlerThread.run(HandlerThread.java:61)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants