Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13548

MediaRecorder start failed: -38

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-plugin-media
    • Labels:
      None

      Description

      I got the following error while trying to record and play audio

      ```
      11-07 16:30:46.405 254 28912 E AudioRecord: start() status -38
      11-07 16:30:46.407 254 28912 D audio_hw_primary: adev_close_input_stream: enter:stream_handle(0xaa92e1e0)
      11-07 16:30:46.407 254 28912 D audio_hw_primary: in_standby: enter: stream (0xaa92e1e0) usecase(9: audio-record)
      11-07 16:30:46.407 26596 26761 E MediaRecorder: start failed: -38
      11-07 16:30:46.408 26596 26761 W System.err: java.lang.IllegalStateException
      11-07 16:30:46.408 26596 26761 W System.err: at android.media.MediaRecorder.start(Native Method)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.media.AudioPlayer.startRecording(AudioPlayer.java:160)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.media.AudioHandler.startRecordingAudio(AudioHandler.java:287)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.media.AudioHandler.promptForRecord(AudioHandler.java:543)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:118)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.PluginManager.exec(PluginManager.java:132)
      11-07 16:30:46.408 26596 26761 W System.err: at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
      11-07 16:30:46.408 26596 26761 W System.err: at org.crosswalk.engine.XWalkExposedJsApi.exec(XWalkExposedJsApi.java:40)
      11-07 16:30:46.408 26596 26761 W System.err: at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
      11-07 16:30:46.408 26596 26761 W System.err: at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
      11-07 16:30:46.408 26596 26761 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
      11-07 16:30:46.408 26596 26761 W System.err: at android.os.Looper.loop(Looper.java:148)
      11-07 16:30:46.408 26596 26761 W System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
      11-07 16:30:46.408 26596 26761 W PluginManager: THREAD WARNING: exec() call to Media.startRecordingAudio blocked the main thread for 30ms. Plugin should use CordovaInterface.getThreadPool().
      11-07 16:30:46.413 26596 26596 I chromium: [INFO:CONSOLE(241630)] "audio startRecord ", source: file:///android_asset/www/build/vendor.js (241630)
      11-07 16:30:46.423 26596 26596 I chromium: [INFO:CONSOLE(241630)] "Error!", source: file:///android_asset/www/build/vendor.js (241630)
      11-07 16:30:47.882 778 3576 I ActivityManager: Killing 24540:org.cyanogenmod.providers.datausage/1000 (adj 15): empty #17
      11-07 16:30:49.165 778 3576 D WifiService: acquireWifiLockLocked: WifiLock

      {NlpWifiLock type=2 binder=android.os.BinderProxy@e8e572f}
      11-07 16:30:49.165 778 2670 E native : do suspend false
      11-07 16:30:49.222 778 3575 D WifiService: releaseWifiLockLocked: WifiLock{NlpWifiLock type=2 binder=android.os.BinderProxy@e8e572f}

      11-07 16:30:49.222 778 2670 E native : do suspend false
      11-07 16:30:49.246 10924 27030 W ctxmgr : [AclManager]No 2 for (accnt=account#1440844415#, com.google.android.gms(10012):UserLocationProducer, vrsn=11745000, 0, 3pPkg = null , 3pMdlId = null , pid = 10924). Was: 2 for 1, account#1440844415#
      11-07 16:30:49.249 10924 27030 W ctxmgr : [AclManager]No 2 for (accnt=account#-1123646904#, com.google.android.gms(10012):UserLocationProducer, vrsn=11745000, 0, 3pPkg = null , 3pMdlId = null , pid = 10924). Was: 2 for 1, account#-1123646904#
      11-07 16:30:49.251 10924 27030 W ctxmgr : [AclManager]No 2 for (accnt=account#531569869#, com.google.android.gms(10012):UserLocationProducer, vrsn=11745000, 0, 3pPkg = null , 3pMdlId = null , pid = 10924). Was: 2 for 1, account#531569869#
      11-07 16:30:49.252 10924 27030 W ctxmgr : [AclManager]No 2 for (accnt=account#-2026525518#, com.google.android.gms(10012):UserLocationProducer, vrsn=11745000, 0, 3pPkg = null , 3pMdlId = null , pid = 10924). Was: 2 for 1, account#-2026525518#
      11-07 16:30:49.253 10924 27030 W ctxmgr : [AclManager]No 2 for (accnt=account#-1170278782#, com.google.android.gms(10012):UserLocationProducer, vrsn=11745000, 0, 3pPkg = null , 3pMdlId = null , pid = 10924). Was: 2 for 1, account#-1170278782#
      11-07 16:30:53.363 26596 26596 I chromium: [INFO:CONSOLE(241630)] "audio stopRecord ", source: file:///android_asset/www/build/vendor.js (241630)
      11-07 16:30:53.368 26596 26761 D AudioPlayer: stopping recording
      11-07 16:30:53.368 26596 26761 D AudioPlayer: size = 1
      11-07 16:30:53.368 26596 26761 D AudioPlayer: renaming /storage/emulated/0/tmprecording-1510101046383.3gp to ...
      11-07 16:30:53.368 26596 26761 E AudioPlayer: FAILED renaming /storage/emulated/0/tmprecording-1510101046383.3gp to ...
      11-07 16:30:53.375 26596 26596 I chromium: [INFO:CONSOLE(241630)] "duration:", source: file:///android_asset/www/build/vendor.js (241630)
      11-07 16:30:53.379 26596 26596 I chromium: [INFO:CONSOLE(241630)] "status is ", source: file:///android_asset/www/build/vendor.js (241630)
      11-07 16:30:53.382 26596 26596 I chromium: [INFO:CONSOLE(241630)] "Action is successful", source: file:///android_asset/www/build/vendor.js (241630)
      ```

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              JunGoh711 Jun Goh
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: