Mobile Sync Not Working

I just bought premium subscription to test mobile sync, and to my great disappointment, it doesn’t work at all.

I select the sync option on a library and select some number of items to sync (I tried both fewer and more than the number of movies in the library with same results), and click the OK button. I then go to the menu and select “Sync now” option. It takes me to a sync menu where it is showing the library in “Sync Items” with “0KB / Not synced”. When I tap the SYNC button, it quickly goes through a few options including “initializing server”, and eventually goes back to “device idle” - with no data synced.

If it is relevant, I have all playback option on server and client set to “original” quality, so no transcoding should be taking place under any circumstance, but this isn’t happening anyway. The server is sitting idle, and the client is sitting idle, and no data is being hoarded onto the client.

What is going wrong here?

Sign out and back in on both server and device. It will update itself

If you’ve done this already, please get the Plex Media Server log files. I will see what it is complaining about and help you get it working.

I signed out and back in on the Android device, and restarted the server.

I enabled verbose logging in Settings, Web, Debug, but it doesn’t seem to log much:
http://pastebin.com/Z92R3sR9

Plex Media Server.log is here:
http://pastebin.com/EFtXjCR9

Looking at the error message about permissions on CloudAccess.dat, I can see that CloudAccess.dat.tmp.* files are accumulating alarmingly - there are a total of 7488 there at the moment. I purged those, and reset the SELinux security context on CloudAccess.dat appropriately to svirt_sandbox_file_t (Plex is running inside a Docker container).

Retrying sync manually from the Android side, I get this one line in the PMS log:
Aug 11, 2016 16:16:03.945 [0xe01ef400] INFO - Sync: downloaded 3 sync list(s) with 2 sync items(s): 0 new, 0 updated, 0 deleted

Still nothing gets synced to the Android device.

Edit:
A little later, this appears in the logs:
Aug 11, 2016 16:18:55.969 [0xe3977400] WARN - NAT: PMP, timed out waiting for response.
Aug 11, 2016 16:18:56.441 [0xf260b400] WARN - PubSub: Received notifyConnectivity event with incorrect async identifier
Aug 11, 2016 16:18:56.637 [0xf2fcf400] WARN - PubSub: Received notifyConnectivity event with incorrect async identifier
Aug 11, 2016 16:18:56.669 [0xf260b400] WARN - PubSub: Received notifyConnectivity event with incorrect async identifier
Aug 11, 2016 16:19:18.058 [0xed077400] WARN - NAT: PMP, timed out waiting for response.
Aug 11, 2016 16:20:06.291 [0xf04ff400] WARN - LPE: falling back to slow path evaluation: /3
Aug 11, 2016 16:20:06.292 [0xf04ff400] ERROR - downloadContainer: expected MediaContainer element, found html
Aug 11, 2016 16:20:06.292 [0xf04ff400] ERROR - LPE: failed to get container for path: /3
Aug 11, 2016 16:20:06.293 [0xf04ff400] ERROR - Sync: failed to generate query for path library://849439ab-9fc6-4eae-88b5-d66521e5d949/directory/3 in sync item 13500264
Aug 11, 2016 16:20:06.293 [0xf04ff400] ERROR - Sync: skipping items for sync list 12658767, sync item 13500264: unable to generate sync set query
Aug 11, 2016 16:22:23.635 [0xf2fcf400] ERROR - handle_stream_read error 335544539 short read
Aug 11, 2016 16:22:54.621 [0xe76ff400] INFO - Sync: downloaded 3 sync list(s) with 2 sync items(s): 0 new, 0 updated, 0 deleted
Aug 11, 2016 16:22:55.464 [0xe3977400] INFO - Sync: downloaded 3 sync list(s) with 2 sync items(s): 0 new, 0 updated, 0 deleted

As an additional bit of info, I am unable to sync any content from my friends’ Plex servers, either, so the problem appears to be on the application side rather than the server side.

I’ve had issues with mobile sync.

One thing that helped me was, as mentioned before, to sign out and in on both the server and the app. Don’t just restart the app, sign out of it.

Also, on the server, erase you device from the “devices” list… Then try again. Somehow my device sort of didn’t match with whatever info was on the server at some point and that fixed it. I believe it might have happened after an os update / changing roms.

Also make sure there’s enough room, both on the client (app) and for the servers transcoding folder.

@gordan79 said:
As an additional bit of info, I am unable to sync any content from my friends’ Plex servers, either, so the problem appears to be on the application side rather than the server side.

Sorry for the delay.

Since you have nothing sync’d to your mobile device, I would just go ahead and delete it then reinstall it. It’ll clear out anything otherwise ‘stray and unwanted’. Simultaneously, delete the old instance of the device from the “Settings - Devices” tab.

Come back in, sign in wait for the server to select .
Turn logging back to “Debug”.
Select your media,
Select the phone as the destination.
Start the sync
When it’s done converting, Let the phone ‘pull’ the data .
If this doesn’t produce positive results, Stop the server and collect the Plex Media Server log files (there will be several). Please zip/tar them and attach here to your next post. (you don’t need be bothered with the extra step of pastebin)

There should be no conversion taking place. I don’t want transcoding, I don’t need transcoding. Everything is in H.264/AAC/MP4 format. I always select “Original” quality when syncing.

I’ll delete the app on the Android side and reinstall it and see if it makes a difference.

Also, is there a reason why the sync option only appears when connecting to my own server? I’m sure I have seen it available when browsing my friends’ servers as well last week, but yesterday it was only showing up when connecting to my own server.

Edit: Just uninstalled and reinstalled the Plex app. Same results. Will gather the server logs and post them later today.

Finally got around to this. I deleted all the logs and restarted the server before doing the above. The only log generated was Plex Media Server.log, which is attached.

Behaviour of everything is unchanged. The sync never happens.

The interesting part of the log is:
Aug 26, 2016 17:42:14.085 [0xe74ff400] DEBUG - Job running: FFMPEG_EXTERNAL_LIBS=’/home/plex/Library/Application\ Support/Plex\ Media\ Server/Codecs/ecd8c57-1099-linux-annapurna-arm7/’ XDG_CACHE_HOME=’/home/plex/Library/Application Support/Plex Media Server/Cache/’ XDG_DATA_HOME=’/usr/lib/plexmediaserver/Resources/’ X_PLEX_TOKEN=‘xxxxxxxxxxxxxxxxxxxx’ ‘/usr/lib/plexmediaserver/Resources/Plex Transcoder’ ‘-codec:#0x01’ ‘h264’ ‘-i’ ‘/zfs/media/Animated/Series/The Raccoons/Season 01/The Raccoons - s01e01 - Surprise Attack.mp4’ ‘-filter_complex’ ‘[0:#0x01]scale=w=min(720,iw):h=min(576,ih):force_original_aspect_ratio=decrease[0]’ ‘-map’ ‘[0]’ ‘-codec:0’ ‘libx264’ ‘-crf:0’ ‘16’ ‘-pix_fmt:0’ ‘yuv420p’ ‘-maxrate:0’ ‘4303k’ ‘-bufsize:0’ ‘8606k’ ‘-r:0’ ‘25’ ‘-preset:0’ ‘veryslow’ ‘-x264opts:0’ ‘subme=1:me_range=4:rc_lookahead=10:me=hex:8x8dct=0:partitions=none’ ‘-map’ ‘0:#0x02’ ‘-metadata:s:1’ ‘language=eng’ ‘-codec:1’ ‘copy’ ‘-copypriorss:1’ ‘0’ ‘-f’ ‘mp4’ ‘-map_metadata’ ‘-1’ ‘-map_chapters’ ‘-1’ ‘-movflags’ ‘+faststart’ ‘/home/plex/Library/Application Support/Plex Media Server/Cache/Transcode/Sync+/11031375/2b/4460.mp4.temp’ ‘-y’ ‘-nostats’ ‘-loglevel’ ‘quiet’ ‘-loglevel_plex’ ‘error’ ‘-progressurl’ ‘http://127.0.0.1:32400/video/:/transcode/session/10a74a45-69b1-4900-8f50-2d63a341535e/progress
Aug 26, 2016 17:42:14.088 [0xe74ff400] VERBOSE - Starting child process with pid 3431
Aug 26, 2016 17:42:14.088 [0xe74ff400] DEBUG - Started session successfully: 10a74a45-69b1-4900-8f50-2d63a341535e
Aug 26, 2016 17:42:14.101 [0xe6177400] ERROR - [Transcoder] Unrecognized option ‘crf:0’.
Aug 26, 2016 17:42:14.103 [0xed177400] ? - [Transcoder] Error splitting the argument list: Option not found
Aug 26, 2016 17:42:14.103 [0xefa7e400] VERBOSE - JobManager: child process with PID 3431
Aug 26, 2016 17:42:14.104 [0xefa7e400] ERROR - JobManager: child process returned: 1 (Operation not permitted)

  1. It is trying to transcode - which I absolutely do not want it to. The media format is already in a format suitable for all of my devices. I normally delete the Plex Media Transcoder executable specifically to prevent transcoding because I statically transcode everything into a suitable format, but I put it back for the purpose of debugging this. Can this be disabled, preferably without my writing a dummy shell script that will simply replace the above transcode line with a ‘cp’?

  2. Even ignoring the pointless transcode (which I raised before as an issue that really needs to be made disablable/ignoreable on the server side), it still seems to be not only unwanted, but outright broken.

The version of binaries I am using are for the QNAP X31+ (ARM).

Is there a way to permanently force-disable the transcoding for the target device syncing and live happily ever after? Without such an option the sync feature is useless to me, as is therefore Plex Pass subscription for my intended usage.

This appears to have been fixed in PMS 1.1.3 released yesterday. PMS no longer tries to transcode content when “original” quality is selected. Thank you. Please don’t introduce a regression that breaks it. :-p

Edit:
I spoke too soon. It looks like at the very least the attempt is still being made to transcode media despite “Original” quality being selected.

Definitely spoke too soon. It’s still broken:
Sep 01, 2016 14:38:26.880 [0xe90ff400] ERROR - [Transcoder] Unrecognized option ‘crf:0’.

bump bump.

Hey, just saw this thread. I looked at your old log and it looked like you were using a video that didn’t have any audio streams in it. There was an issue with these type of files before, but they should be fixed now. Please update to the latest versions of both PMS and the Plex Android App (which has totally redone Sync). If this still doesn’t work, please provide me the server log again and the xml for that video.

Running the latest Plex on the server side, and the latest app, still the same symptoms, and it still doesn’t work. I have not checked the logs since the last update so cannot be 100% certain right now that the error is the same, but the symptoms certainly are the same.

Edit: And the files I was testing with definitely all have both audio and video streams. All of my media is transcoded to H.264/AAC/MP4 for maximum compatibility, so this shouldn’t even be getting transcoded, let alone triggering a bug in the transcoder.

The sync feature really needs to be made either:

  1. smart enough to know when not to transcode
  2. completely dumb to never even try to transcode
  3. configurable to be possible to make it completely dumb so it never transcodes

How is it possible that I am the only one hitting this bug, with 100% reproducability?
Is this only broken on the QNAP ARM build, or is nobody else using the feature?

@gordan79 said:
Running the latest Plex on the server side, and the latest app, still the same symptoms, and it still doesn’t work. I have not checked the logs since the last update so cannot be 100% certain right now that the error is the same, but the symptoms certainly are the same.

Edit: And the files I was testing with definitely all have both audio and video streams. All of my media is transcoded to H.264/AAC/MP4 for maximum compatibility, so this shouldn’t even be getting transcoded, let alone triggering a bug in the transcoder.

The sync feature really needs to be made either:

  1. smart enough to know when not to transcode
  2. completely dumb to never even try to transcode
  3. configurable to be possible to make it completely dumb so it never transcodes

How is it possible that I am the only one hitting this bug, with 100% reproducability?
Is this only broken on the QNAP ARM build, or is nobody else using the feature?

Please provide the server log and XML as asked, otherwise what can we do?

Well you could have read the error report I pasted above a month ago and verified that issues surrounding passing ‘crf:0’ option have really been fixed. But since you asked, here is today’s error message, which is the same as before:

Oct 20, 2016 12:10:11.703 [0xe9aff400] INFO - Sync: downloaded 2 sync list(s) with 2 sync items(s): 1 new, 0 updated, 0 deleted
Oct 20, 2016 12:10:11.800 [0xea5ff400] ERROR - [Transcoder] Unrecognized option ‘crf:0’.
Oct 20, 2016 12:10:11.802 [0xe9aff400] ? - [Transcoder] Error splitting the argument list: Option not found

So no, the problem has not been fixed, transcoder is still being sent the option ‘crf:0’ which it doesn’t understand. Worse, as I said in my previous message, the transcoder shouldn’t be being called in the first place because the target device is perfectly capable of playing the file as is without any additional transcoding.

So as mentioned before, this is in fact not one but two bugs.

@gordan79 said:
Well you could have read the error report I pasted above a month ago and verified that issues surrounding passing ‘crf:0’ option have really been fixed. But since you asked, here is today’s error message, which is the same as before:

Oct 20, 2016 12:10:11.703 [0xe9aff400] INFO - Sync: downloaded 2 sync list(s) with 2 sync items(s): 1 new, 0 updated, 0 deleted
Oct 20, 2016 12:10:11.800 [0xea5ff400] ERROR - [Transcoder] Unrecognized option ‘crf:0’.
Oct 20, 2016 12:10:11.802 [0xe9aff400] ? - [Transcoder] Error splitting the argument list: Option not found

So no, the problem has not been fixed, transcoder is still being sent the option ‘crf:0’ which it doesn’t understand. Worse, as I said in my previous message, the transcoder shouldn’t be being called in the first place because the target device is perfectly capable of playing the file as is without any additional transcoding.

So as mentioned before, this is in fact not one but two bugs.

@KarlDag said:
Please provide the server log and XML as asked, otherwise what can we do?

@KarlDag said:
Please provide the server log and XML as asked, otherwise what can we do?

@gordan79 said:
Edit: And the files I was testing with definitely all have both audio and video streams. All of my media is transcoded to H.264/AAC/MP4 for maximum compatibility, so this shouldn’t even be getting transcoded, let alone triggering a bug in the transcoder.
That may be, but for that video in your earlier log, PMS could not detect the audio stream, which is why the “crf:0” parameter is causing an error. You can’t apply this parameter to an empty stream.

In your new log, there is a new error message.

Sep 24, 2016 07:45:00.805 [0xe3f67400] ERROR - [Transcoder] Error loading external lib: /home/plex/Library/Application Support/Plex Media Server/Codecs/6209f91-1114-linux-annapurna-arm7/libh264_decoder.so: failed to map segment from shared object: Operation not permitted
Can you check if this file exists? I’m seeing lots of other network errors in your log with your server not being able to communicate with Plex.tv. PMS needs to download that file if it doesn’t exist and not being able to connect to plex.tv is preventing that, which then prevents your syncing from working.

I am not sure what the server was trying to do on 24/09 but it certainly wasn’t trying to sync or transcode content for syncing because on 24/09 I did not have Plex Pass subscription, so I dare say that whatever that error message is about it wasn’t directly related to my Mobile Sync attempt on 20/10 (which is also listed in the log.

Yes, the file exists, and has existed since before that error message was logged:

ls -la Library/Application\ Support/Plex\ Media\ Server/Codecs/6209f91-1114-linux-annapurna-arm7/

total 2335
drwxr-xr-x. 2 plex plex 8 Aug 31 18:24 .
drwxr-xr-x. 3 plex plex 4 Aug 31 18:24 …
-rw-r–r--. 1 plex plex 340412 Aug 31 18:24 libaac_decoder.so
-rw-r–r--. 1 plex plex 261804 Aug 31 18:23 libaac_encoder.so
-rw-r–r--. 1 plex plex 1095428 Aug 31 18:24 libh264_decoder.so
-rw-r–r--. 1 plex plex 603876 Aug 31 18:23 libhevc_decoder.so
-rw-r–r--. 1 plex plex 970464 Aug 31 18:23 liblibx264_encoder.so
-rw-r–r--. 1 plex plex 478316 Aug 31 18:23 libmpeg4_decoder.so

Also, are you sure crf:0 is an audio codec parameter? I am moderately sure that it is a libx264 video codec parameter. Either way, if the option is being erroneously issued it is a bug, the only question is whether the bug is the transcoder not accepting a valid parameter or whether the transcoder is being erroneously invoked with an invalid parameter.

In addition to this, the capability detection of the client device is also broken because it shouldn’t be transcoding. The device DirectPlays the file just fine, which means no transcoding should be even getting attempted.