Skip to content

[BUG] Player is not playing while seeking #26

Closed

Description

@SaadArdati

Sounds Version :

^1.0.0-beta.7


Severity

  • Minor issue

Platforms you faced the error

Android pixel 3a emulator.


Logs

E/flutter (18016): [ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: Player is not playing.
E/flutter (18016): #0      SoundPlayer.pause (package:sounds/src/sound_player.dart:394:7)
E/flutter (18016): #1      SoundPlayer._onSystemPaused (package:sounds/src/sound_player.dart:521:5)
E/flutter (18016): #2      onSystemPaused (package:sounds/src/sound_player.dart:874:51)
E/flutter (18016): #3      SoundPlayerShadePlugin.onMethodCallback (package:sounds/src/plugins/sound_player_shade_plugin.dart:73:11)
E/flutter (18016): #4      BasePlugin._onMethodCallback (package:sounds/src/plugins/base_plugin.dart:96:12)
E/flutter (18016): #5      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:431:55)
E/flutter (18016): #6      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:384:34)
E/flutter (18016): #7      _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:283:33)
E/flutter (18016): #8      _invoke3.<anonymous closure> (dart:ui/hooks.dart:282:15)
E/flutter (18016): #9      _rootRun (dart:async/zone.dart:1190:13)
E/flutter (18016): #10     _CustomZone.run (dart:async/zone.dart:1093:19)
E/flutter (18016): #11     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
E/flutter (18016): #12     _invoke3 (dart:ui/hooks.dart:281:10)
E/flutter (18016): #13     _dispatchPlatformMessage (dart:ui/hooks.dart:156:5)

flutter doctor :

[√] Flutter (Channel master, 1.21.0-8.0.pre.122, on Microsoft Windows [Version 10.0.19041.388], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] Connected device (4 available)

! Doctor found issues in 1 category.

(using android studio beta, weird bug in flutter doctor)

flutter pub deps :

Dart SDK 2.10.0-4.0.dev.flutter-0341576448
Flutter SDK 1.21.0-8.0.pre.122

|-- animations 1.1.2
|   '-- flutter...
|-- async 2.5.0-nullsafety
|   '-- collection...
|-- bloc 6.0.1
|   '-- meta...
|-- blurhash 0.2.0
|   '-- flutter...
|-- blurhash_dart 0.2.3
|-- build_runner 1.10.2
|   |-- args 1.6.0
|   |-- async...
|   |-- build...
|   |-- build_config 0.4.2
|   |   |-- checked_yaml 1.0.2
|   |   |   |-- json_annotation...
|   |   |   |-- source_span...
|   |   |   '-- yaml...
|   |   |-- json_annotation...
|   |   |-- meta...
|   |   |-- path...
|   |   |-- pubspec_parse...
|   |   '-- yaml...
|   |-- build_daemon 2.1.4
|   |   |-- built_collection 4.3.2
|   |   |   |-- collection...
|   |   |   '-- quiver...
|   |   |-- built_value 7.1.0
|   |   |   |-- built_collection...
|   |   |   |-- collection...
|   |   |   |-- fixnum 0.10.11
|   |   |   '-- quiver...
|   |   |-- http_multi_server...
|   |   |-- logging...
|   |   |-- path...
|   |   |-- pedantic...
|   |   |-- pool...
|   |   |-- shelf...
|   |   |-- shelf_web_socket...
|   |   |-- stream_transform...
|   |   |-- watcher...
|   |   '-- web_socket_channel...
|   |-- build_resolvers 1.3.11
|   |   |-- analyzer...
|   |   |-- build...
|   |   |-- crypto...
|   |   |-- graphs...
|   |   |-- logging...
|   |   |-- package_config...
|   |   |-- path...
|   |   '-- pub_semver...
|   |-- build_runner_core 6.0.1
|   |   |-- async...
|   |   |-- build...
|   |   |-- build_config...
|   |   |-- build_resolvers...
|   |   |-- collection...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- glob...
|   |   |-- graphs...
|   |   |-- json_annotation...
|   |   |-- logging...
|   |   |-- meta...
|   |   |-- package_config...
|   |   |-- path...
|   |   |-- pedantic...
|   |   |-- pool...
|   |   |-- timing...
|   |   |-- watcher...
|   |   '-- yaml...
|   |-- code_builder 3.4.0
|   |   |-- built_collection...
|   |   |-- built_value...
|   |   |-- collection...
|   |   |-- matcher...
|   |   '-- meta...
|   |-- collection...
|   |-- crypto...
|   |-- dart_style 1.3.6
|   |   |-- analyzer...
|   |   |-- args...
|   |   |-- path...
|   |   '-- source_span...
|   |-- glob 1.2.0
|   |   |-- async...
|   |   |-- collection...
|   |   |-- node_io 1.1.1
|   |   |   |-- node_interop 1.1.1
|   |   |   |   '-- js...
|   |   |   '-- path...
|   |   |-- path...
|   |   |-- pedantic...
|   |   '-- string_scanner...
|   |-- graphs 0.2.0
|   |-- http_multi_server 2.2.0
|   |   '-- async...
|   |-- io 0.3.4
|   |   |-- charcode...
|   |   |-- meta...
|   |   |-- path...
|   |   '-- string_scanner...
|   |-- js 0.6.2
|   |-- logging 0.11.4
|   |-- meta...
|   |-- mime 0.9.7
|   |-- path...
|   |-- pedantic...
|   |-- pool 1.4.0
|   |   |-- async...
|   |   '-- stack_trace...
|   |-- pub_semver 1.4.4
|   |   '-- collection...
|   |-- pubspec_parse 0.1.5
|   |   |-- checked_yaml...
|   |   |-- json_annotation...
|   |   |-- pub_semver...
|   |   '-- yaml...
|   |-- shelf 0.7.7
|   |   |-- async...
|   |   |-- collection...
|   |   |-- http_parser...
|   |   |-- path...
|   |   |-- stack_trace...
|   |   '-- stream_channel...
|   |-- shelf_web_socket 0.2.3
|   |   |-- shelf...
|   |   |-- stream_channel...
|   |   '-- web_socket_channel...
|   |-- stack_trace...
|   |-- stream_transform 1.2.0
|   |-- timing 0.1.1+2
|   |   '-- json_annotation...
|   |-- watcher...
|   |-- web_socket_channel 1.1.0
|   |   |-- async...
|   |   |-- crypto...
|   |   '-- stream_channel...
|   '-- yaml 2.2.1
|       |-- charcode...
|       |-- collection...
|       |-- source_span...
|       '-- string_scanner...
|-- cloud_firestore 0.13.7
|   |-- cloud_firestore_platform_interface 1.1.2
|   |   |-- collection...
|   |   |-- firebase_core...
|   |   |-- flutter...
|   |   |-- meta...
|   |   '-- plugin_platform_interface...
|   |-- cloud_firestore_web 0.1.1+2
|   |   |-- cloud_firestore_platform_interface...
|   |   |-- firebase 7.3.0
|   |   |   |-- http...
|   |   |   |-- http_parser...
|   |   |   '-- js...
|   |   |-- firebase_core...
|   |   |-- flutter...
|   |   |-- flutter_web_plugins 0.0.0
|   |   |   |-- characters...
|   |   |   |-- collection...
|   |   |   |-- flutter...
|   |   |   |-- meta...
|   |   |   |-- typed_data...
|   |   |   '-- vector_math...
|   |   |-- http_parser...
|   |   |-- js...
|   |   '-- meta...
|   |-- firebase_core 0.4.5
|   |   |-- firebase_core_platform_interface 1.0.4
|   |   |   |-- flutter...
|   |   |   |-- meta...
|   |   |   |-- plugin_platform_interface...
|   |   |   '-- quiver...
|   |   |-- firebase_core_web 0.1.1+2
|   |   |   |-- firebase...
|   |   |   |-- firebase_core_platform_interface...
|   |   |   |-- flutter...
|   |   |   |-- flutter_web_plugins...
|   |   |   |-- js...
|   |   |   '-- meta...
|   |   |-- flutter...
|   |   '-- meta...
|   |-- flutter...
|   '-- meta...
|-- connectivity 0.4.9
|   |-- connectivity_for_web 0.3.1
|   |   |-- connectivity_platform_interface...
|   |   |-- flutter...
|   |   '-- flutter_web_plugins...
|   |-- connectivity_macos 0.1.0+3
|   |   '-- flutter...
|   |-- connectivity_platform_interface 1.0.6
|   |   |-- flutter...
|   |   |-- meta...
|   |   '-- plugin_platform_interface...
|   |-- flutter...
|   '-- meta...
|-- data_connection_checker 0.3.4
|-- dio 3.0.10
|   |-- http_parser 3.1.4
|   |   |-- charcode...
|   |   |-- collection...
|   |   |-- source_span...
|   |   |-- string_scanner...
|   |   '-- typed_data...
|   '-- path 1.8.0-nullsafety
|-- dotted_border 1.0.6
|   |-- flutter...
|   '-- path_drawing 0.4.1
|       |-- flutter...
|       |-- meta...
|       |-- path_parsing 0.1.4
|       |   |-- meta...
|       |   '-- vector_math...
|       '-- vector_math...
|-- equatable 1.2.3
|   |-- collection...
|   '-- meta...
|-- firebase_auth 0.16.1
|   |-- firebase_auth_platform_interface 1.1.8
|   |   |-- flutter...
|   |   |-- meta...
|   |   '-- plugin_platform_interface...
|   |-- firebase_auth_web 0.1.3+1
|   |   |-- firebase...
|   |   |-- firebase_auth_platform_interface...
|   |   |-- flutter...
|   |   |-- flutter_web_plugins...
|   |   |-- http_parser...
|   |   |-- js...
|   |   '-- meta...
|   |-- firebase_core...
|   |-- flutter...
|   '-- meta...
|-- firebase_crashlytics 0.1.4+1
|   |-- flutter...
|   '-- stack_trace 1.10.0-nullsafety
|       '-- path...
|-- firebase_dynamic_links 0.5.3
|   '-- flutter...
|-- flutter 0.0.0
|   |-- characters 1.1.0-nullsafety.2
|   |-- collection 1.15.0-nullsafety.2
|   |-- meta...
|   |-- sky_engine 0.0.99
|   |-- typed_data 1.3.0-nullsafety.2
|   |   '-- collection...
|   '-- vector_math 2.1.0-nullsafety.2
|-- flutter_bloc 6.0.1
|   |-- bloc...
|   |-- flutter...
|   '-- provider...
|-- flutter_blurhash 0.5.0
|   |-- flutter...
|   '-- meta...
|-- flutter_downloader 1.5.0
|   '-- flutter...
|-- flutter_test 0.0.0
|   |-- async...
|   |-- boolean_selector 2.1.0-nullsafety
|   |   |-- source_span...
|   |   '-- string_scanner...
|   |-- characters...
|   |-- charcode 1.2.0-nullsafety
|   |-- clock 1.1.0-nullsafety
|   |-- collection...
|   |-- fake_async 1.1.0-nullsafety
|   |   |-- clock...
|   |   '-- collection...
|   |-- flutter...
|   |-- matcher 0.12.10-nullsafety
|   |   '-- stack_trace...
|   |-- meta...
|   |-- path...
|   |-- source_span 1.8.0-nullsafety
|   |   |-- charcode...
|   |   |-- collection...
|   |   |-- path...
|   |   '-- term_glyph...
|   |-- stack_trace...
|   |-- stream_channel 2.1.0-nullsafety
|   |   '-- async...
|   |-- string_scanner 1.1.0-nullsafety
|   |   |-- charcode...
|   |   '-- source_span...
|   |-- term_glyph 1.2.0-nullsafety
|   |-- test_api 0.2.19-nullsafety
|   |   |-- async...
|   |   |-- boolean_selector...
|   |   |-- collection...
|   |   |-- matcher...
|   |   |-- meta...
|   |   |-- path...
|   |   |-- source_span...
|   |   |-- stack_trace...
|   |   |-- stream_channel...
|   |   |-- string_scanner...
|   |   '-- term_glyph...
|   |-- typed_data...
|   '-- vector_math...
|-- flutter_widgets 0.1.12
|   |-- collection...
|   |-- flutter...
|   |-- html 0.14.0+3
|   |   |-- csslib 0.16.2
|   |   |   '-- source_span...
|   |   '-- source_span...
|   |-- meta...
|   '-- quiver 2.1.3
|       |-- matcher...
|       '-- meta...
|-- google_fonts 1.1.0
|   |-- crypto...
|   |-- flutter...
|   |-- http 0.12.2
|   |   |-- http_parser...
|   |   |-- path...
|   |   '-- pedantic...
|   |-- path_provider...
|   '-- pedantic...
|-- google_sign_in 4.5.1
|   |-- flutter...
|   |-- google_sign_in_platform_interface 1.1.2
|   |   |-- flutter...
|   |   |-- meta...
|   |   '-- quiver...
|   |-- google_sign_in_web 0.9.1+1
|   |   |-- flutter...
|   |   |-- flutter_web_plugins...
|   |   |-- google_sign_in_platform_interface...
|   |   |-- js...
|   |   '-- meta...
|   '-- meta...
|-- hive 1.4.3
|   |-- crypto...
|   '-- meta...
|-- hive_flutter 0.3.1
|   |-- flutter...
|   |-- hive...
|   |-- path...
|   '-- path_provider...
|-- hive_generator 0.7.1
|   |-- analyzer 0.39.17
|   |   |-- _fe_analyzer_shared 7.0.0
|   |   |   '-- meta...
|   |   |-- args...
|   |   |-- charcode...
|   |   |-- cli_util 0.2.0
|   |   |   '-- path...
|   |   |-- collection...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- glob...
|   |   |-- html...
|   |   |-- meta...
|   |   |-- package_config 1.9.3
|   |   |   |-- charcode...
|   |   |   '-- path...
|   |   |-- path...
|   |   |-- pub_semver...
|   |   |-- source_span...
|   |   |-- watcher...
|   |   '-- yaml...
|   |-- build 1.3.0
|   |   |-- analyzer...
|   |   |-- async...
|   |   |-- convert...
|   |   |-- crypto...
|   |   |-- glob...
|   |   |-- logging...
|   |   |-- meta...
|   |   '-- path...
|   |-- dartx 0.5.0
|   |   |-- characters...
|   |   |-- collection...
|   |   |-- crypto...
|   |   |-- meta...
|   |   |-- path...
|   |   '-- time 1.3.0
|   |-- hive...
|   '-- source_gen 0.9.6
|       |-- analyzer...
|       |-- async...
|       |-- build...
|       |-- dart_style...
|       |-- glob...
|       |-- meta...
|       |-- path...
|       |-- pedantic...
|       '-- source_span...
|-- howler 1.1.2
|   '-- swiss_knife 2.5.8
|       |-- intl...
|       '-- resource_portable 2.1.7
|           '-- typed_data...
|-- html_unescape 1.0.1+3
|-- meta 1.3.0-nullsafety.2
|-- network_image_to_byte 0.0.1
|   '-- flutter...
|-- path_provider 1.6.11
|   |-- flutter...
|   |-- path_provider_linux 0.0.1+2
|   |   |-- flutter...
|   |   |-- path...
|   |   |-- path_provider_platform_interface...
|   |   '-- xdg_directories 0.1.0
|   |       |-- flutter...
|   |       |-- path...
|   |       '-- process 3.0.13
|   |           |-- file 5.2.1
|   |           |   |-- intl...
|   |           |   |-- meta...
|   |           |   '-- path...
|   |           |-- intl...
|   |           |-- meta...
|   |           |-- path...
|   |           '-- platform...
|   |-- path_provider_macos 0.0.4+3
|   |   '-- flutter...
|   '-- path_provider_platform_interface 1.0.2
|       |-- flutter...
|       |-- meta...
|       |-- platform 2.2.1
|       '-- plugin_platform_interface 1.0.2
|           '-- meta...
|-- pedantic 1.9.2
|   '-- meta...
|-- preload_page_view 0.1.4
|   '-- flutter...
|-- provider 4.3.2
|   |-- collection...
|   |-- flutter...
|   '-- nested 0.0.4
|       '-- flutter...
|-- salsa_entities 0.0.0
|   |-- json_annotation 3.0.1
|   '-- meta...
|-- sounds 1.0.0-beta.7
|   |-- device_info 0.4.2+4
|   |   '-- flutter...
|   |-- flutter...
|   |-- flutter_spinkit 4.1.2+1
|   |   '-- flutter...
|   |-- meta...
|   |-- path...
|   |-- path_provider...
|   |-- provider...
|   |-- sounds_common 1.0.7
|   |   |-- flutter...
|   |   |-- intl 0.16.1
|   |   |   '-- path...
|   |   |-- logger 0.9.2
|   |   |-- meta...
|   |   |-- path...
|   |   |-- pedantic...
|   |   '-- uuid...
|   '-- uuid...
|-- string_validator 0.1.4
|-- transparent_image 1.0.0
|-- uni_links 0.4.0
|   '-- flutter...
|-- url_launcher 5.5.0
|   |-- flutter...
|   |-- url_launcher_linux 0.0.1+1
|   |   '-- flutter...
|   |-- url_launcher_macos 0.0.1+7
|   |   '-- flutter...
|   |-- url_launcher_platform_interface 1.0.7
|   |   |-- flutter...
|   |   |-- meta...
|   |   '-- plugin_platform_interface...
|   '-- url_launcher_web 0.1.2
|       |-- flutter...
|       |-- flutter_web_plugins...
|       |-- meta...
|       |-- platform_detect 1.4.0
|       |   |-- meta...
|       |   '-- pub_semver...
|       '-- url_launcher_platform_interface...
|-- uuid 2.2.0
|   |-- convert 2.1.1
|   |   |-- charcode...
|   |   '-- typed_data...
|   '-- crypto 2.1.5
|       |-- collection...
|       |-- convert...
|       '-- typed_data...
'-- watcher 0.9.7+15
    |-- async...
    |-- path...
    '-- pedantic...


Describe the bug
For every Slider widget update, i seek the player. It happened to throw this error with no reference to my code.

Activity

  1. bsutton commented on Aug 16, 2020

    @bsutton
    Owner

    Why do you mean by Slider widget?

    It looks like you are using the shade. Do you also have an in app Slider?

    The core bug appears to be that the system pause didn't handle the fact that the player might already be pause. This should be ready to fix.

  2. SaadArdati commented on Aug 16, 2020

    @SaadArdati
    Author

    Yes I have a standard material slider widget, it calls on changed several times while scrubbing through it, triggering seek() several times which triggered the error. This isn't easy to reproduce consistently

  3. bsutton commented on Aug 16, 2020

    @bsutton
    Owner

    So why are you using SoundPlayer.withUI() rather than SoundPlayer.noUI() ?

  4. SaadArdati commented on Aug 16, 2020

    @SaadArdati
    Author

    Music apps have sliders in the UI and in the shade player of course. This is standard UI practice

  5. bsutton commented on Aug 16, 2020

    @bsutton
    Owner

    That's fine as long as it is what you intended.

  6. relf108 commented on Aug 18, 2020

    @relf108
    Collaborator

    Was unable to replicate this bug for testing but the latest beta release should fix your problem. Let me know if you're still having issues.

  7. added a commit that references this issue on Dec 9, 2020
    4198514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions