flutter_sound icon indicating copy to clipboard operation
flutter_sound copied to clipboard

[BUG] Hosted Flutter Web app does not return audio length:

Open Kurczaak opened this issue 1 year ago • 1 comments

Flutter Sound Version :

  • FULL or LITE flavor ?

  • Full

  • Important: Result of the command : flutter pub deps | grep flutter_sound │ ├── flutter_sound 9.16.3 │ │ ├── flutter_sound_platform_interface 9.16.3 │ │ ├── flutter_sound_web 9.16.3 │ │ │ ├── flutter_sound_platform_interface...


Severity

  • Cannot run on web hosted app

Platforms you faced the error

  • Flutter Web

Describe the bug The plugin works fine in debug mode. When I deploy my app to web I am unable to get the length of an audio file. That's what I see in the web console:

main.dart.js:3437 Uncaught Error: MissingPluginException(No implementation found for method openPlayer on channel xyz.canardoux.flutter_sound_player)
    at Object.d (main.dart.js:3437:19)
    at main.dart.js:67180:15
    at aEz.a (main.dart.js:4820:63)
    at aEz.$2 (main.dart.js:37513:14)
    at aDA.$1 (main.dart.js:37507:21)
    at a2d.Kx (main.dart.js:38591:32)
    at axR.$0 (main.dart.js:37893:11)
    at Object.wM (main.dart.js:4931:40)
    at aa.q3 (main.dart.js:37827:3)
    at axK.$0 (main.dart.js:37863:13)

To Reproduce Steps to reproduce the behavior: try to run this piece of code on a web-hosted app:

await _audioPlayer.openPlayer();
    final duration = await _audioPlayer.startPlayer(
      fromURI: url,
    );

Logs!!!!

Since it happend only on a deployed version my only log is:

main.dart.js:3437 Uncaught Error: MissingPluginException(No implementation found for method openPlayer on channel xyz.canardoux.flutter_sound_player)
    at Object.d (main.dart.js:3437:19)
    at main.dart.js:67180:15
    at aEz.a (main.dart.js:4820:63)
    at aEz.$2 (main.dart.js:37513:14)
    at aDA.$1 (main.dart.js:37507:21)
    at a2d.Kx (main.dart.js:38591:32)
    at axR.$0 (main.dart.js:37893:11)
    at Object.wM (main.dart.js:4931:40)
    at aa.q3 (main.dart.js:37827:3)
    at axK.$0 (main.dart.js:37863:13)

Kurczaak avatar Oct 28 '24 06:10 Kurczaak

@Kurczaak , please look to (#921) and tell us if this solves your issue. Note : someone should add this to the doc

Larpoux avatar Oct 28 '24 08:10 Larpoux