audioplayers
audioplayers copied to clipboard
Bug on Windows when player.play
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
Activate failed to create mediasink. Call OutputNode::GetUINT32(MF_TOPONODE_MAJORTYPE) for more information.MediaEngine error
Expected behaviour
Play sound
Steps to reproduce
Works on iOS and Android
final player = AudioPlayer(); await player.play(AssetSource("audio.mp3"));
Code sample
Code sample
void main() {
}
Affected platforms
Windows
Platform details
Windows 10 and 11
AudioPlayers Version
6.0.0
Build mode
debug, 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
The 'xyz.luan/audioplayers/events/30397293-c286-43db-8767-17482e66e6b2' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
Yes, my app crash right after I hit the play button and receive that error in production.
got the same error also..but it seems like randomly happen
this causes crash on production!!! there isn't any fix or workaround?!
If your build using msix to build for production, you can update the the version msix: ^3.16.8. Some main x64 dll files in msix packages causing crash when using with some other packages. I hope this help you solve the problem.
[ERROR:flutter/shell/common/shell.cc(1053)] The 'xyz.luan/audioplayers/events/ea371097-692e-4ac8-b48b-729706cbb90f' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information. [ERROR:flutter/shell/common/shell.cc(1053)] The 'xyz.luan/audioplayers/events/25109c86-1076-4561-9ec3-3db75e4d098e' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel. See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
in windows 10
We are also hitting this intermittently in Production. It happens maybe 5% of the time, but hard crashes every time this condition occurs.
@mlb5000 try to use alternate plug-in.
[ERROR:flutter/shell/common/shell.cc(1057)] The 'xyz.luan/audioplayers/events/902fce96-7911-4315-9a96-f2dbb9c4dfb5' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
Still crash on release mode on Windows
I noticed that on Debug mode don't crash...
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.32.4, on Microsoft Windows [Version 10.0.26100.4351], locale pt-BR) [√] Windows Version (11 Pro 64-bit, 24H2, 2009) [√] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.13.5) [√] Android Studio (version 2024.1) [√] VS Code (version 1.101.2) [√] Connected device (3 available) [√] Network resources