If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Camera upload not uploading in the background

2

Answers

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited September 13

    Thanks. That would be understandable if the app is terminated

    Is there any evidence of no background camera uploads when the app is running in the background (not on display in foreground) but is running and terminated and with camera upload setting of
    upload automatically

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass
    edited September 13

    @sa2000 said:
    Thanks. That would be understandable if the app is terminated

    Is there any evidence of no background camera uploads when the app is running in the background (not on display in foreground) but is running and terminated and with camera upload setting of
    upload automatically

    If I do another test (image taken at 18:06:56), with the app running in the background - the iOS logs shows the following:

    2017/09/13 18:06:50.667 (47 MB) (9324) I PMKCameraUploadEngine.m:1426 | Fetching asset 35 out of 154
    2017/09/13 18:06:50.685 (47 MB) (9305) I PMKCameraUploadEngine.m:2149 | Ending background task.
    2017/09/13 18:09:53.429 (15 MB) (9305) I PMKCameraUploadEngine.m:1291 | Beginning background task.
    2017/09/13 18:09:53.435 (15 MB) (9305) I PMKCameraUploadEngine.m:2178 | Starting background timer with time: 1.797693134862316e+308
    2017/09/13 18:09:53.486 (15 MB) (9306) V PMKCastDeviceScanner.m:235 | CHROMECAST: -[GCKClearcutLogger closeLogWriters] - closeLogWriters
    2017/09/13 18:09:53.534 (29 MB) (9305) I PMKCameraUploadEngine.m:1426 | Fetching asset 36 out of 154
    2017/09/13 18:09:53.600 (29 MB) (5189) I PMKAppDelegate.m:207 | Application will enter foreground
    

    Notice "Ending background task." at 18:06:50.685 when the app is send to the background .. and no lines until it is in the foreground again (3 mins "missing" from the logs). Almost looks like it is "unloading" something, since memory usage is lower when starting foreground state (dunno).

    Only Errors (E) in the logs are (after app entered foreground state - kinda odd - PMS and WIFI is always-on and working):

    2017/09/13 18:09:53.810 (31 MB) (5189) E PMKServer+Sync.m:19 | Unable to refresh sync lists on <PMKServer: 0x1742e3400>[ standard server QNAP (hasPresence) - cce2b6f24266078c7991ebbb9819469a03b30efc ][ 1.9.0.4252-d07c1f408 ]: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x174c4c510 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://10-0-0-2.8c4dccdd141c4d57b9687406b49bf19b.plex.direct:32400/sync/refreshSynclists?X-Plex-Device-Name=iPhone%206, NSErrorFailingURLKey=https://10-0-0-2.8c4dccdd141c4d57b9687406b49bf19b.plex.direct:32400/sync/refreshSynclists?X-Plex-Device-Name=iPhone%206, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
    

    Image is prepared for PMS here:

    2017/09/13 18:10:00.110 (37 MB) (9336) I PMKCameraUploadEngine.m:1779 | Created data transfer task to check for 2017-09-13 18.06.56.JPG
    

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

  • jk0jk0 Channel Developer Posts: 117Members, Plex Pass Plex Pass

    Just wanted to bump this thread. Have there been any updates on tracking down the issue?

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @jk0 said:
    Just wanted to bump this thread. Have there been any updates on tracking down the issue?

    I have no evidence to submit to development that it does not upload in the background if the app is not terminated. It is known that it is a slow process and may take a long time if there is a big backlog of photos and videos to upload

    If there are any logs for a number of days of the app running but not uploading then please attach and confirmation that the server was also up at the time

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • jk0jk0 Channel Developer Posts: 117Members, Plex Pass Plex Pass

    @sa2000 said:

    @jk0 said:
    Just wanted to bump this thread. Have there been any updates on tracking down the issue?

    I have no evidence to submit to development that it does not upload in the background if the app is not terminated. It is known that it is a slow process and may take a long time if there is a big backlog of photos and videos to upload

    If there are any logs for a number of days of the app running but not uploading then please attach and confirmation that the server was also up at the time

    So just to confirm -- the app has to be running in the background for this to work? I was under the impression that wasn't the case. Also, does Background Refresh need to be enabled?

  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass
    edited September 27

    @sa2000 said:
    I have no evidence to submit to development that it does not upload in the background if the app is not terminated.

    That's it - I give up. I spend 2 hours on helping with this - since it is easily reproduced here (and by most others users with the problem). And you now say, that you don't have any evidence? I posted the logs, which shows, that Plex for iOS isn't doing anything when it is in the background regarding camera-upload. Waited on any response - so I could check even more, if you/Plex needed it. And now, 14 days later .. with a new iOS 11 we can start from scratch again?

    @sa2000 nothing personal, but i see this too often in the forums. A problem doesn't resolve it self by waiting ... If it is because you need the log files (zip) .. her you go (14 days old - yes i saved them, because I was really ready to help with this)

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @mm98 said:

    @sa2000 said:
    I have no evidence to submit to development that it does not upload in the background if the app is not terminated.

    That's it - I give up. I spend 2 hours on helping with this - since it is easily reproduced here (and by most others users with the problem). And you now say, that you don't have any evidence? I posted the logs, which shows, that Plex for iOS isn't doing anything when it is in the background regarding camera-upload. Waited on any response - so I could check even more, if you/Plex needed it. And now, 14 days later .. with a new iOS 11 we can start from scratch again?

    @sa2000 nothing personal, but i see this too often in the forums. A problem doesn't resolve it self by waiting ... If it is because you need the log files (zip) .. her you go (14 days old - yes i saved them, because I was really ready to help with this)

    I am sorry if there has been a misunderstanding. My last response was saying it is understandable if the app is closed /. terminated and no longer running in the background

    I have not had any zipped logs that confirm the issue being there with no upload attempts when it is actually not terminated and running in the background - just not in focus

    I will look at the attached new logs later today

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • jk0jk0 Channel Developer Posts: 117Members, Plex Pass Plex Pass

    @sa2000 said:

    I am sorry if there has been a misunderstanding. My last response was saying it is understandable if the app is closed /. terminated and no longer running in the background

    Please excuse me if this is documented somewhere (I've looked and cannot find it) -- I'm trying to help gather logs and would like some clarification.

    Is automatic uploading not supported when the app isn't running in the background or has been terminated? Does Background Refresh need to be enabled? This is my 3rd time asking in this thread.

  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass
    edited September 27

    @sa2000 said:
    I will look at the attached new logs later today

    I just did a new test using the latest PMS and Plex for iOS. The problem/bug still exists.

    I started Plex for iOS, and send it to the background (not terminating it). I restarted PMS and cleared the logs and waited a few minutes. I took a picture on my Phone at 17:22:03 (filename: 2017-09-27 17.22.03.JPG). I waited 10 minutes, without browsing plex web or opening Plex for iOS. I checked Plex Media Server.log multiple times, but no "hit" from iOS. I then re-opened Plex for iOS (from the background), and THEN it started uploading the photo to PMS at 17:33:47.808. Logs attached.

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass
    edited September 27

    @jk0 said:
    Is automatic uploading not supported when the app isn't running in the background or has been terminated? Does Background Refresh need to be enabled? This is my 3rd time asking in this thread.

    It seams like it has to be running - it isn't using iOS "Background App Refresh". There are only activity in the Plex for iOS logs when it is running (foreground or background).

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

  • jk0jk0 Channel Developer Posts: 117Members, Plex Pass Plex Pass

    @mm98 said:

    @jk0 said:
    Is automatic uploading not supported when the app isn't running in the background or has been terminated? Does Background Refresh need to be enabled? This is my 3rd time asking in this thread.

    It seams like it has to be running - it isn't using iOS "Background App Refresh". There are only activity in the Plex for iOS logs when it is running (foreground or background).

    That's what I've noticed with regards to the logs. I was under the impression that this was supposed to "just work" since iOS is what actually handles the uploads. I'd be curious to find out whether or not this is intentional or perhaps just not within the realm of possibilities in iOS apps.

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @mm98 said:

    @sa2000 said:
    I will look at the attached new logs later today

    I just did a new test using the latest PMS and Plex for iOS. The problem/bug still exists.

    I started Plex for iOS, and send it to the background (not terminating it). I restarted PMS and cleared the logs and waited a few minutes. I took a picture on my Phone at 17:22:03 (filename: 2017-09-27 17.22.03.JPG). I waited 10 minutes, without browsing plex web or opening Plex for iOS. I checked Plex Media Server.log multiple times, but no "hit" from iOS. I then re-opened Plex for iOS (from the background), and THEN it started uploading the photo to PMS at 17:33:47.808. Logs attached.

    Thanks for the logs. I have been discussing this with the iOS team and I will need to have further discussions.
    It appears to be that the iOS background uploading feature only applies to uploads that have started and the iOS would manage the continuation of the upload. Will need to understand more about this works or does not

    So in the meantime, one would need to regularly open the app to get outstanding uploads started

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • stevenhastevenha Posts: 160Members, Plex Pass Plex Pass

    When you say "uploads that have started" does that mean a single image / video or a set of images?

    I'm guessing, a single image as that would match what I've experienced.

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member
    edited September 28

    @jk0 said:

    @sa2000 said:

    I am sorry if there has been a misunderstanding. My last response was saying it is understandable if the app is closed /. terminated and no longer running in the background

    Please excuse me if this is documented somewhere (I've looked and cannot find it) -- I'm trying to help gather logs and would like some clarification.

    Is automatic uploading not supported when the app isn't running in the background or has been terminated? Does Background Refresh need to be enabled? This is my 3rd time asking in this thread.

    There appear to be several issues and your question has been answered by @mm98
    iOs would not know the mechanism that Plex client uses to upload to the server. The app has dialogue with the server which only the app and the server understand and iOS has no knowledge of that so it would not be in a position to do an upload to Plex Media Server. Furthermore, the app has a database where it keeps track of what has been uploaded and again this is internal working of the app and iOS as the os has no knowledge of how each app is runs would work

    So yes uploads can only be started by the app itself and of course the app has to be running for it to do that - whether in background or foreground

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @stevenha said:
    When you say "uploads that have started" does that mean a single image / video or a set of images?

    I'm guessing, a single image as that would match what I've experienced.

    uploads are done serially

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass
    edited September 28

    @sa2000 said:
    Thanks for the logs. I have been discussing this with the iOS team and I will need to have further discussions.
    It appears to be that the iOS background uploading feature only applies to uploads that have started and the iOS would manage the continuation of the upload. Will need to understand more about this works or does not

    Thanks for looking into this. The most important part (for me) is, that a bug has been detected and registered (?) now.

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @mm98 said:

    @sa2000 said:
    Thanks for the logs. I have been discussing this with the iOS team and I will need to have further discussions.
    It appears to be that the iOS background uploading feature only applies to uploads that have started and the iOS would manage the continuation of the upload. Will need to understand more about this works or does not

    Thanks for looking into this. The most important part (for me) is, that a bug has been detected and registered (?) now.

    I am raising as an issue - to get the problem looked into and to also get the support articles to be more accurate

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • jk0jk0 Channel Developer Posts: 117Members, Plex Pass Plex Pass

    @sa2000 said:
    iOs would not know the mechanism that Plex client uses to upload to the server. The app has dialogue with the server which only the app and the server understand and iOS has no knowledge of that so it would not be in a position to do an upload to Plex Media Server. Furthermore, the app has a database where it keeps track of what has been uploaded and again this is internal working of the app and iOS as the os has no knowledge of how each app is runs would work

    So yes uploads can only be started by the app itself and of course the app has to be running for it to do that - whether in background or foreground

    Thanks for the clarification. I understand how the communications work between the client and server, but the documentation reads as if the Plex iOS app is not required to be in a running state:

    When Camera Roll Content is Uploaded

    The Camera Upload feature will make use of the iOS background upload feature. This lets the OS control uploads when it has a connection available, there is sufficient battery, etc. Background uploading is controlled entirely by the OS.

    Users can also force an upload by simply opening Settings > Camera Upload in the app to make it active.

    This was a big selling point in order to get my friends/family to use this feature (saving me time from having to manually backup their phones every few months!#!^&% :wink:), so I hope the documentation is actually correct, and this is something that can still be implemented somehow.

  • sa2000sa2000 Posts: 29,182Members, Plex Pass, Plex Ninja, Plex Team Member Plex Team Member

    @jk0 said:

    @sa2000 said:
    iOs would not know the mechanism that Plex client uses to upload to the server. The app has dialogue with the server which only the app and the server understand and iOS has no knowledge of that so it would not be in a position to do an upload to Plex Media Server. Furthermore, the app has a database where it keeps track of what has been uploaded and again this is internal working of the app and iOS as the os has no knowledge of how each app is runs would work

    So yes uploads can only be started by the app itself and of course the app has to be running for it to do that - whether in background or foreground

    Thanks for the clarification. I understand how the communications work between the client and server, but the documentation reads as if the Plex iOS app is not required to be in a running state:

    When Camera Roll Content is Uploaded

    The Camera Upload feature will make use of the iOS background upload feature. This lets the OS control uploads when it has a connection available, there is sufficient battery, etc. Background uploading is controlled entirely by the OS.

    Users can also force an upload by simply opening Settings > Camera Upload in the app to make it active.

    This was a big selling point in order to get my friends/family to use this feature (saving me time from having to manually backup their phones every few months!#!^&% :wink:), so I hope the documentation is actually correct, and this is something that can still be implemented somehow.

    The issue is that they need to open the Plex for iOS periodically to initiate uploads.

    Unless the uploads are to iCloud Photos then iOS would not know what to do and there would be no way for iOS to upload to the Plex Media Server libraries

    Help given free on forums.            Fee-Based Personal Support & Help.        

    _______________________________________________________________________________________

    Plex Support Information              Troubleshooting               FAQs

    Plex Media Server:   Reporting Issues        Plex Web App: Debug Log    Plex Apps: Support pages and Logs    Logs: All Logs

    For list of 3rd party programs and malware / adware crashing Plex Media Server and mswsock.dll on windows, see Repeated crashing of Plex Media Server on Windows
     
  • mm98mm98 Posts: 439Members, Plex Pass Plex Pass

    @jk0 said:

    @sa2000 said:
    iOs would not know the mechanism that Plex client uses to upload to the server. The app has dialogue with the server which only the app and the server understand and iOS has no knowledge of that so it would not be in a position to do an upload to Plex Media Server. Furthermore, the app has a database where it keeps track of what has been uploaded and again this is internal working of the app and iOS as the os has no knowledge of how each app is runs would work

    So yes uploads can only be started by the app itself and of course the app has to be running for it to do that - whether in background or foreground

    Thanks for the clarification. I understand how the communications work between the client and server, but the documentation reads as if the Plex iOS app is not required to be in a running state:

    When Camera Roll Content is Uploaded

    The Camera Upload feature will make use of the iOS background upload feature. This lets the OS control uploads when it has a connection available, there is sufficient battery, etc. Background uploading is controlled entirely by the OS.

    Users can also force an upload by simply opening Settings > Camera Upload in the app to make it active.

    This was a big selling point in order to get my friends/family to use this feature (saving me time from having to manually backup their phones every few months!#!^&% :wink:), so I hope the documentation is actually correct, and this is something that can still be implemented somehow.

    I just looked at the Apple iOS specifications regarding Background App Refresh / Execution. You are not allowed to push/upload data in background refresh mode. This is only meant for one-way (download).

    https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

    Implementing Long-Running Tasks

    For tasks that require more execution time to implement, you must request specific permissions to run them in the background without their being suspended. In iOS, only specific app types are allowed to run in the background:

    • Apps that play audible content to the user while in the background, such as a music player app
    • Apps that record audio content while in the background
    • Apps that keep users informed of their location at all times, such as a navigation app
    • Apps that support Voice over Internet Protocol (VoIP)
    • Apps that need to download and process new content regularly
    • Apps that receive regular updates from external accessories
    • Apps that implement these services must declare the services they support and use system frameworks to implement the relevant aspects of those services. Declaring the services lets the system know which services you use, but in some cases it is the system frameworks that actually prevent your application from being suspended.

    Plex Media Server: QNAP TS-453 Pro (CPU Mark: 1864, Intel Celeron @ 1.99GHz Quad-Core, 8GB RAM, SSD, 2 x WD)
    Plex Media Clients: PlexWeb (app.plex.tv), Plex for LG, ChromeCast Ultra, iPhone 6, iPad Pro, Apple TV 4 and Sonos
    DVR Hardware: HDHomeRun EXPAND (HDHR3-4DC)
    Smart TV: LG UHD UH7500 (US) / UH750V (EU) (WebOS 3.0)

2
Sign In or Register to comment.