Jump to content

OneDrive sync issues


icthusman1
 Share

Recommended Posts

icthusman1

First off, thanks again for making this plug-in. I know it is still a work a progress and I am hoping my issues can help you to make it great!

 

So, looking through my logs one thing jumps out at me immediately.

 

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
 System.IO.PathTooLongException

 

I am assuming this is OneDrive saying the path is too long? Or is it the plugin not liking what's on my computer? I assume OneDrive since looking in OneDrive I see the path there is ridiculously long.

 

\OneDrive\Apps\Emby Server Sync - Nathan Hodge\REDKIAN\Original-High\Music

 

And that is before getting into the Artist folder then the Album folder then the track title. I am not sure what can be done about this other than renaming the "App" which I did make the name rather long. Can you confirm though that OneDrive is the issue?

 

Then there is this error (I have removed the Token as I don't know if that is something it's ok to post in a forum)

 

2015-06-08 02:12:53.4468 Error - App: Error getting response from https://api.onedrive.com/v1.0/drive/special/approot:/:/view.changes?token=
 *** Error Report ***
 Version: 3.0.5621.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 The remote server returned an error: (404) Not Found.
 System.Net.WebException
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

 

Any thoughts on this one?

 

2015-06-08 02:13:08.1422 Info - App: HttpClientManager POST: https://api.onedrive.com/v1.0/drive/special/approot/children
2015-06-08 02:13:08.9342 Error - App: Error getting response from https://api.onedrive.com/v1.0/drive/special/approot/children
 *** Error Report ***
 Version: 3.0.5621.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 The remote server returned an error: (409) Conflict.
 System.Net.WebException
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

 

Or this (above error)? This one I actually see the same error a number of times, but each one is looking a folder deeper into the created OneDrive sync folders.

 

I then see a number of PUT commands before it looks like the file transfer fails.

 

2015-06-08 02:22:36.4538 Error - App: Error getting response from https://api.onedrive.com/up/eyJSZXNvdXJjZUlEIjpudWxsLCJSZWxhdGlvbnNoaXBOYW1lIjoiL0p1bXAvQXBwXzExNDIyMjcyMDIvcmVka2lhbi9nZW5lcmFsLWhpZ2gvdmlkZW9zL3NwaXJpdCAgc3RhbGxpb24gb2YgdGhlIGNpbWFycm9uL3NwaXJpdCBzdGFsbGlvbiBvZiB0aGUgY2ltYXJyb24ubXA0IiwiQWxpYXMiOnsiTmFtZSI6IjB4MTRhMjA3MTE2ZmU4OSIsIk5hbWVTcGFjZSI6Ik15U3R1ZmYifX0/2meAa-tqvfKLA2Y2LnQpi6pTVLNrErgFKY0w0HUvTqfiTnTRka-V9qZuhdkw31BFkh/eyJAbmFtZS5jb25mbGljdEJlaGF2aW9yIjoicmVwbGFjZSIsIk5hbWUiOiJzcGlyaXQgc3RhbGxpb24gb2YgdGhlIGNpbWFycm9uLm1wNCIsIlNpemUiOjB9
 *** Error Report ***
 Version: 3.0.5621.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 The remote server returned an error: (500) Internal Server Error.
 System.Net.WebException
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
 
2015-06-08 02:22:36.4538 Error - App: Error transferring sync job file
 *** Error Report ***
 Version: 3.0.5621.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 The remote server returned an error: (500) Internal Server Error.
 MediaBrowser.Model.Net.HttpException
    at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsyncInternal>d__1e.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsync>d__7.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.Api.ApiService.<PutRequest>d__17`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.Api.OneDriveApi.<UploadFragment>d__6.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.OneDriveServerSyncProvider.<UploadFile>d__22.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.OneDriveServerSyncProvider.<SendFile>d__1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Server.Implementations.Sync.MediaSync.<SendFile>d__52.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
    at MediaBrowser.Server.Implementations.Sync.MediaSync.<GetItem>d__2d.MoveNext()
 InnerException: System.Net.WebException
 The remote server returned an error: (500) Internal Server Error.
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)

 

Hopefully, you can make sense of this.

Link to comment
Share on other sites

hamstercat

Thanks for the feedback :)

 

I'll try to find a way to handle larger path, any idea @@Luke? That wasn't a problem with Google Drive and Dropbox, presumably because they're not backed by a Windows OS.

 

Now for the exceptions...

  1. This one can be normal, depending on the situation. Do you remember what action you or Emby initiated to get that error?
  2. For the one saying (409) Conflict., this one is normal. Ideally it wouldn't appear at all in the logs.
  3. That one there's not enough details, so I'll add more logging to the plugin when I can. Definitely an error there during the upload of the file. 
Link to comment
Share on other sites

at this point all methods on IServerSyncProvider are using the array of path parts, so the plugin is free to do as it chooses.

 

the server will not attempt to take those parts and input them into System.IO methods.

so you could probably join them on \ or / without using path.combine, the server won't care because the input/output on the interface is all based on the string array.

Link to comment
Share on other sites

icthusman1

 

Thanks for the feedback :)

 

I'll try to find a way to handle larger path, any idea @@Luke? That wasn't a problem with Google Drive and Dropbox, presumably because they're not backed by a Windows OS.

 

Now for the exceptions...

  1. This one can be normal, depending on the situation. Do you remember what action you or Emby initiated to get that error?
  2. For the one saying (409) Conflict., this one is normal. Ideally it wouldn't appear at all in the logs.
  3. That one there's not enough details, so I'll add more logging to the plugin when I can. Definitely an error there during the upload of the file. 

 

This was Embry performing it's nightly scheduled task. Although, looking now I see an error 500 from 2 hours ago (in the admin interface for Emby) so obviously it is not just a nightly task.

 

I have 3 movies waiting to transfer (just to test things), 1 album (again a test), and then my whole music library (a test to see if I can use Embry to back up my entire library to OneDrive or if I have to continue backing up another way).

Link to comment
Share on other sites

  • 2 weeks later...
hamstercat

I've just uploaded a new version of two tonight with improved logging and error handling message. Can you give it a shot? It should shine some light on point number 3 and the error 500 you're getting from the OneDrive API.

Link to comment
Share on other sites

icthusman1

I've just uploaded a new version of two tonight with improved logging and error handling message. Can you give it a shot? It should shine some light on point number 3 and the error 500 you're getting from the OneDrive API.

Just checked and the update was not showing. I'll try again later and let you know.

Link to comment
Share on other sites

icthusman1

2015-06-19 09:21:02.0435 Info - App: HttpClientManager GET: https://api.onedrive.com/v1.0/drive/special/approot:/:/view.changes
2015-06-19 09:21:06.3035 Info - App: HttpClientManager GET: https://api.onedrive.com/v1.0/drive/special/approot:/:/view.changes?token=
2015-06-19 09:21:06.3974 Error - App: Error getting response from https://api.onedrive.com/v1.0/drive/special/approot:/:/view.changes?token=
 *** Error Report ***
 Version: 3.0.5641.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 The remote server returned an error: (404) Not Found.
 System.Net.WebException
    at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
    at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
 
2015-06-19 09:21:06.3974 Error - App: Error
 *** Error Report ***
 Version: 3.0.5641.4
 Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe -service
 Operating system: Microsoft Windows NT 6.2.9200.0
 Processor count: 4
 64-Bit OS: True
 64-Bit Process: False
 Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
 Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\system\MediaBrowser.ServerApplication.exe
 Exception of type 'OneDrive.Api.ApiException' was thrown.
 OneDrive.Api.ApiException
    at OneDrive.Api.ApiService.<HandleException>d__48`1.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.Api.ApiService.<GetRawRequest>d__12.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.Api.OneDriveApi.<CallViewChanges>d__35.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.Api.OneDriveApi.<ViewChanges>d__2f.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.OneDriveServerSyncProvider.<GetAllFiles>d__43.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.OneDriveServerSyncProvider.<TryGetFiles>d__30.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at OneDrive.OneDriveServerSyncProvider.<GetFiles>d__14.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Server.Implementations.Sync.MediaSync.<SyncData>d__d.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Server.Implementations.Sync.MediaSync.<Sync>d__3.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Server.Implementations.Sync.MultiProviderSync.<Sync>d__a.MoveNext()
 --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext()
 
2015-06-19 09:21:06.3974 Info - App: Cloud & Folder Sync Failed after 0 minute(s) and 4 seconds

Link to comment
Share on other sites

hamstercat

I forgot to tell you to enable debug logging under Advanced. My bad  :wacko:

Link to comment
Share on other sites

  • 2 weeks later...
hamstercat

Are they still there? I'm getting an error "This item might not exist or is no longer available" when I try to open them.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...