Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client crashes during upload, status code 412 #296

Closed
andreadistefano opened this issue Feb 17, 2018 · 7 comments
Closed

Client crashes during upload, status code 412 #296

andreadistefano opened this issue Feb 17, 2018 · 7 comments

Comments

@andreadistefano
Copy link

Hi. I've been using this client for some time and it works reasonably well, but now I'm trying to upload a folder with thousands of subfolders, and everytime I start the daemon (I run in in service mode using sysctl) it crashes 5 minutes later. Here is the log:

feb 18 00:39:12 andrea-N240JU onedrive[29970]: Uploading file ./Università/Magistrale/2° anno - Primo semestre/Machine Learning/Ponedrive.OneDriveException@src/onedrive.d(408): HTTP request returned status code 412 (Precondition Failed)
feb 18 00:39:12 andrea-N240JU onedrive[29970]: {
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "error": {
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "code": "resourceModified",
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "innerError": {
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "date": "2018-02-17T23:39:14",
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "request-id": "0128d167-2b89-44ea-912a-ba1fb487363b"
feb 18 00:39:12 andrea-N240JU onedrive[29970]: },
feb 18 00:39:12 andrea-N240JU onedrive[29970]: "message": "ETag does not match current item's value"
feb 18 00:39:12 andrea-N240JU onedrive[29970]: }
feb 18 00:39:12 andrea-N240JU onedrive[29970]: }
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ----------------
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void onedrive.OneDriveApi.checkHttpCode(ref const(std.json.JSONValue)) [0x277da304]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? std.json.JSONValue onedrive.OneDriveApi.patch!(char).patch(const(char)[], const(char)[]) [0x277da3ca]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? std.json.JSONValue onedrive.OneDriveApi.updateById(const(char)[], const(char)[], std.json.JSONValue, const(char)[]) [0x277d8de3]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadLastModifiedTime(const(char)[], const(char)[], const(char)[], std.datetime.systime.SysTime) [0x277e3d13]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewFile(immutable(char)[]) [0x277e3a4c]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x277e34c8]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x277e33eb]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x277e33eb]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x277e33eb]
feb 18 00:39:12 andrea-N240JU onedrive[29970]: ??:? void sync.SyncEngine.uploadNewItems(immutable(char)[]) [0x277e33eb]
feb 18 00:39:12 andrea-N240JU systemd[1724]: onedrive.service: Main process exited, code=exited, status=1/FAILURE
feb 18 00:39:12 andrea-N240JU systemd[1724]: onedrive.service: Unit entered failed state.
feb 18 00:39:12 andrea-N240JU systemd[1724]: onedrive.service: Failed with result 'exit-code'.

I'm using Ubuntu 17.10 and onedrive v1.1.1.

@andreadistefano
Copy link
Author

andreadistefano commented Feb 18, 2018

Sometimes status code 412 happens without a crash, just printing this:

feb 18 01:04:26 andrea-N240JU onedrive[30824]: HTTP request returned status code 412 (Precondition Failed)
feb 18 01:04:26 andrea-N240JU onedrive[30824]: {
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "error": {
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "code": "resourceModified",
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "innerError": {
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "date": "2018-02-18T00:03:47",
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "request-id": "542ce81e-36e4-4ba6-917c-560e9998700f"
feb 18 01:04:26 andrea-N240JU onedrive[30824]: },
feb 18 01:04:26 andrea-N240JU onedrive[30824]: "message": "ETag does not match current item's value"
feb 18 01:04:26 andrea-N240JU onedrive[30824]: }
feb 18 01:04:26 andrea-N240JU onedrive[30824]: }

but then it just goes on instead of crashing.

@skilion
Copy link
Owner

skilion commented Feb 18, 2018

Can you share the files that cause those errors?

@andreadistefano
Copy link
Author

They are just pictures from the Labeled Faces in the Wild dataset (http://vis-www.cs.umass.edu/lfw/), that I used for a University project, for example this one (after I restart the client the picture gets uploaded, but another one will cause a crash soon).

george_w_bush_0384

@skilion
Copy link
Owner

skilion commented Feb 18, 2018

I have thoroughly debugged the issue (which has been reported since this app was made public on github) and I have concluded that the issue is caused by OneDrive as the code follows the API guidelines.

You can follow the issue on the OneDrive official repository OneDrive/onedrive-api-docs#800

@abraunegg
Copy link

@andystevens91

Any update? Have you tried using #314 where there a number of fixes including 412 errors.

@abraunegg
Copy link

@andystevens91
Can you re-validate #314 with commit 0b5dc66 ?

@abraunegg
Copy link

@andystevens91
Given it is all working - can we close this case now as it is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants