ludo / react-native-torch

Torch (flashlight) plugin for React Native (Android/iOS)
MIT License
78 stars 27 forks source link

Crashing on Android 5.1 when calling switchState #26

Open kyoz opened 3 years ago

kyoz commented 3 years ago

Information:

Stack trace

java.lang.RuntimeException: 
  at android.hardware.Camera.<init> (Camera.java:550)
  at android.hardware.Camera.open (Camera.java:408)
  at com.cubicphuse.RCTTorch.RCTTorchModule.switchState
  at java.lang.reflect.Method.invoke (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.facebook.react.bridge.JavaMethodWrapper.invoke
  at com.facebook.react.bridge.JavaModuleWrapper.invoke
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
  at android.os.Handler.handleCallback (Handler.java:739)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
  at android.os.Looper.loop (Looper.java:135)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run
  at java.lang.Thread.run (Thread.java:818)

Expect It should run or not but shouldn't cause crashing