react-native-camera icon indicating copy to clipboard operation
react-native-camera copied to clipboard

Camera unable to save file until debug mode is turned on.

Open subodhsri opened this issue 7 years ago • 3 comments

Bug Report

To Do First

  • [x] Did you try latest release?
  • [x] Did you try master?
  • [x] Did you look for existing matching issues?

Related Modules RNCamera

Platforms Android

Versions

  • Android: v6 (API 23), v9 (API 28) Both Simulator and Real Device
  • react-native-camera: v1.6.4 (git+https://[email protected]/react-native-community/react-native-camera.git)
  • react-native: 0.56.0
  • react: 16.4.1
  • react-native-navigation: 1.1.483
  • react-native-video: 3.2.1

Description/Current Behaviour

With React Native JS Debug mode on, I click on record, then click on stop, it gets save in file:// storage, and I am able to then preview and upload it.

Logcat shows errors but the app proceeds.

12-20 19:10:56.279 1331-6856/? E/OMXNodeInstance: getParameter(2c:google.mpeg4.encoder, ParamVideoErrorCorrection(0x6000007)) ERROR: NotImplemented(0x80001006)
12-20 19:10:56.279 1331-6856/? E/OMXNodeInstance: setConfig(2c:google.mpeg4.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:10:56.285 1331-6862/? E/OMXNodeInstance: setConfig(2d:google.amrnb.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:10:56.295 1331-6871/? E/OMXNodeInstance: setConfig(2e:google.vorbis.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:10:58.575 1331-1823/? E/audio_hw_generic: pcm_write failed cannot write stream data: I/O error
2-20 19:11:06.376 1331-1829/? E/CameraService: disconnect: Disconnect called on already disconnected client for device 1
12-20 19:11:06.424 6630-6882/com.esportsglobalgamers E/ACodec: [OMX.google.mpeg4.decoder] storeMetaDataInBuffers failed w/ err -1010
12-20 19:11:06.424 6630-6882/com.esportsglobalgamers E/OMXNodeInstance: setConfig(1:google.mpeg4.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:11:06.434 6630-6885/com.esportsglobalgamers E/OMXNodeInstance: setConfig(1:google.amrnb.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:11:07.476 6630-6914/com.esportsglobalgamers E/OMXNodeInstance: setConfig(1:google.amrnb.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:11:08.595 1331-1823/? E/audio_hw_generic: pcm_write failed cannot write stream data: I/O error
12-20 19:11:08.698 6630-6917/com.esportsglobalgamers E/OMXNodeInstance: setConfig(1:google.amrnb.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-20 19:11:09.917 6630-6921/com.esportsglobalgamers E/OMXNodeInstance: setConfig(1:google.amrnb.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)

With React Native JS Debug mode off and release mode., I click on record, then click on stop, it does't save (i print the file:// in logs but I don't get it in this scenario. Logcat shows the below lines, App Crashes.

I tried various different Quality settings from 288p to 720p.

Expected Behaviour

Steps to Reproduce

Additionals Logcat

2018-12-24 13:34:17.800 1852-1875/system_process E/memtrack: Couldn't load memtrack module
2018-12-24 13:34:19.537 1714-24952/? E/FileSource: Failed to open file '/product/media/audio/ui/camera_click.ogg'. (No such file or directory)
2018-12-24 13:34:19.537 1714-24952/? E/GenericSource: Failed to create data source!
2018-12-24 13:34:19.537 1706-2478/? E/MediaPlayerNative: error (1, -2147483648)
2018-12-24 13:34:19.537 1706-1706/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/camera_click.ogg
2018-12-24 13:34:19.567 1714-24958/? E/FileSource: Failed to open file '/product/media/audio/ui/VideoRecord.ogg'. (No such file or directory)
2018-12-24 13:34:19.567 1714-24958/? E/GenericSource: Failed to create data source!
2018-12-24 13:34:19.567 1706-2478/? E/MediaPlayerNative: error (1, -2147483648)
2018-12-24 13:34:19.567 1706-1706/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/VideoRecord.ogg
2018-12-24 13:34:19.577 1714-24964/? E/FileSource: Failed to open file '/product/media/audio/ui/VideoStop.ogg'. (No such file or directory)
2018-12-24 13:34:19.577 1714-24964/? E/GenericSource: Failed to create data source!
2018-12-24 13:34:19.577 1706-6281/? E/MediaPlayerNative: error (1, -2147483648)
2018-12-24 13:34:19.577 1706-1706/? E/CameraService: Failed to load CameraService sounds: /product/media/audio/ui/VideoStop.ogg
2018-12-24 13:34:19.590 1574-1793/? E/libc: Access denied finding property "ro.camera.req.fmq.size"
2018-12-24 13:34:19.590 1574-1793/? E/libc: Access denied finding property "ro.camera.res.fmq.size"
2018-12-24 13:34:19.591 1706-1706/? E/Camera2-Parameters: Error finding static metadata entry 'android.distortionCorrection.availableModes' (1b0001)
2018-12-24 13:34:19.608 1706-1706/? E/Camera3-Device: configureStreams: Stream 1: DataSpace override not allowed for format 0x21
2018-12-24 13:34:19.698 1706-1706/? E/Camera3-Device: configureStreams: Stream 1: DataSpace override not allowed for format 0x21
2018-12-24 13:34:21.211 1719-1791/? E/OMXNodeInstance: setConfig(0xebd26cc0:google.h264.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.211 1719-1791/? E/OMXNodeInstance: getConfig(0xebd26cc0:google.h264.encoder, ConfigLatency(0x6f800005)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.211 1719-1791/? E/OMXNodeInstance: getConfig(0xebd26cc0:google.h264.encoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.220 1719-1791/? E/OMXNodeInstance: setConfig(0xebd26c00:google.amrnb.encoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.220 1719-1791/? E/OMXNodeInstance: getConfig(0xebd26c00:google.amrnb.encoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.236 1719-1791/? E/OMXNodeInstance: setConfig(0xebd26f60:google.vorbis.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.237 1719-2103/? E/OMXNodeInstance: getConfig(0xebd26f60:google.vorbis.decoder, ConfigAndroidVendorExtension(0x6f100004)) ERROR: Undefined(0x80001001)
2018-12-24 13:34:21.331 1706-6281/? E/Camera3-Device: configureStreams: Stream 1: DataSpace override not allowed for format 0x21
2018-12-24 13:34:22.396 1572-1661/? E/audio_hw_generic: pcm_write failed cannot write stream data: I/O error
2018-12-24 13:34:24.241 1852-4806/system_process E/memtrack: Couldn't load memtrack module
2018-12-24 13:34:27.826 1852-1875/system_process E/memtrack: Couldn't load memtrack module
2018-12-24 13:34:32.415 1572-1661/? E/audio_hw_generic: pcm_write failed cannot write stream data: I/O error
2018-12-24 13:34:43.309 1852-1938/system_process E/InputDispatcher: channel '757092b com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-12-24 13:34:43.410 1852-25536/system_process E/memtrack: Couldn't load memtrack module
...
...
2018-12-24 13:34:44.678 1852-25536/system_process E/memtrack: Couldn't load memtrack module
2018-12-24 13:34:47.042 25570-25570/com.google.android.gms E/gle.android.gm: The String#value field is not present on Android versions >= 6.0
2018-12-24 13:35:05.222 1795-1795/? E/netmgr: Failed to open QEMU pipe 'qemud:network': Invalid argument
2018-12-24 13:35:07.412 1717-1798/? E/storaged: getDiskStats failed with result NOT_SUPPORTED and size 0
2018-12-24 13:35:14.391 1592-1592/? E/lowmemorykiller: Error writing /proc/21076/oom_score_adj; errno=22
2018-12-24 13:35:14.412 1852-1938/system_process E/InputDispatcher: channel '35ebc9a com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-12-24 13:35:14.508 1852-1982/system_process E/WindowManager: Failed to notify cancel
    android.os.DeadObjectException
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:1127)
        at android.view.IRemoteAnimationRunner$Stub$Proxy.onAnimationCancelled(IRemoteAnimationRunner.java:117)
        at com.android.server.wm.RemoteAnimationController.invokeAnimationCancelled(RemoteAnimationController.java:210)
        at com.android.server.wm.RemoteAnimationController.cancelAnimation(RemoteAnimationController.java:143)
        at com.android.server.wm.RemoteAnimationController.binderDied(RemoteAnimationController.java:247)
        at android.os.BinderProxy.sendDeathNotice(Binder.java:1193)
2018-12-24 13:35:15.034 1852-1875/system_process E/PackageManager: Optimistic bind failed.
    java.util.concurrent.TimeoutException: [Optimistic Bind] Didn't bind to resolver in time!
        at com.android.server.pm.InstantAppResolverConnection.waitForBindLocked(InstantAppResolverConnection.java:160)
        at com.android.server.pm.InstantAppResolverConnection.bind(InstantAppResolverConnection.java:225)
        at com.android.server.pm.InstantAppResolverConnection.lambda$optimisticBind$0(InstantAppResolverConnection.java:255)
        at com.android.server.pm.-$$Lambda$InstantAppResolverConnection$D-JKXi4qrYjnPQMOwj8UtfZenps.run(Unknown Source:2)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.os.HandlerThread.run(HandlerThread.java:65)
2018-12-24 13:35:15.256 1852-1938/system_process E/InputDispatcher: channel '19fb6c1 com.esportsglobalgamers/com.reactnativenavigation.controllers.NavigationActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-12-24 13:35:15.256 1852-1938/system_process E/InputDispatcher: channel 'f0fb994 com.esportsglobalgamers/com.reactnativenavigation.controllers.NavigationActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2018-12-24 13:35:15.264 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.264 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.264 1706-1794/? E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32
2018-12-24 13:35:15.264 1706-1794/? E/Camera3-OutputStream: returnBufferCheckedLocked: Stream 2: Error queueing buffer to native window: Broken pipe (-32)
2018-12-24 13:35:15.264 1706-1794/? E/Camera3-Device: Can't return buffer to its stream: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.273 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
...
...
2018-12-24 13:35:15.274 1706-24971/? E/Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
2018-12-24 13:35:15.274 1706-24971/? E/Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
2018-12-24 13:35:15.325 1706-1794/? E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32
2018-12-24 13:35:15.325 1706-1794/? E/Camera3-OutputStream: returnBufferCheckedLocked: Stream 2: Error queueing buffer to native window: Broken pipe (-32)
2018-12-24 13:35:15.325 1706-1794/? E/Camera3-Device: Can't return buffer to its stream: Broken pipe (-32)
2018-12-24 13:35:15.649 1706-2018/? E/CameraService: binderDied: Java client's binder died, removing it from the list of active clients
2018-12-24 13:35:15.824 26324-26332/? E/.gms.persisten: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe
2018-12-24 13:35:16.111 26297-26374/com.google.android.inputmethod.latin E/LatinCountersUtils: Unhandled flavor name: preload
2018-12-24 13:35:16.145 26297-26297/com.google.android.inputmethod.latin E/putmethod.lati: The String#value field is not present on Android versions >= 6.0
2018-12-24 13:35:16.167 1704-1945/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2018-12-24 13:35:16.172 26297-26374/com.google.android.inputmethod.latin E/LatinCountersUtils: Unhandled flavor name: preload
2018-12-24 13:35:16.179 26297-26374/com.google.android.inputmethod.latin E/LatinCountersUtils: Unhandled flavor name: preload
2018-12-24 13:35:16.361 1704-1931/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2018-12-24 13:35:16.765 26324-26324/? E/.gms.persisten: The String#value field is not present on Android versions >= 6.0
2018-12-24 13:35:17.599 26378-26378/com.google.android.googlequicksearchbox:search E/OverlaySController: Calling with an invalid UID, the interface will not work
2018-12-24 13:35:17.612 26420-26420/com.google.android.gms E/gle.android.gm: The String#value field is not present on Android versions >= 6.0
2018-12-24 13:35:17.651 26378-26453/com.google.android.googlequicksearchbox:search E/earchbox:searc: The String#value field is not present on Android versions >= 6.0

subodhsri avatar Dec 24 '18 08:12 subodhsri

@n1ru4l works without audio.

const options = { quality: RNCamera.Constants.VideoQuality['4:3'], mute : true, maxDuration: 5 };

rohithzr avatar Jan 03 '19 11:01 rohithzr

I get the same error using takePictureAsync:

01-27 20:07:47.247  1793  1880 E InputDispatcher: channel 'c6f1e65 com.sysocrapp/com.sysocrapp.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
01-27 20:07:47.310  1663 18404 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-OutputStream: getBufferLockedCommon: Stream 2: Can't dequeue next output buffer: Broken pipe (-32)
01-27 20:07:47.310  1663 18404 E Camera3-Device: RequestThread: Can't get output buffer, skipping request: Broken pipe (-32)
...

I take a picture every second and it works for around 5 seconds and then I get this error.

Edit: I just noticed this only happens if the emulator has been running for a while.

Lythenas avatar Jan 27 '19 19:01 Lythenas

fixed on latest

subodhsri avatar Feb 01 '19 05:02 subodhsri