Open jvaleski opened 3 months ago
@ryanheise can you please let us know how can we resolve this issue
Same issue here. Unit test fails. But plugin is tagged for ANDROID IOS MACOS WEB support.
https://pub.dev/packages/just_audio
MissingPluginException(No implementation found for method disposeAllPlayers on channel com.ryanheise.just_audio.methods)
package:flutter/src/services/platform_channel.dart 308:7 MethodChannel._invokeMethod
===== asynchronous gap ===========================
dart:async _CustomZone.registerBinaryCallback
package:just_audio_platform_interface/method_channel_just_audio.dart 29:10 MethodChannelJustAudio.disposeAllPlayers
package:just_audio/just_audio.dart 30:22 _pluginPlatform
package:just_audio/just_audio.dart 1340:38 AudioPlayer._setPlatformActive.setPlatform
package:just_audio/just_audio.dart 1451:17 AudioPlayer._setPlatformActive
package:just_audio/just_audio.dart 784:20 AudioPlayer.load
package:just_audio/just_audio.dart 755:24 AudioPlayer.setAudioSource
package:just_audio/just_audio.dart 687:7 AudioPlayer.setFilePath
@PKiman , what kind of test are you using? A unit test or an integration test?
@jvaleski please take a look at the unit tests included in this repo under just_audio/test/just_audio_test.dart
which are working (although admittedly not very idiomatic, currently).
I am using unit test in another software project.
These lines are enough to produce the error on MacOS:
flutter clean && flutter test
minimal_test.dart
import 'package:just_audio/just_audio.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
void main() async {
TestWidgetsFlutterBinding.ensureInitialized();
group('test group1', () {
test('Test 1', () {
final AudioPlayer player = AudioPlayer();
final durationObj = await player.setFilePath('path_to_audio.m4a');
player.dispose();
});
});
}
Have you tried the unit tests in this repository?
Which API doesn't behave as documented, and how does it misbehave? setUrl() appears to be causing two MissingPluginExceptions to be raised when I run my test via
Minimal reproduction project test/file_access_test.dart
pubspec.yaml for just_audio and tests
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
Error messages
Expected behavior expecting that things run without the exception issue
Desktop (please complete the following information):
Flutter SDK version