FossifyOrg / Voice-Recorder

An easy way of recording any discussion or sounds without ads or internet access
https://www.fossify.org
GNU General Public License v3.0
257 stars 19 forks source link

Completely ruined recording: Error: java.io.FileNotFoundException: /data/user/0/org.fossify.voicerecorder/... #56

Open svyatoclav opened 5 months ago

svyatoclav commented 5 months ago

Checklist

Affected app version

1.0.0

Affected Android/Custom ROM version

Android 13

Affected device model

HTC U23 pro

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. Start recording mp3 320Kbps with save to Internal/Music/Recordings
  2. Record 50+ minutes
  3. I also turned the screen off and on several times while recording (and probably paused recording several times)
  4. Press pause at the end, wait about 1-3 minutes and then press stop
  5. Get an error and lose the recording πŸ’€πŸ’€πŸ’€

Expected behavior

Save my important recording...

Actual behavior

Error: java.io.FileNotFoundException: /data/user/0/org.fossify.voicerecorder/... and missing file

Screenshots/Screen recordings

photo_2_2024-06-16_21-32-19 photo_1_2024-06-16_21-32-19

Additional information

Last version from F-Droid. I just recorded very important information and this bug completely ruined it πŸ’€πŸ’€πŸ’€

Frankly I haven't tried to reproduce it yet, but I'll do it now and then post the result here in the comments.

UPD: Tried 23+ minutes and didn't wait after pausing, didn't get an error. Continuing debugging...

naveensingh commented 1 month ago

Got another similar report via email.

greenlucid commented 4 weeks ago

Device: Redmi Note 12 Pro 5G

I've experienced this issue ~5 times already. The longer the recording, the more chances it has to happen, but I've had it happen with recordings ~1h to ~6h, all the same. The issue will always occur when you press the "stop" button, moment in which the app either renders the error or successful save.

Happens both with .mp3 or .m4a. Broken attempts at recordings show as 0 B, both in phone's file explorer and from the recordings folder in the app. Trying to open from Voice Recorder app (by tapping the file in "Player" tab) returns java.lang.IllegalStateException error toast.

Pausing has nothing to do with the error. I've never used that feature and reproduced the error anyway.

Also experienced this error when using this app, which has almost same UI, which I guess is a fork project or an older version?: https://github.com/SimpleMobileTools/Simple-Voice-Recorder

I don't know Kotlin, but dig around the code trying to fix it myself since it affects me so often and it's forcing me to use other apps to record

This function last updated 4 years ago, I think it has good chances to contain the bug? I reproduce the error exactly when the stop button is pressed: https://github.com/FossifyOrg/Voice-Recorder/blame/3d5de3d3df488f256afa9c7bb309371fe26c59a6/app/src/main/kotlin/org/fossify/voicerecorder/services/RecorderService.kt#L186

If this is not possible to fix, may I ask some kind of "autosave" feature? Maybe, attempt to save the recording every minute or so. So, at worst I'll lose 1min of notes. Otherwise I'm going to have to go back to whatsapp to record myself

I'd love to fix this btw but I don't know how to Android development