Skip to content

Support for LibreTube's new Sync server#8367

Open
Bnyro wants to merge 25 commits intolibre-tube:masterfrom
Bnyro:sync-server
Open

Support for LibreTube's new Sync server#8367
Bnyro wants to merge 25 commits intolibre-tube:masterfrom
Bnyro:sync-server

Conversation

@Bnyro
Copy link
Copy Markdown
Member

@Bnyro Bnyro commented Apr 25, 2026

Please read #8363 for more information.

closes #8363

NOTE:

  • The sync server is still in alpha and it's expected that we will wipe the server's database a few times to adapt the database scheme (too lazy to do migrations while it's not in production), so please don't use it to store your account data there yet (but for testing, of course, please do so!).

@Bnyro Bnyro changed the title Support for LibreTube's brand-new Sync server Support for LibreTube's new Sync server Apr 25, 2026
@Figim
Copy link
Copy Markdown
Contributor

Figim commented Apr 25, 2026

  1. Create a new account
    Result: There is no Signed in window.
  2. Create a playlist and subscribe to the channel. Okay
    Result: Clear app data and sign in. Nothing as a result. Your subscriptions and playlists are not saved.
XRecorder_20260425_01.mp4
XRecorder_20260425_02.mp4

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented Apr 25, 2026

Thanks for already testing it @Figim

Though, as I said, I haven't even tested it myself yet because I had to do some backend changes and wait for the Docker images to build, so it's probably not working 100% yet.

I'll give you a ping when I think it's done so that you can test it again :)

@Bnyro Bnyro mentioned this pull request Apr 26, 2026
3 tasks
@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented Apr 26, 2026

@Figim It should now be in a state that basic functionality (accounts, playlists and subscriptions) should work.

Nevertheless I'm still going to change some stuff in the settings and add a welcome screen, so it makes sense to still wait a bit before testing again.

@Bnyro Bnyro marked this pull request as ready for review April 26, 2026 12:17
@Bnyro Bnyro added help wanted Looking for help testers needed Looking for people to test the changes before merging labels Apr 26, 2026
@Figim
Copy link
Copy Markdown
Contributor

Figim commented Apr 26, 2026

  1. Logged in and then automatically logged out
XRecorder_20260426_01.mp4

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented Apr 26, 2026

Thanks @Figim, that's fixed now. Apparently making a preference invisible or visible also triggered the logout action because there've still been some old listeners that I didn't clear properly.

@Figim
Copy link
Copy Markdown
Contributor

Figim commented Apr 26, 2026

  1. Unable to delete account and network error
XRecorder_20260426_04.mp4
  1. It asks for username and password if I don't enter a password to delete the account. Require password instead. If I enter the wrong password, it will show "network error" again. Instead, show "Invalid password"
XRecorder_20260426_03.mp4
  1. Playlists are not showing cover thumbnails
XRecorder_20260426_05.mp4
  1. "Network error" when adding videos to playlist from bookmarks
XRecorder_20260426_06.mp4
  1. I have playlists locally. If I log in and update them, then log out, I get "network error. Local playlists not restored" when updating playlists.
XRecorder_20260426_07.mp4

5.1 After completing step 5 above, close the app and reopen it. "There seems to be a problem with the selected server. Try another one." Error Toast. (Unrelated)

XRecorder_20260427_01.mp4
  1. "Network error" when deleting a video from a playlist and clicking the "undo" button

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented Apr 27, 2026

3 is not yet implemented, tracked at libre-tube/sync-server#5.

9 That's weird, I don't have such issues. The server is hosted in Germany, maybe your internet provider just has a bad connection to the server because it's in Germany?

@Figim
Copy link
Copy Markdown
Contributor

Figim commented Apr 27, 2026

3 is not yet implemented, tracked at libre-tube/sync-server#5.

9 That's weird, I don't have such issues. The server is hosted in Germany, maybe your internet provider just has a bad connection to the server because it's in Germany?

I am in Georgia. 6, 8 and 9 cannot be repeated now. I deleted them.

7 and others are still there

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented May 3, 2026

If somebody plans to test this - please wait a bit until I got the time to continue on adding support for watch history / subscription groups / playlist bookmarks syncing, the most recent commits are quite buggy and need some fixups

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented May 4, 2026

Remaining issues I need to fix up (in addition to the ones listed by @Figim):

  • clicking a playlist bookmark makes the app crash because it tries to load the playlist from the sync server API instead of YouTube
  • watch history updating doesn't work yet

@Figim
Copy link
Copy Markdown
Contributor

Figim commented May 4, 2026

Remaining issues I need to fix up (in addition to the ones listed by @Figim):

  • clicking a playlist bookmark makes the app crash because it tries to load the playlist from the sync server API instead of YouTube
  • watch history updating doesn't work yet

Should I not test yet?

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented May 4, 2026

Should I not test yet?

Yes, please wait a bit. I'll tell you when to test it.

Bnyro added 18 commits May 4, 2026 21:04
…ry Piped methods to the local database repository as Piped doesn't support any of it
…t type instead of re-calculating when possible
@Figim
Copy link
Copy Markdown
Contributor

Figim commented May 4, 2026

Done?

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented May 4, 2026

Done?

For now, yes. Deleting accounts still doesn't work, that requires some fixes in the backend.

@Figim
Copy link
Copy Markdown
Contributor

Figim commented May 4, 2026

Done?

For now, yes. Deleting accounts still doesn't work, that requires some fixes in the backend.

Account deletion works.

  1. However, when you change your sync preference, you are logged out.
  2. "Network error" when adding a video from bookmarks to a local playlist
  3. ""It seems there is an error with the selected server" toast while cloning playlist
  4. Saved playlist cover not showing
  5. Sign out and refresh by scrolling down in the library section and the error
XRecorder_20260505_01.mp4

Error : java.lang.Exception: invalid authentication token
at com.github.libretube.repo.LibreTubeSyncServerUserDataRepository.tryHttpOrRaiseError(LibreTubeSyncServerUserDataRepository.kt:37)
at com.github.libretube.repo.LibreTubeSyncServerUserDataRepository.access$tryHttpOrRaiseError(LibreTubeSyncServerUserDataRepository.kt:27)
at com.github.libretube.repo.LibreTubeSyncServerUserDataRepository$tryHttpOrRaiseError$1.invokeSuspend(Unknown Source:15)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:98)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:124)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:89)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:820)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:704)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@4f22c11, Dispatchers.Main.immediate]

@Bnyro
Copy link
Copy Markdown
Member Author

Bnyro commented May 4, 2026

Account deletion only works if you have no data stored at the server yet. As soon as you e.g. create a playlist, it doesn't work anymore.

To fix that, I had to do a breaking change at the backend - so I'll wipe all user data on sync.libretube.dev tomorrow - please take backups of everything if you had something important stored there.

@Figim
Copy link
Copy Markdown
Contributor

Figim commented May 4, 2026

Account deletion only works if you have no data stored at the server yet. As soon as you e.g. create a playlist, it doesn't work anymore.

To fix that, I had to do a breaking change at the backend - so I'll wipe all user data on sync.libretube.dev tomorrow - please take backups of everything if you had something important stored there.

I have noted some bugs above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Looking for help testers needed Looking for people to test the changes before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LibreTube sync server support

2 participants