[BUG]: Null duration for iOS
See original GitHub issueFlutter Sound Version :
-
FULL or LITE flavor ? FULL
-
Important: Result of the command :
flutter pub deps | grep flutter_sound
|-- flutter_sound 8.4.1+1 | |-- flutter_sound_platform_interface 8.4.1 | |-- flutter_sound_web 8.4.1 | | |-- flutter_sound_platform_interfaceβ¦
- Important: Result of the command :
flutter doctor -v
[β] Flutter (Channel master, 2.6.0-12.0.pre.382, on Mac OS X 10.15.7 19H524 darwin-x64, locale en-ES) β’ Flutter version 2.6.0-12.0.pre.382 at /Users/juancarlos/Library/flutter β’ Upstream repository https://github.com/flutter/flutter.git β’ Framework revision 34ec94a16d (37 minutes ago), 2021-10-19 01:33:08 -0700 β’ Engine revision faa45f497f β’ Dart version 2.15.0 (build 2.15.0-226.0.dev)
[β] Android toolchain - develop for Android devices (Android SDK version 31.0.0) β’ Android SDK at /Users/juancarlos/Library/Android/sdk β’ Platform android-31, build-tools 31.0.0 β’ Java binary at: /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents/Home/bin/java β’ Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822) β’ All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 12.4) β’ Xcode at /Applications/Xcode.app/Contents/Developer ! Flutter recommends a minimum Xcode version of 13.0.0. Download the latest version or update via the Mac App Store. β’ CocoaPods version 1.11.2
[β] Chrome - develop for the web β’ Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[β] Android Studio β’ Android Studio at /Applications/Android Studio Preview.app/Contents β’ Flutter plugin can be installed from: π¨ https://plugins.jetbrains.com/plugin/9212-flutter β’ Dart plugin can be installed from: π¨ https://plugins.jetbrains.com/plugin/6351-dart β’ Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
[β] Connected device (2 available) β’ iPhone 12 Pro Max (mobile) β’ 62EAA909-B18C-426F-AE70-89592050365E β’ ios β’ com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) β’ Chrome (web) β’ chrome β’ web-javascript β’ Google Chrome 94.0.4606.81
! Doctor found issues in 1 category.
Severity
-
Crash ? No
-
Result is not what expected ? Yes
-
Cannot build my App ? No, I can build my app
-
Minor issue ? Yes
Platforms you faced the error
-
iOS ? Yes
-
Android ? No
-
Flutter Web ?
-
Emulator ? Yes (it didnβt work in an iPhone emulator but it worked in an Android emulator)
-
Real device ? Yes (it didnβt work in an iPhone but it worked in an Android device)
Describe the bug
Duration of an audio file is null for iOS and non-null for Android.
FlutterSoundFFprobeβs getMediaInformation assigns null to variable r in line 782:
var r = await _methodChannel
.invokeMethod('getMediaInformation', {'path': path});
To Reproduce Steps to reproduce the behavior:
- Execute
return await flutterSoundHelper.duration('https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_1MG.mp3');
Logs!!!
(This is very important. Most of the time we cannot do anything if we do not have information on your bug).
To activate the logs, you must instantiate your modules with the Log Level set to Level.debug
:
FlutterSoundPlayer myPlayer = FlutterSoundPlayer(logLevel: Level.debug);
FlutterSoundRecorder myRecorder = FlutterSoundRecorder(logLevel: Level.debug);
See this
flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 new FlutterSoundPlayer (package:flutter_sound/public/flutter_sound_player.dart:213:13) flutter: β #1 new AudioPlayerV1Widget (package:solon_app/views/widgets/audio_player_v1_widget.dart:28:39) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π ctor: FlutterSoundPlayer() flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer._openAudioSession (package:flutter_sound/public/flutter_sound_player.dart:671:13) flutter: β #1 FlutterSoundPlayer.openAudioSession.<anonymous closure> (package:flutter_sound/public/flutter_sound_player.dart:651:17) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:β> openAudioSession flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer._openAudioSession (package:flutter_sound/public/flutter_sound_player.dart:686:15) flutter: β #1 FlutterSoundPlayer.openAudioSession.<anonymous closure> (package:flutter_sound/public/flutter_sound_player.dart:651:17) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π Resetting flutter_sound Player Plugin flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:β> initializeFlautoPlayer flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:β> initializeFlautoPlayer flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π iOS: invokeMethod openPlayerCompleted - state=0 flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.openPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:334:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:120:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π β> openPlayerCompleted: true flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.openPlayerCompleted (package:flutter_sound/public/flutter_sound_player.dart:349:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:120:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π <β openPlayerCompleted: true flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:<-- initializeFlautoPlayer flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer._openAudioSession (package:flutter_sound/public/flutter_sound_player.dart:710:13) flutter: β #1 <asynchronous suspension> flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:<β openAudioSession flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.isDecoderSupported (package:flutter_sound/public/flutter_sound_player.dart:900:13) flutter: β #1 _AudioPlayerV1WidgetState._asyncInit (package:solon_app/views/widgets/audio_player_v1_widget.dart:176:31) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:β> isDecoderSupported flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer._needToConvert (package:flutter_sound/public/flutter_sound_player.dart:880:13) flutter: β #1 FlutterSoundPlayer.isDecoderSupported (package:flutter_sound/public/flutter_sound_player.dart:909:9) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:β> needToConvert flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer._needToConvert (package:flutter_sound/public/flutter_sound_player.dart:888:13) flutter: β #1 FlutterSoundPlayer.isDecoderSupported (package:flutter_sound/public/flutter_sound_player.dart:909:9) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:<β needToConvert flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:<-- initializeFlautoPlayer flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:β> isDecoderSupported flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.isDecoderSupported (package:flutter_sound/public/flutter_sound_player.dart:927:13) flutter: β #1 <asynchronous suspension> flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:<β isDecoderSupported flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_player.dart:942:13) flutter: β #1 _AudioPlayerV1WidgetState._asyncInit (package:solon_app/views/widgets/audio_player_v1_widget.dart:179:26) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:β> setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:<-- isDecoderSupported flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:β> setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:β> setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:<-- setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.setSubscriptionDuration (package:flutter_sound/public/flutter_sound_player.dart:950:13) flutter: β #1 <asynchronous suspension> flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π FS:<---- setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 new FlutterSoundFFmpegConfig (package:flutter_sound/public/util/flutter_sound_ffmpeg.dart:195:12) flutter: β #1 FlutterSoundHelper.isFFmpegAvailable (package:flutter_sound/public/util/flutter_sound_helper.dart:78:30) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π Loading flutter-ffmpeg. flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Loaded mobile-ffmpeg-audio-x86_64-4.4-lts-20200725 flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 FlutterSoundPlayer.log (package:flutter_sound/public/flutter_sound_player.dart:500:13) flutter: β #1 MethodChannelFlutterSoundPlayer.channelMethodCallHandler (package:flutter_sound_platform_interface/method_channel_flutter_sound_player.dart:161:19) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π IOS:<-- setSubscriptionDuration flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β #0 new FlutterSoundFFmpegConfig.<anonymous closure> (package:flutter_sound/public/util/flutter_sound_ffmpeg.dart:203:41) flutter: β #1 _rootRunUnary (dart:async/zone.dart:1436:47) flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ flutter: β π Loaded flutter-ffmpeg-ios-x86_64. flutter: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top GitHub Comments
Sorry for the bug. I am going to work on it today
Bug was first added in version 8.3.3.