Skip to content

Platform channel issue #1917

@GhayasAbouFakher

Description

@GhayasAbouFakher

Checklist

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

Current bug behaviour

[ERROR:flutter/shell/common/shell.cc(1057)] The 'xyz.luan/audioplayers/events/eb9931aa-9221-4632-84b1-0912f3a84d09' 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.

Expected behaviour

Platform channel messages must be sent on the platform thread.

Steps to reproduce

  1. Execute flutter run on the code sample
  2. ...
  3. ...

Code sample

Code sample
void alarm_timer_func() async {
AudioPlayer player = AudioPlayer();
await player.play(AssetSource('sounds/alert1.mp3'));
}

Affected platforms

Windows

Platform details

Windows 11, Microsoft Surface 3

AudioPlayers Version

6.4.0

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

this issue is not causing crash or something but I'm afraid of facing some issues in Prod Mode.

Working on PR

no way

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions