You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Marijn Giesen (JIRA)" <ji...@apache.org> on 2017/01/12 10:21:43 UTC

[jira] [Comment Edited] (CB-12240) Recording audio with MediaPlugin on Android failed with exception

    [ https://issues.apache.org/jira/browse/CB-12240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15820666#comment-15820666 ] 

Marijn Giesen edited comment on CB-12240 at 1/12/17 10:21 AM:
--------------------------------------------------------------

The problem still persists with the latest version of the plugin (2.4.1). I encounter this error on all devices I'm testing on (HTC 10, Samsung S6, Genymotion simulator) with Android version 5 and 6.



was (Author: marijngiesen):
The problem still persists with the latest version of the plugin (2.4.1). I encounter this error on all devices I'm testing on (HTC 10, Samsung S6, Genymotion simulator).


> Recording audio with MediaPlugin on Android failed with exception
> -----------------------------------------------------------------
>
>                 Key: CB-12240
>                 URL: https://issues.apache.org/jira/browse/CB-12240
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Media
>         Environment: Android
>            Reporter: Marijn Giesen
>              Labels: Android
>
> Recording audio using the MediaPlugin on Android fails with exception. The audiorecorder seems to be working, but the file never gets created. 
> The following exception is shown in the logs:
> {noformat}
> 12-12 05:57:08.397  1777  1818 D AudioPlayer: stopping recording
> 12-12 05:57:08.401  1777  1818 D AudioPlayer: size = 2
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: /storage/emulated/0/tmprecording-1481540219004.3gp: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: java.io.FileNotFoundException: /storage/emulated/0/tmprecording-1481540219004.3gp: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.IoBridge.open(IoBridge.java:452)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at java.io.FileInputStream.<init>(FileInputStream.java:76)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.moveFile(AudioPlayer.java:213)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.stopRecording(AudioPlayer.java:271)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.destroy(AudioPlayer.java:133)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioHandler.release(AudioHandler.java:276)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:170)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.Handler.dispatchMessage(Handler.java:102)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.Looper.loop(Looper.java:148)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.HandlerThread.run(HandlerThread.java:61)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.Posix.open(Native Method)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.IoBridge.open(IoBridge.java:438)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	... 15 more
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: /storage/emulated/0/tmprecording-1481540219004.3gp: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: java.io.FileNotFoundException: /storage/emulated/0/tmprecording-1481540219004.3gp: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.IoBridge.open(IoBridge.java:452)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at java.io.FileInputStream.<init>(FileInputStream.java:76)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.moveFile(AudioPlayer.java:213)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.stopRecording(AudioPlayer.java:271)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioPlayer.destroy(AudioPlayer.java:133)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioHandler.release(AudioHandler.java:276)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:170)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.Handler.dispatchMessage(Handler.java:102)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.Looper.loop(Looper.java:148)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at android.os.HandlerThread.run(HandlerThread.java:61)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.Posix.open(Native Method)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	at libcore.io.IoBridge.open(IoBridge.java:438)
> 12-12 05:57:08.402  1777  1818 E AudioPlayer: 	... 15 more
> {noformat}
> This can be easily reproduced by running the following code on an Android emulator or phone. iOS does NOT have this issue:
> {noformat}
> fileRecord = new MediaPlugin('./.aep-recording.wav');
> fileRecord.startRecording();
> fileRecord.stopRecording();
> {noformat}
> Output from ionic info
> {noformat}
> Cordova CLI: 6.4.0
> Ionic Framework Version: 2.0.0-rc.3
> Ionic CLI Version: 2.1.14
> Ionic App Lib Version: 2.1.7
> Ionic App Scripts Version: 0.0.46
> ios-deploy version: 1.8.6
> ios-sim version: 5.0.8
> OS: OS X El Capitan
> Node Version: v6.9.1
> Xcode version: Xcode 8.1 Build version 8B62
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org