question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG]: flutterSoundHelper.convertFile crash on release app

See original GitHub issue

Flutter Sound Version :

  • FULL flavor ?

  • Important: Result of the command : flutter pub deps | grep flutter_sound


Severity

  • Crash on release app

Platforms you faced the error

  • Android

  • Real device


Describe the bug On debug mode, i used flutterSoundHelper.convertFile to convert the temp file created by the recorder to permanent file; i record on aac as temp and convert to premanent mp3; this work well on debug, but when i build a release app, record work well, but when on convert , the app crash, i said that is the convert the problem cause i put a specifi button to convert aac to mp3, and when the button clicked, the app crash,


Logs!!!

i put some try catch on my code to see the output, this is the log on debug

I/flutter (14966): ---------------------------------------- I/flutter (14966): convert start I/flutter (14966): ---------------------------------------- D/flutter-ffmpeg(14966): Running FFmpeg with arguments: [-loglevel, error, -y, -i, /data/user/0/com.example.topos/cache/300621-19#58-Bornage-Immatriculation.aac, /storage/emulated/0/Topos/300621-19#58-Bornage-Immatriculation.mp3]. I/mobile-ffmpeg(14966): Loading mobile-ffmpeg. I/mobile-ffmpeg(14966): Loaded mobile-ffmpeg-full-arm64-v8a-4.4-lts-20200724. D/mobile-ffmpeg(14966): Callback thread started. D/flutter-ffmpeg(14966): FFmpeg exited with rc: 0 I/flutter (14966): ---------------------------------------- I/flutter (14966): convert end I/flutter (14966): ----------------------------------------

the aac file is the temp file, and the mp3 is the result of convert, the file is successfuly converted and it appear in the path where it would be. i don’t know if this line "D/flutter-ffmpeg(14966): Running FFmpeg with arguments: [-loglevel, error, -y, -i, " mean something important or not cause this error text.

But on release this convert make the app crash.

Below screenshot of my full code to save the record

Screenshot_3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:52

github_iconTop GitHub Comments

1reaction
Larpouxcommented, Jul 3, 2021

Hi Necro,

Flutter Sound 8.1.9 is released. This version has a fix for your issue.

You must also check your build.gradle :

  • Remove any reference to repository jcenter()
  • Add a reference to mavenCentral() if not already done

I wrote a very simple example here that record an AAC audio, convert it to MP3 and playback it. You probably do not need any more this example : your code was correct and the problem was on Flutter FFmpeg.

Thank you for your patience

1reaction
mhstollercommented, Jul 1, 2021

Might be better off using flutter sound lite and including ffmpeg as a separate dependency and running the commands directly.

Flutter_ffmpeg likes to crash or output weird things when multiple jobs are run concurrently. I had to create a queue system for ffmpeg calls to work around this. I’m sure there are other quirks and something like that could be causing this issue.

Best way forward is probably to run ffmpeg directly so you have full control over the process

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG]: flutterSoundHelper.convertFile crash on release app ...
On debug mode, i used flutterSoundHelper.convertFile to convert the temp file created by the recorder to permanent file; i record on aac as...
Read more >
Flutter Sound: flutterSoundHelper.convertFile crash on ...
But on release, when the app tried to convert the file, the app crash recording and playing recorded file work well but the...
Read more >
[BUG]: flutterSoundHelper.convertFile crash on release app
On debug mode, i used flutterSoundHelper.convertFile to convert the temp file created by the recorder to permanent file; i record on aac as...
Read more >
Flutter Sound: flutterSoundHelper.convertFile crash on release app
I used Flutter Sound package to make a recorder app, On debug, my app can record, play record, convert the temp file recorded...
Read more >
Flutter Sound CHANGELOG | The τ Project documentation.
For me, this bug was the main Flutter Sound issue, by far. ... If your App is protected by the GPL License, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found