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

App closes while going back with back gesture #2292

Closed
1 of 2 tasks
harpreet100 opened this issue Jan 31, 2025 · 1 comment
Closed
1 of 2 tasks

App closes while going back with back gesture #2292

harpreet100 opened this issue Jan 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@harpreet100
Copy link

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

  • I have searched the existing issues

Current Behavior

Instead of minimizing and running at the background the app just closes and music stops while pressing the back button twice . But if the swipe up is used, the music keeps running.

Expected Behavior

The app should keep running the music even when the back button is pressed twice. It should have same behavior as swipe up.

Steps to reproduce

  1. I opened the app and played music
  2. Try to go back with the back gesture.
  3. App quits and stop playing music if i need to go to home screen with back gesture.

Logs

Logs
ion.request
package:drift/src/remote/client_impl.dart 101                      _BaseExecutor._runRequest
package:drift/src/remote/client_impl.dart 110                      _BaseExecutor._intRequest
package:drift/src/remote/client_impl.dart 135                      _BaseExecutor.runInsert
package:drift/src/utils/lazy_database.dart 81                      LazyDatabase.runInsert
package:drift/src/runtime/api/connection.dart 117                  DatabaseConnection.runInsert
package:drift/src/utils/lazy_database.dart 81                      LazyDatabase.runInsert
package:drift/src/runtime/query_builder/statements/insert.dart 74  InsertStatement.insert.<fn>
package:drift/src/runtime/api/connection_user.dart 171             DatabaseConnectionUser.doWhenOpened.<fn>
dart:async/zone.dart 1422                                          _rootRunUnary
package:drift/src/runtime/query_builder/statements/insert.dart 73  InsertStatement.insert
package:spotube/services/sourced_track/sources/youtube.dart 68     YoutubeSourcedTrack.fetchFromTrack
package:spotube/services/sourced_track/sourced_track.dart 168      SourcedTrack.fetchFromTrack
package:spotube/provider/server/sourced_track.dart 27              SourcedTrackNotifier.build
package:riverpod/src/async_notifier/base.dart 355                  FutureHandlerProviderElementMixin.handleFuture.<fn>.<fn>

----------------------------------------
[2025-01-31 10:40:10.237946]---------------------
SqliteException(2067): while executing statement, UNIQUE constraint failed: source_match_table.track_id, source_match_table.source_id, source_match_table.source_type, constraint failed (code 2067)
  Causing statement: INSERT INTO "source_match_table" ("track_id", "source_id", "source_type") VALUES (?, ?, ?), parameters: 2XgfZtgDvD9O1BLoDwZUmq, VbnYLoytmi4, youtube
package:sqlite3/src/implementation/exception.dart 75               throwException
package:sqlite3/src/implementation/statement.dart 109              StatementImplementation._execute
package:sqlite3/src/implementation/statement.dart 289              StatementImplementation.executeWith
package:sqlite3/src/statement.dart 79                              CommonPreparedStatement.execute
package:drift/src/sqlite3/database.dart 149                        Sqlite3Delegate.runWithArgsSync
package:drift/native.dart 384                                      _NativeDelegate.runInsert.<fn>
dart:async/future.dart 313                                         new Future.sync
package:drift/native.dart 383                                      _NativeDelegate.runInsert
package:drift/src/runtime/executor/helpers/engines.dart 105        _BaseExecutor.runInsert.<fn>
package:drift/src/runtime/executor/helpers/engines.dart 61         _BaseExecutor._synchronized
package:drift/src/runtime/executor/helpers/engines.dart 102        _BaseExecutor.runInsert
package:drift/src/runtime/api/connection.dart 117                  DatabaseConnection.runInsert
package:drift/src/remote/server_impl.dart 161                      ServerImplementation._runQuery
package:drift/src/remote/server_impl.dart 119                      ServerImplementation._handleRequest.<fn>
package:drift/src/remote/communication.dart 165                    DriftCommunication.setRequestHandler.<fn>
===== asynchronous gap ===========================
package:drift/src/remote/communication.dart 113                    DriftCommunication.request
package:drift/src/remote/client_impl.dart 101                      _BaseExecutor._runRequest
package:drift/src/remote/client_impl.dart 110                      _BaseExecutor._intRequest
package:drift/src/remote/client_impl.dart 135                      _BaseExecutor.runInsert
package:drift/src/utils/lazy_database.dart 81                      LazyDatabase.runInsert
package:drift/src/runtime/api/connection.dart 117                  DatabaseConnection.runInsert
package:drift/src/utils/lazy_database.dart 81                      LazyDatabase.runInsert
package:drift/src/runtime/query_builder/statements/insert.dart 74  InsertStatement.insert.<fn>
package:drift/src/runtime/api/connection_user.dart 171             DatabaseConnectionUser.doWhenOpened.<fn>
dart:async/zone.dart 1422                                          _rootRunUnary
package:drift/src/runtime/query_builder/statements/insert.dart 73  InsertStatement.insert
package:spotube/services/sourced_track/sources/youtube.dart 68     YoutubeSourcedTrack.fetchFromTrack
package:spotube/services/sourced_track/sourced_track.dart 168      SourcedTrack.fetchFromTrack
package:spotube/provider/server/sourced_track.dart 27              SourcedTrackNotifier.build
package:riverpod/src/async_notifier/base.dart 355                  FutureHandlerProviderElementMixin.handleFuture.<fn>.<fn>

----------------------------------------
[2025-01-31 10:40:10.243079]---------------------
Failed to open http://0.0.0.0:13011/stream/2XgfZtgDvD9O1BLoDwZUmq.
#0      new AudioPlayerInterface.<anonymous closure> (package:spotube/services/audio_player/audio_player.dart:93)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.dart:1414)
#13     _CustomZone.run (dart:async/zone.dart:1317)
#14     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

----------------------------------------
---------
[2025-01-31 10:43:45.588801]---------------------
VideoUnplayableException: Video 'DI8iK7FIrSs' is unplayable.
Streams are not available for this video.
In most cases, this error indicates that there are 
some restrictions in place that prevent watching this video.
Reason: This video is not available
#0      StreamClient.getManifest (package:youtube_explode_dart/src/videos/streams/stream_client.dart:116)
<asynchronous suspension>
#1      YoutubeSourcedTrack.toSiblingType (package:spotube/services/sourced_track/sources/youtube.dart:147)
<asynchronous suspension>
#2      YoutubeSourcedTrack.fetchSiblings (package:spotube/services/sourced_track/sources/youtube.dart:248)
<asynchronous suspension>
#3      YoutubeSourcedTrack.fetchFromTrack (package:spotube/services/sourced_track/sources/youtube.dart:63)
<asynchronous suspension>
#4      SourcedTrack.fetchFromTrack (package:spotube/services/sourced_track/sourced_track.dart:168)
<asynchronous suspension>
#5      SourcedTrackNotifier.build (package:spotube/provider/server/sourced_track.dart:27)
<asynchronous suspension>
#6      FutureHandlerProviderElementMixin.handleFuture.<anonymous closure>.<anonymous closure> (package:riverpod/src/async_notifier/base.dart:355)
<asynchronous suspension>

----------------------------------------
[2025-01-31 10:45:25.026094]---------------------
DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 400 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:520)
<asynchronous suspension>
#1      ServerPlaybackRoutes.streamTrack.<anonymous closure> (package:spotube/provider/server/routes/playback.dart:112)
<asynchronous suspension>
#2      ServerPlaybackRoutes.streamTrack (package:spotube/provider/server/routes/playback.dart:104)
<asynchronous suspension>
#3      ServerPlaybackRoutes.getStreamTrackId (package:spotube/provider/server/routes/playback.dart:179)
<asynchronous suspension>
#4      RouterEntry.invoke.<anonymous closure> (package:shelf_router/src/router_entry.dart:109)
<asynchronous suspension>
#5      RouterEntry.invoke (package:shelf_router/src/router_entry.dart:104)
<asynchronous suspension>
#6      Router.call (package:shelf_router/src/router.dart:184)
<asynchronous suspension>
#7      handleRequest (package:shelf/shelf_io.dart:140)
<asynchronous suspension>

----------------------------------------
[2025-01-31 10:45:25.031147]---------------------
Failed to open http://0.0.0.0:13011/stream/5gCHSvDXEK6j1WwuJAIY6K.
#0      new AudioPlayerInterface.<anonymous closure> (package:spotube/services/audio_player/audio_player.dart:93)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.dart:1414)
#13     _CustomZone.run (dart:async/zone.dart:1317)
#14     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

----------------------------------------
---------
[2025-01-31 10:50:59.571492]---------------------
DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 400 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:520)
<asynchronous suspension>
#1      ServerPlaybackRoutes.streamTrack.<anonymous closure> (package:spotube/provider/server/routes/playback.dart:112)
<asynchronous suspension>
#2      ServerPlaybackRoutes.streamTrack (package:spotube/provider/server/routes/playback.dart:104)
<asynchronous suspension>
#3      ServerPlaybackRoutes.getStreamTrackId (package:spotube/provider/server/routes/playback.dart:179)
<asynchronous suspension>
#4      RouterEntry.invoke.<anonymous closure> (package:shelf_router/src/router_entry.dart:109)
<asynchronous suspension>
#5      RouterEntry.invoke (package:shelf_router/src/router_entry.dart:104)
<asynchronous suspension>
#6      Router.call (package:shelf_router/src/router.dart:184)
<asynchronous suspension>
#7      handleRequest (package:shelf/shelf_io.dart:140)
<asynchronous suspension>

----------------------------------------
[2025-01-31 10:50:59.577101]---------------------
Failed to open http://0.0.0.0:13011/stream/1bpzDsnW35B4QSRWXmatcc.
#0      new AudioPlayerInterface.<anonymous closure> (package:spotube/services/audio_player/audio_player.dart:93)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.dart:1414)
#13     _CustomZone.run (dart:async/zone.dart:1317)
#14     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

----------------------------------------
---------
[2025-01-31 10:54:42.577559]---------------------
[MediaKitError] 
Failed to open http://0.0.0.0:13011/stream/1SGxa85INJEyH5SNA5r2OA.
#0      new CustomPlayer.<anonymous closure> (package:spotube/services/audio_player/custom_player.dart:51)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.dart:1414)
#13     _CustomZone.run (dart:async/zone.dart:1317)
#14     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

----------------------------------------
nsion>
#7      handleRequest (package:shelf/shelf_io.dart:140)
<asynchronous suspension>

----------------------------------------
[2025-01-31 10:58:54.555710]---------------------
Failed to open http://0.0.0.0:13011/stream/1w3exvIgbRFV2ijf6qyWm8.
#0      new AudioPlayerInterface.<anonymous closure> (package:spotube/services/audio_player/audio_player.dart:93)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.dart:1414)
#13     _CustomZone.run (dart:async/zone.dart:1317)
#14     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#15     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#16     _microtaskLoop (dart:async/schedule_microtask.dart:40)
#17     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)

----------------------------------------
---------
nsion>
#7      handleRequest (package:shelf/shelf_io.dart:140)
<asynchronous suspension>

----------------------------------------
[2025-01-31 10:59:26.943536]---------------------
VideoUnplayableException: Video 'Y-EaiNlFhas' is unplayable.
Streams are not available for this video.
In most cases, this error indicates that there are 
some restrictions in place that prevent watching this video.
Reason: Sign in to confirm you’re not a bot
#0      StreamClient.getManifest (package:youtube_explode_dart/src/videos/streams/stream_client.dart:116)
<asynchronous suspension>
#1      YoutubeSourcedTrack.toSiblingType (package:spotube/services/sourced_track/sources/youtube.dart:147)
<asynchronous suspension>
#2      YoutubeSourcedTrack.fetchSiblings (package:spotube/services/sourced_track/sources/youtube.dart:248)
<asynchronous suspension>
#3      YoutubeSourcedTrack.fetchFromTrack (package:spotube/services/sourced_track/sources/youtube.dart:63)
<asynchronous suspension>
#4      SourcedTrack.fetchFromTrack (package:spotube/services/sourced_track/sourced_track.dart:168)
<asynchronous suspension>
#5      SourcedTrackNotifier.build (package:spotube/provider/server/sourced_track.dart:27)
<asynchronous suspension>
#6      FutureHandlerProviderElementMixin.handleFuture.<anonymous closure>.<anonymous closure> (package:riverpod/src/async_notifier/base.dart:355)
<asynchronous suspension>

----------------------------------------
[2025-01-31 11:02:08.713456]---------------------
DioException [bad response]: This exception was thrown because the response has a status code of 400 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 400 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:520)
<asynchronous suspension>
#1      ServerPlaybackRoutes.streamTrack.<anonymous closure> (package:spotube/provider/server/routes/playback.dart:112)
<asynchronous suspension>
#2      ServerPlaybackRoutes.streamTrack (package:spotube/provider/server/routes/playback.dart:104)
<asynchronous suspension>
#3      ServerPlaybackRoutes.getStreamTrackId (package:spotube/provider/server/routes/playback.dart:179)
<asynchronous suspension>
#4      RouterEntry.invoke.<anonymous closure> (package:shelf_router/src/router_entry.dart:109)
<asynchronous suspension>
#5      RouterEntry.invoke (package:shelf_router/src/router_entry.dart:104)
<asynchronous suspension>
#6      Router.call (package:shelf_router/src/router.dart:184)
<asynchronous suspension>
#7      handleRequest (package:shelf/shelf_io.dart:140)
<asynchronous suspension>

----------------------------------------
[2025-01-31 11:02:08.716769]---------------------
[MediaKitError] 
Failed to open http://0.0.0.0:13011/stream/11I7KtUGLvQ8tI5YWfjD8W.
#0      new CustomPlayer.<anonymous closure> (package:spotube/services/audio_player/custom_player.dart:51)
#1      _rootRunUnary (dart:async/zone.dart:1422)
#2      _CustomZone.runUnary (dart:async/zone.dart:1324)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1233)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:366)
#5      _DelayedData.perform (dart:async/stream_impl.dart:542)
#6      _PendingEvents.handleNext (dart:async/stream_impl.dart:647)
#7      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:618)
#8      _rootRun (dart:async/zone.dart:1406)
#9      _CustomZone.run (dart:async/zone.dart:1317)
#10     _CustomZone.runGuarded (dart:async/zone.dart:1225)
#11     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1265)
#12     _rootRun (dart:async/zone.d

Operating System

Android

Spotube version

V3.9.0

Installation source

GitHub Actions (Nightly Binary)

Additional information

No response

Self grab

  • I'm ready to work on this issue!
@harpreet100 harpreet100 added the bug Something isn't working label Jan 31, 2025
@KRTirtho
Copy link
Owner

KRTirtho commented Feb 1, 2025

Has been fixed by #2291

@KRTirtho KRTirtho closed this as completed Feb 1, 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

2 participants