KRTirtho / spotube

🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
https://spotube.krtirtho.dev/
Other
30.79k stars 1.27k forks source link

Music stops #2047

Closed chiruhemsworth closed 2 weeks ago

chiruhemsworth commented 2 weeks ago

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

Current Behavior

The app isn't working in background when I press back button twice, I checked all battery restrictions

Expected Behavior

The app should still play songs when I exit app using back button.

Steps to reproduce

No response

Logs

Logs ``` rk.dart:5780) #722 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #723 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #724 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5771) #725 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #726 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #727 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #728 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642) #729 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #730 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #731 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #732 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #733 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #734 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642) #735 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780) #736 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #737 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #738 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5771) #739 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #740 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #741 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #742 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642) #743 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5780) #744 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #745 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #746 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:5771) #747 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #748 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #749 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #750 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642) #751 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #752 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #753 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #754 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #755 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #756 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5642) #757 Element.rebuild (package:flutter/src/widgets/framework.dart:5333) #758 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:5599) #759 ComponentElement.mount (package:flutter/src/widgets/framework.dart:5593) #760 Element.inflateWidget (package:flutter/src/widgets/framework.dart:4468) #761 Element.updateChild (package:flutter/src/widgets/framework.dart:3963) #762 _LayoutBuilderElement._rebuildWithConstraints.updateChildCallback (package:flutter/src/widgets/layout_builder.dart:207) #763 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:3038) #764 _LayoutBuilderElement._rebuildWithConstraints (package:flutter/src/widgets/layout_builder.dart:231) #765 RenderObject.invokeLayoutCallback. (package:flutter/src/rendering/object.dart:2719) #766 PipelineOwner._enableMutationsToDirtySubtrees (package:flutter/src/rendering/object.dart:1098) #767 RenderObject.invokeLayoutCallback (package:flutter/src/rendering/object.dart:2719) #768 RenderConstrainedLayoutBuilder.rebuildIfNecessary (package:flutter/src/widgets/layout_builder.dart:278) #769 _RenderLayoutBuilder.performLayout (package:flutter/src/widgets/layout_builder.dart:369) #770 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #771 MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:173) #772 _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:1092) #773 MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:237) #774 RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:404) #775 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #776 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #777 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #778 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #779 _RenderCustomClip.performLayout (package:flutter/src/rendering/proxy_box.dart:1448) #780 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #781 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #782 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #783 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #784 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #785 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #786 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #787 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #788 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #789 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #790 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #791 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #792 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #793 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #794 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #795 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #796 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #797 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #798 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #799 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #800 RenderOffstage.performLayout (package:flutter/src/rendering/proxy_box.dart:3728) #801 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #802 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #803 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #804 _RenderTheaterMixin.layoutChild (package:flutter/src/widgets/overlay.dart:1002) #805 _RenderTheater.performLayout (package:flutter/src/widgets/overlay.dart:1311) #806 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #807 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #808 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #809 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #810 RenderObject.layout (package:flutter/src/rendering/object.dart:2608) #811 RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:111) #812 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:2446) #813 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1052) #814 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:1065) #815 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:602) #816 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1164) #817 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:468) #818 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1397) #819 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1318) #820 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1176) #821 _rootRun (dart:async/zone.dart:1399) #822 _CustomZone.run (dart:async/zone.dart:1301) #823 _CustomZone.runGuarded (dart:async/zone.dart:1209) #824 _invoke (dart:ui/hooks.dart:314) #825 PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419) #826 _drawFrame (dart:ui/hooks.dart:283) ---------------------------------------- [2024-11-05 04:46:17.987762]--------------------- DioException [bad response]: This exception was thrown because the response has a status code of 401 and RequestOptions.validateStatus was configured to throw for this status code. The status code of 401 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled" Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code. #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:509) #1 CustomSpotifyEndpoints.getFriendActivity (package:spotube/services/custom_spotify_endpoints/spotify_endpoints.dart:113) #2 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:348) ---------------------------------------- [2024-11-05 04:46:18.227077]--------------------- Error Code: 403 Insufficient client scope #0 SpotifyApiBase.handleResponseWithBody (package:spotify/src/spotify_base.dart:282) #1 SpotifyApiBase._requestWrapper (package:spotify/src/spotify_base.dart:256) #2 SpotifyApiBase._getImpl (package:spotify/src/spotify_base.dart:210) #3 CursorPages.getPage (package:spotify/src/endpoints/endpoint_paging.dart:292) #4 SinglePages.stream.handlePageAndGetNext (package:spotify/src/endpoints/endpoint_paging.dart:187) ---------------------------------------- [2024-11-05 04:46:18.463380]--------------------- Error Code: 401 Valid user authentication required #0 SpotifyApiBase.handleResponseWithBody (package:spotify/src/spotify_base.dart:282) #1 SpotifyApiBase._requestWrapper (package:spotify/src/spotify_base.dart:256) #2 SpotifyApiBase._getImpl (package:spotify/src/spotify_base.dart:210) #3 Me.get (package:spotify/src/endpoints/me.dart:22) #4 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:348) ---------------------------------------- [2024-11-05 04:46:37.468229]--------------------- Error Code: 400 No search query #0 SpotifyApiBase.handleResponseWithBody (package:spotify/src/spotify_base.dart:282) #1 SpotifyApiBase._requestWrapper (package:spotify/src/spotify_base.dart:256) #2 SpotifyApiBase._getImpl (package:spotify/src/spotify_base.dart:210) #3 BundledPages._parseBundledPage (package:spotify/src/endpoints/endpoint_paging.dart:324) #4 SearchNotifier.fetch (package:spotube/provider/spotify/search/search.dart:47) #5 SearchNotifier.build (package:spotube/provider/spotify/search/search.dart:74) #6 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:348) ---------------------------------------- [2024-11-05 04:46:37.473394]--------------------- Error Code: 400 No search query #0 SpotifyApiBase.handleResponseWithBody (package:spotify/src/spotify_base.dart:282) #1 SpotifyApiBase._requestWrapper (package:spotify/src/spotify_base.dart:256) #2 SpotifyApiBase._getImpl (package:spotify/src/spotify_base.dart:210) #3 BundledPages._parseBundledPage (package:spotify/src/endpoints/endpoint_paging.dart:324) #4 SearchNotifier.fetch (package:spotube/provider/spotify/search/search.dart:47) #5 SearchNotifier.build (package:spotube/provider/spotify/search/search.dart:74) #6 FutureHandlerProviderElementMixin.handleFuture.. (package:riverpod/src/async_notifier/base.dart:348) ---------------------------------------- [2024-11-05 04:46:38.297758]--------------------- NoSuchMethodError: The method '[]' was called on null. Receiver: null Tried calling: []("__typename") #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38) #1 _objectNoSuchMethod (dart:core-patch/object_patch.dart:85) #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:385) #5 ListIterator.moveNext (dart:_internal/iterable.dart:354) #6 WhereIterator.moveNext (dart:_internal/iterable.dart:450) #7 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:202) #8 new _GrowableList.of (dart:core-patch/growable_array.dart:152) #9 new List.of (dart:core-patch/array_patch.dart:39) #10 Iterable.toList (dart:core/iterable.dart:498) #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:385) #14 ListIterator.moveNext (dart:_internal/iterable.dart:354) #15 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189) #16 new _GrowableList.of (dart:core-patch/growable_array.dart:150) #17 new List.of (dart:core-patch/array_patch.dart:39) #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:348) --------------------------------------- -```

Operating System

Android

Spotube version

v3.8.3

Installation source

GitHub Releases (Binary)

Additional information

No response

Self grab