audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

Bug on Windows when player.play

Open Bilonik opened this issue 1 year ago • 10 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

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

Bilonik avatar Jul 09 '24 22:07 Bilonik

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.

Bilonik avatar Jul 10 '24 21:07 Bilonik

Yes, my app crash right after I hit the play button and receive that error in production.

tranhuudang avatar Jul 15 '24 02:07 tranhuudang

got the same error also..but it seems like randomly happen

weilong333 avatar Aug 10 '24 02:08 weilong333

this causes crash on production!!! there isn't any fix or workaround?!

Ali-Fadaei avatar Aug 13 '24 16:08 Ali-Fadaei

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.

tranhuudang avatar Aug 29 '24 01:08 tranhuudang

[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

jonahzheng avatar Dec 23 '24 08:12 jonahzheng

We are also hitting this intermittently in Production. It happens maybe 5% of the time, but hard crashes every time this condition occurs.

mlb5000 avatar Mar 20 '25 11:03 mlb5000

@mlb5000 try to use alternate plug-in.

Ali-Fadaei avatar Mar 22 '25 19:03 Ali-Fadaei

[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.

kjxbyz avatar Mar 23 '25 13:03 kjxbyz

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

rodolfogoulart avatar Jun 28 '25 16:06 rodolfogoulart