Skip to content

Android: recorderController.stop() hangs intermittently, resulting in corrupted .m4a file #516

Description

@sebacutuli

Description:
The function stop() sometimes never resolves, and forcing it with a timeout leaves the .m4a file unreadable (MEDIA_ERROR_UNKNOWN, No audio format found). It's easier to see this issue after a fresh install of the applition using it.

Steps To Reproduce:

  1. Go to the screen where the record button is.
  2. Click on 'it.
  3. After a few seconds of audio recording, click on the Stop button.
  4. See the error

Expected behavior
The Stop() function should stop the recording immediately.

Actual behavoir:
The Stop() function doesn't stop and recording appears to be going on forerever (until the timeout is seen, otherwise, the user needs to put the app in backgound and come back).

Smartphone (please complete the following information).

  • Device: Redmi Note 13 Pro 5g
  • OS: Xiaomi HyperOS
  • Version 3.0.302.0.WNREUXM.C07
  • Android version: 16 BP2A.250605.031.A3

Screenshots
No screenshot is needed since you would only see a recorder working when the stop function is triggered.

Additional context
Stack trace from the flutter console:

Stack_trace_flutter_console_StopFunction.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions