Sync stuck on "Waiting to download"

When can I expect a fix for the “sqlite3 db error” issue. I posted logs over a month ago. The sync still hangs using the latest Android and PMS release.

Will try and find out. Do you know if the android logs are giving the same errror as before

Could you look for this in the android app log
An exception occurred: com.plexapp.plex.net.sync.db.core.DatabaseManager$OperationError: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort

I checked the logs and the error is still there.

Thanks for confirming.

I am also having this issue. Happened when I switched to a qnap NAS. Was working fine from MacOS. Same kind of issues as described above.

Thanks buddy, you were right! After months of randomly working/breaking and not working this past week, I capped the upload speed to 12 mbps and it instantly worked like a charm!

Just to chime on this with a recent account. I was having this problem on my kids’ Kindle Fire tablets. Always having problems with mobile sync on those. They periodically lose the content that was synced to them and the ONLY way i have ever found to get them working again is to:

  1. Uninstall plex completely
  2. Wipe the SD card (this might not be totally necessary, I just do it for the sake of thoroughness)
  3. Delete the device from plexweb’s authorized device list
  4. Reinstall
  5. Resync everything

One caveat I’ve found: I’m pretty sure you need to turn Parental Controls off during this process. You can turn it back on once you’re synced, but I found I was still having problems until I turned it off.

And I keep hearing how people can’t use Kindle Freetime kids accounts with plex. I found Freetime to be totally unworth the money it costs, so I just use an adult account with the parental controls turned on. They can’t do too much damage that way, you just don’t get a chance to control how much time they can have on each type of app.

The problem is that it will happen again. And since syncing is a very slow process it is a real pain in the butt to have to do it often in multiple devices.

The real thing is that after so many years Plex is unable to provide a working syncing functionality which is the main feature people buy their Plex Pass. It is totally unacceptable.

3 Likes

I believe I’m having this same issue. Is this the same issue, and if so, is the fix still in progress?
In my case the sync seems to freeze at about 50% of syncing a ~700 song music playlist (original quality). If I pause the sync, force close/restart Plex and then resume the Sync, I can sometimes get it to churn through another 1-3%, but then it very quickly gets stuck again.

08-08 11:53:31.194 i: [conn] Device Fukushima response time is 13.126408 ms
08-08 11:53:31.195 i: [conn] Connection SUCCESS Fukushima ~ localConn: false conn: https://REMOVED
08-08 11:53:31.308 i: [Sync] Received 25 database change sets from ‘Fukushima’ (abcdd03881f88d0012b654c4ceaff70c9d461353).
08-08 11:53:31.360 e: An exception occurred: com.plexapp.plex.net.sync.db.core.DatabaseManager$OperationError: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
08-08 11:53:31.361 e: Stacktrace: com.plexapp.plex.net.sync.db.core.DatabaseManager$OperationError: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
at com.plexapp.plex.net.sync.db.core.DatabaseManager.a(SourceFile:288)
at com.plexapp.plex.net.sync.SyncClient.b(SourceFile:343)
at com.plexapp.plex.net.sync.SyncClient.c(SourceFile:307)
at com.plexapp.plex.net.sync.SyncClient.lambda$yXVEZ_wOKff6Isz48-aue95gna8(Unknown Source:0)
at com.plexapp.plex.net.sync.-$$Lambda$SyncClient$yXVEZ_wOKff6Isz48-aue95gna8.run(Unknown Source:10)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:229)
at com.plexapp.plex.net.sync.db.a.a(SourceFile:43)
at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:31)
at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:36)
at com.plexapp.plex.net.sync.db.b.a(SourceFile:112)
at com.plexapp.plex.net.sync.SyncClient.a(SourceFile:377)
at com.plexapp.plex.net.sync.SyncClient.lambda$0PEdj15fF4Gf5WZmA5_GTBjquts(Unknown Source:0)
at com.plexapp.plex.net.sync.-$$Lambda$SyncClient$0PEdj15fF4Gf5WZmA5_GTBjquts.invoke(Unknown Source:6)
at com.plexapp.plex.net.sync.db.core.DatabaseManager.c(SourceFile:248)
at com.plexapp.plex.net.sync.db.core.DatabaseManager.lambda$I09nahL46qGEdGtppyLqskRDD94(Unknown Source:0)
at com.plexapp.plex.net.sync.db.core.-$$Lambda$DatabaseManager$I09nahL46qGEdGtppyLqskRDD94.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
… 3 more

I had a sync of a playlist containing roughly 700 tracks which was always getting stuck in the “waiting for download” state no matter how many time I tried. In the end, nor matter how many manual attempts to get it going again,

I decided to investigate the files it was stuck on. I was looking for permission issues, or anything else that might appear common. What I found was that most of the files had a “(1)” at the end of the name right before the extension.

So I renamed a couple, hit refresh on the sync, and those files came sync’d! Tried a few more and they sync’d also.

So I did a mass rename on the entire library to remove all trailing “(1)”, as well as 2’s and 3’s since there were a few of those as well. I fell better without those anyway, whether or not they are the source of this problem. Then PMS went to work on a re-scan of the music library… That took a while, so I went to bed.

This morning, I checked the status and PMS was up to date. So I pressed refresh on the sync again, and it completed! Granted this is just one success, but it worked. I am running PMS on Linux in a container, and the receiver in this case was Plex for Android.

To other users, take a look at your file names that get stuck.

To the devs, those file names should be OK. Obviously they were acceptable names on the PMS host system. It was probably the parenthesis. It may have been that they had to be trailing as I know there are other files with parenthesis in the library, although I’m not certain that any were included in the sync. Hopefully this information will be useful in locating the bug.

In my previous post my conclusion that the files names were causing the issue appear to be wrong. Today I as I have added tracks to the playlist, the sync began to have failures again. But all the files names seemed pretty normal - nothing special. Finally, I thought let me push my luck and add a “(1)” to the end of the file name. It made that fie sync.

Further testing showed that just renaming the file then forcing PMS to re-scan was enough to get past all the new problem tracks. That said, just "touch"ing the file then re-scanning was not enough.

Still no clues in the logs that I can see. Based on past performance, I’m sure I will have additional opportunities to test further.

I was able to download my entire 35 gb music library by following these steps:

  1. Sync the artists without transcoding
  2. Let it download
  3. When it gets stuck waiting to download, reboot the phone.
  4. Once rebooted, immediately open plex and it will download another 300-500 mb of music.
  5. When stuck again, reboot.
  6. Rinse and repeat.

I don’t know what the icon means, but a “home” icon appears in my android top bar for a split second and when it does, that is the moment downloading music stops.

I’ve attempted to force stopping the app and restarting. Doesn’t work. I’ve got to reboot the phone. I know that multiple pixel users have complained of this sync issue. Thought I would share my work around.

would i be correct in assuming the android app of plex never actually asks for permission to storrage? i just found that storrage was “ticked off” in the application settings in android.
Dont know if this fixed it for me or the fact that i deleted data and cache of the app. but its syncing on my device for now. we`ll se later if it keeps it up :slight_smile:

Sadly, this just seems to be the process. If you delete all data and start fresh, sync works for a little while, then stops.

I always have had issues syncing my ~60gb music collection to my mobile. Tried restarting / resetting a bunch of times. As is plainly obvious to anyone reading this thread, ultimately the issue is that Plex uses SQLite (both on server and client) and it’s … well, it’s crap. It’s fine for a little to-do app that has 1 database table with 5 columns and 10 rows, but the complexity of the Plex db schema just is too much for it.

I believe that the issue relates to the fact that eventually (sometimes, very quickly) the index “index_title_sort_naturalsort” gets corrupted and the database integrity fails. I think this is when the app (Android, in my case) gets the following error. Regardless of my thoughts on why this error occurs, this is the error that everyone will have in their logs if they look, and that ultimately is the reason why sync is so poor:

11-12 21:09:08.198  e: An exception occurred: com.plexapp.plex.net.sync.db.core.DatabaseManager$OperationError: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
11-12 21:09:08.199  e: Stacktrace: com.plexapp.plex.net.sync.db.core.DatabaseManager$OperationError: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
	at com.plexapp.plex.net.sync.db.core.DatabaseManager.a(SourceFile:288)
	at com.plexapp.plex.net.sync.SyncClient.b(SourceFile:343)
	at com.plexapp.plex.net.sync.SyncClient.c(SourceFile:307)
	at com.plexapp.plex.net.sync.SyncClient.lambda$NhqTQlBHibUIU6AIFgYgmKprlUM(Unknown Source:0)
	at com.plexapp.plex.net.sync.-$$Lambda$SyncClient$NhqTQlBHibUIU6AIFgYgmKprlUM.run(Unknown Source:10)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)
Caused by: com.plexapp.plex.net.sync.db.core.DatabaseError: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
	at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:229)
	at com.plexapp.plex.net.sync.db.a.a(SourceFile:43)
	at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:31)
	at com.plexapp.plex.net.sync.db.core.a.a(SourceFile:36)
	at com.plexapp.plex.net.sync.db.b.a(SourceFile:112)
	at com.plexapp.plex.net.sync.SyncClient.a(SourceFile:377)
	at com.plexapp.plex.net.sync.SyncClient.lambda$0PEdj15fF4Gf5WZmA5_GTBjquts(Unknown Source:0)
	at com.plexapp.plex.net.sync.-$$Lambda$SyncClient$0PEdj15fF4Gf5WZmA5_GTBjquts.invoke(Unknown Source:6)
	at com.plexapp.plex.net.sync.db.core.DatabaseManager.c(SourceFile:248)
	at com.plexapp.plex.net.sync.db.core.DatabaseManager.lambda$I09nahL46qGEdGtppyLqskRDD94(Unknown Source:0)
	at com.plexapp.plex.net.sync.db.core.-$$Lambda$DatabaseManager$I09nahL46qGEdGtppyLqskRDD94.call(Unknown Source:4)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	... 3 more
Caused by: org.sqlite.database.sqlite.SQLiteException: no such collation sequence: naturalsort (code 257): , while compiling: DELETE FROM metadata_items WHERE id=?
	at org.sqlite.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
	at org.sqlite.database.sqlite.SQLiteConnection.acquirePreparedStatement(SourceFile:905)
	at org.sqlite.database.sqlite.SQLiteConnection.prepare(SourceFile:516)
	at org.sqlite.database.sqlite.SQLiteSession.prepare(SourceFile:592)
	at org.sqlite.database.sqlite.SQLiteProgram.<init>(SourceFile:62)
	at org.sqlite.database.sqlite.SQLiteStatement.<init>(SourceFile:35)
	at org.sqlite.database.sqlite.SQLiteDatabase.delete(SourceFile:1500)
	at com.plexapp.plex.net.sync.db.a.a(SourceFile:39)
	... 13 more
1 Like

Yeah, same Problem since a long time and it will never finish the sync.

It’s sad that you never hear from Plex about such big bugs and that it’s not getting fixed :expressionless:

2020 here we come! :older_adult:

This was probably one of my original reasons of buying Plexpass in 2013, and until ~2015 it worked great…but my library was much smaller then. :slight_smile:

I do hope they work out a fix, but after 4 years I’m really not that optimistic. They’re too busy working on partnerships with paid or sponsored content (a la TIDAL or WB).

2 Likes

I pretty much stopped using the mobile app because of this. It is useless as it is right now with inability to sync content. I ended up just downloading content from the server and putting it manually on the phone and using VLC player when needed. Works well and it is fuss free at least.
I will not buy anything more from this team, especially any subscription services, even if the price is better.

2 Likes

The fact that this is still an issue shows how little interest Plex has in the premium features. They used paying customers money to invest into new ideas to further their business and ignore paid for features that do not work. What other reason is there to pay for plex premium? This has to be the main reason, and it doesn’t work, never did for me.

For anyone looking to get Plex for the ability to download/sync local content… don’t. It is broken. Always has been, seems that it always will be.

2 Likes

Yes. Despite the update in Nov. it’s still not working. And it got even more complicated. The Version before, I could choose offline… what now? It has gone. And where ist the state of syncing… also gone. Ok it may be better to hide because it did never ending syncing or just trying to sync… endless. And it’s crashing in my Car every ca 30 min. Dear Plexteam - Please do your Job. Thank you.

3 Likes