AndroidAudioError, MEDIA_ERROR_UNKNOWN {what:-38}, MEDIA_ERROR_UNKNOWN {extra:0}, null) ERROR
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
+1
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
Same
Any update on this one?
Any update? same issue
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.
Same here, please fix
Having the same issue. It was working fine, but suddenly, it threw that error and crashed the app.
+1
same
same