Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playback Delay Issue #2605

Open
1 of 2 tasks
XonyKon opened this issue Mar 27, 2025 · 0 comments
Open
1 of 2 tasks

Playback Delay Issue #2605

XonyKon opened this issue Mar 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@XonyKon
Copy link

XonyKon commented Mar 27, 2025

Is there an existing issue for this? (Please read the description)

  • I have searched the existing issues

Current Behavior

When I press play on a track, there is a delay of a few seconds before playback starts. This happens even though my internet connection is fast and stable. The app does not seem to perform preloading of the track, so loading only begins after pressing play instead of starting immediately.

Expected Behavior

Playback should start immediately after pressing play, without any delay. The app should preload at least the first few seconds of the track to ensure instant playback.

Steps to reproduce

  1. Open the app and go to the music library or a playlist.
  2. Select any track.
  3. Press play to start playback.
  4. Notice that the music does not start immediately; there is a delay of a few seconds before playback begins.
  5. This issue occurs even with a fast and stable internet connection.

Logs

[2025-03-27 11:48:40.592084]---------------------
NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38)
#1 _objectNoSuchMethod (dart:core-patch/object_patch.dart:88)
#2 transformSectionItemTypeJsonMap (package:spotube/models/spotify/home_feed.dart:174)
#3 transformSectionItemJsonMap. (package:spotube/models/spotify/home_feed.dart:220)
#4 MappedIterable.elementAt (dart:_internal/iterable.dart:402)
#5 ListIterator.moveNext (dart:_internal/iterable.dart:371)
#6 WhereIterator.moveNext (dart:_internal/iterable.dart:467)
#7 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:203)
#8 new _GrowableList.of (dart:core-patch/growable_array.dart:152)
#9 new List.of (dart:core-patch/array_patch.dart:40)
#10 Iterable.toList (dart:core/iterable.dart:499)
#11 transformSectionItemJsonMap (package:spotube/models/spotify/home_feed.dart:229)
#12 transformHomeFeedJsonMap. (package:spotube/models/spotify/home_feed.dart:241)
#13 MappedIterable.elementAt (dart:_internal/iterable.dart:402)
#14 ListIterator.moveNext (dart:_internal/iterable.dart:371)
#15 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:190)
#16 new _GrowableList.of (dart:core-patch/growable_array.dart:150)
#17 new List.of (dart:core-patch/array_patch.dart:40)
#18 ListIterable.toList (dart:_internal/iterable.dart:224)
#19 transformHomeFeedJsonMap (package:spotube/models/spotify/home_feed.dart:244)
#20 CustomSpotifyEndpoints.getHomeFeed (package:spotube/services/custom_spotify_endpoints/spotify_endpoints.dart:164)

#21 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:355)

[2025-03-27 11:48:44.063469]---------------------
type 'Null' is not a subtype of type 'String' in type cast
#0 _$$InvidiousMonitorImplFromJson (package:invidious/src/models/model.g.dart:477)
#1 new _$InvidiousMonitorImpl.fromJson (package:invidious/src/models/model.freezed.dart:5728)
#2 _$InvidiousMonitorFromJson (package:invidious/src/models/model.freezed.dart:5309)
#3 new InvidiousMonitor.fromJson (package:invidious/src/models/responses/instance.dart:128)
#4 _$$InvidiousInstanceDetailsImplFromJson (package:invidious/src/models/model.g.dart:361)
#5 new _$InvidiousInstanceDetailsImpl.fromJson (package:invidious/src/models/model.freezed.dart:4092)
#6 _$InvidiousInstanceDetailsFromJson (package:invidious/src/models/model.freezed.dart:3858)
#7 new InvidiousInstanceDetails.fromJson (package:invidious/src/models/responses/instance.dart:28)
#8 _$$InvidiousInstanceResponseImplFromJson (package:invidious/src/models/model.g.dart:336)
#9 new _$InvidiousInstanceResponseImpl.fromJson (package:invidious/src/models/model.freezed.dart:3792)
#10 _$InvidiousInstanceResponseFromJson (package:invidious/src/models/model.freezed.dart:3668)
#11 new InvidiousInstanceResponse.fromJson (package:invidious/src/models/responses/instance.dart:11)
#12 InstancesEndpoint.instances. (package:invidious/src/endpoints/instances.dart:13)
#13 MappedIterable.elementAt (dart:_internal/iterable.dart:402)
#14 ListIterator.moveNext (dart:_internal/iterable.dart:371)
#15 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:190)
#16 new _GrowableList.of (dart:core-patch/growable_array.dart:150)
#17 new List.of (dart:core-patch/array_patch.dart:40)
#18 ListIterable.toList (dart:_internal/iterable.dart:224)

#19 InstancesEndpoint.instances (package:invidious/src/endpoints/instances.dart:17)

#20 invidiousInstancesProvider. (package:spotube/provider/audio_player/sources/invidious_instances_provider.dart:7)

#21 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:355)

[2025-03-27 11:50:47.701276]---------------------
RangeError (length): Invalid value: Valid value range is empty: 1
#0 List.elementAt (dart:core-patch/growable_array.dart)
#1 AudioPlayerStreamListeners.subscribeToPosition. (package:spotube/provider/audio_player/audio_player_streams.dart:118)
#2 _rootRunUnary (dart:async/zone.dart:1538)
#3 _CustomZone.runUnary (dart:async/zone.dart:1429)
#4 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329)
#5 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#6 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:312)
#7 _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:154)
#8 _DistinctStream._handleData (dart:async/stream_pipe.dart:532)
#9 _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:184)
#10 _rootRunUnary (dart:async/zone.dart:1538)
#11 _CustomZone.runUnary (dart:async/zone.dart:1429)
#12 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1329)
#13 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:381)
#14 _DelayedData.perform (dart:async/stream_impl.dart:573)
#15 _PendingEvents.handleNext (dart:async/stream_impl.dart:678)
#16 _PendingEvents.schedule. (dart:async/stream_impl.dart:649)
#17 _rootRun (dart:async/zone.dart:1517)
#18 _CustomZone.run (dart:async/zone.dart:1422)
#19 _CustomZone.runGuarded (dart:async/zone.dart:1321)
#20 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1362)
#21 _rootRun (dart:async/zone.dart:1525)
#22 _CustomZone.run (dart:async/zone.dart:1422)
#23 _CustomZone.runGuarded (dart:async/zone.dart:1321)
#24 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1362)
#25 _microtaskLoop (dart:async/schedule_microtask.dart:40)
#26 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

Operating System

android, versione 14

Spotube version

v4.0.2

Installation source

Website (spotube.krtirtho.dev)

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@XonyKon XonyKon added the bug Something isn't working label Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant