react-native-sound-recorder icon indicating copy to clipboard operation
react-native-sound-recorder copied to clipboard

File not found after stop recording on real device

Open jindalashish opened this issue 5 years ago • 5 comments

No error being shown on start and stop and all the permissions are granted to app. After stop recording it shows file path but no file is saved on specified path. I'm using PATH_CACHE for saving file.

jindalashish avatar Jul 05 '20 21:07 jindalashish

Is there a duration?

kevinresol avatar Aug 19 '20 15:08 kevinresol

I have same problem too. And I get undefined duration.

EDIT: Even though I got undefined duration, but I get the audio path, and I can play the recorded audio. I tried it with react-native-sound and I can play the audio. Here is my snippet:

import Sound from "react-native-sound"
...
SoundRecorder.stop()
    .then(function (result, duration) {
        // you will get undefined duration here, but I think it's okay
        console.log("stopped recording, audio file saved at: " + result.path + " , with duration: " + duration)
        const sound = new Sound(result.path, "", (error) => {
            if (error) {
                console.log("Error", error)
            }

            sound.play()
        })
    })

irzan2010 avatar Feb 28 '21 02:02 irzan2010

SoundRecorder.start( SoundRecorder.PATH_CACHE + '/' + fileName + '.mp4', { quality: SoundRecorder.QUALITY_MAX, format : SoundRecorder.FORMAT_AAC_ADTS,

    }
  ).then(function () {
    console.log('started recording');
    setAudioStatus('stop');
  });

rasheedk avatar Jun 12 '21 09:06 rasheedk

After stopping recording, it shows the file path but no file is saved on the specified path. I'm using PATH_CACHE for saving files. my fill path is:-file:///data/user/0/com.myapp/cache/test.mp4, but there is no file.

this issue only comes on android

xoniersumit avatar Jan 24 '22 06:01 xoniersumit

@xoniersumit same issue with me. No file path created.

Srijan67 avatar Dec 07 '22 08:12 Srijan67