audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

AndroidAudioError, MEDIA_ERROR_UNKNOWN {what:-38}, MEDIA_ERROR_UNKNOWN {extra:0}, null) ERROR

Open Sameetdmr opened this issue 1 year ago • 11 comments

Checklist

  • [X] I read the troubleshooting guide before raising this issue
  • [X] I made sure that the issue I am raising doesn't already exist

Current bug behaviour

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(AndroidAudioError, MEDIA_ERROR_UNKNOWN {what:-38}, MEDIA_ERROR_UNKNOWN {extra:0}, null)

Expected behaviour

Expected Behaviour The application should handle audio playback without any crashes or errors, regardless of the audio source or format. Specifically:

No PlatformException or MEDIA_ERROR_UNKNOWN errors should occur. The audio should play smoothly or provide a clear, recoverable error message in case of an unsupported format. Crashlytics should not log any fatal exceptions related to audio playback. This behavior is expected across all supported platforms, especially Android devices.

Steps to reproduce

No response

Code sample

No response

Affected platforms

Android

Platform details

Android 8.1.0

AudioPlayers Version

audioplayers: ^5.2.1

Build mode

release

Audio Files/URLs/Sources

No response

Screenshots

No response

Logs

my relevant logs
Full Logs
my full logs or a link to a gist

Flutter doctor:

Output of: flutter doctor -v

Related issues / more information

No response

Working on PR

no way

Sameetdmr avatar Dec 19 '24 07:12 Sameetdmr

+1

silaakarapur avatar Dec 19 '24 07:12 silaakarapur

MEDIA_ERROR_UNKNOWN {extra:0} on the sentry

package version 6.1.0 Flutter 3.24.5

Android : PlatformException(AndroidAudioError, MEDIA_ERROR_UNKNOWN {what:-38}, MEDIA_ERROR_UNKNOWN {extra:0}, null)

iOS: PlatformException(DarwinAudioError, Failed to set source. For troubleshooting, see https://github.com/bluefireteam/audioplayers/blob/main/troubleshooting.md, AVPlayerItem.Status.failed on setSourceUrl: Unknown error, null)

device variety : iphone 11 to iphone 15 all versions and android devices both samsung and xiaomi

utkudenis avatar Dec 22 '24 11:12 utkudenis

Same

sinelser avatar Jan 25 '25 18:01 sinelser

Any update on this one?

sinelser avatar Feb 20 '25 15:02 sinelser

Any update? same issue

DmitriyM avatar Mar 02 '25 20:03 DmitriyM

On android, I am getting a media error when I use UrlSource which looks something like this issue.

Though it works fine on linux and a web app.

On android, if I fetch the mp3 data with an http.Client.get request and just use the body of the response as the uint8list for a BytesSource, the media player works fine.

Is there some type of configuration necessary to allow the media player to fetch the media from a website? There was some mention of cors in troubleshooting, but I am not familiar enough with android know what do do with that. I don't have any trouble fetching from the website directly in my code, but that probably falls under the generic internet permission whereas the android media player may expect some additional permission or configuration. It has to be within the android call before any attempt to hit the website because my server doesn't see anything when using UrlSource on android.

hendrik-brower avatar Mar 05 '25 02:03 hendrik-brower

Same here, please fix

mjurfest avatar Mar 26 '25 16:03 mjurfest

Having the same issue. It was working fine, but suddenly, it threw that error and crashed the app.

waqadArshad avatar May 06 '25 10:05 waqadArshad

+1

giantss avatar May 16 '25 07:05 giantss

same

josemojena avatar Jun 13 '25 16:06 josemojena

same

nawafAlkhadidi avatar Nov 06 '25 11:11 nawafAlkhadidi