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

Gateway Timeout - JSONValue is not an object #127

Closed
dawbarton opened this issue Aug 17, 2018 · 12 comments
Closed

Gateway Timeout - JSONValue is not an object #127

dawbarton opened this issue Aug 17, 2018 · 12 comments
Labels
Bug Something isn't working Fixed Waiting on Response

Comments

@dawbarton
Copy link

On the latest master (onedrive v2.1.1-3-gb98c938) I get "JSONValue is not an object" errors reasonably frequently, sometimes accompanied by "Gateway Timeout" errors. It doesn't seem to stop the sync but I'm never quite sure... It does appear to be dependent on my internet connection (i.e., better in some places, worse in others).

The error messages part way through a sync are

Downloading file <a file> ... done.
JSONValue is not an object
Syncing changes from OneDrive ...
Deleting item from OneDrive: Coding/Onedrive
HTTP request returned status code 504 (Gateway Timeout)
{
    "error": {
        "code": "UnknownError",
        "innerError": {
            "date": "2018-08-17T10:17:32",
            "request-id": "1f840ac7-cb98-4585-86c9-846f7e282de2"
        },
        "message": ""
    }
}
Syncing changes from OneDrive ...
Deleting item <another file>

and then at the end of the output when syncing appears to be complete

std.json.JSONException@std/json.d(260): JSONValue is not an object
----------------
/usr/include/dmd/phobos/std/exception.d:515 pure @safe void std.exception.bailOut!(std.json.JSONException).bailOut(immutable(char)[], ulong, const(char[])) [0x58bc7b]
/usr/include/dmd/phobos/std/exception.d:436 pure @safe bool std.exception.enforce!(std.json.JSONException).enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x58bbf5]
??:? inout pure @property @trusted inout(std.json.JSONValue[immutable(char)[]]) std.json.JSONValue.objectNoRef() [0x5e6471]
??:? inout pure ref @safe inout(std.json.JSONValue) std.json.JSONValue.opIndex(immutable(char)[]) [0x5e6648]
src/sync.d:51 itemdb.Item sync.makeItem(ref const(std.json.JSONValue)) [0x5b324c]
src/sync.d:1323 void sync.SyncEngine.saveItem(std.json.JSONValue) [0x5b9406]
src/sync.d:911 void sync.SyncEngine.uploadFileDifferences(itemdb.Item, immutable(char)[]) [0x5b7315]
src/sync.d:773 void sync.SyncEngine.uploadDifferences(itemdb.Item) [0x5b67c0]
src/sync.d:793 void sync.SyncEngine.uploadDirDifferences(itemdb.Item, immutable(char)[]) [0x5b697d]
src/sync.d:770 void sync.SyncEngine.uploadDifferences(itemdb.Item) [0x5b678d]
src/sync.d:793 void sync.SyncEngine.uploadDirDifferences(itemdb.Item, immutable(char)[]) [0x5b697d]
src/sync.d:770 void sync.SyncEngine.uploadDifferences(itemdb.Item) [0x5b678d]
src/sync.d:793 void sync.SyncEngine.uploadDirDifferences(itemdb.Item, immutable(char)[]) [0x5b697d]
src/sync.d:770 void sync.SyncEngine.uploadDifferences(itemdb.Item) [0x5b678d]
src/sync.d:733 void sync.SyncEngine.scanForDifferences(immutable(char)[]) [0x5b65bd]
src/main.d:405 void main.performSync(sync.SyncEngine, immutable(char)[], bool, bool, bool) [0x59999f]
src/main.d:269 _Dmain [0x59920f]

Thanks for all you are doing on this software!

@abraunegg abraunegg added Bug Something isn't working Investigating labels Aug 17, 2018
@abraunegg
Copy link
Owner

Thanks - will have to trace through this when I have more time - this weekend is rather packed.

@abraunegg
Copy link
Owner

@dawbarton
Can you please try this specific branch which has some changes in regards to error handling & object handling based on the issue you have described:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/129/head:pr129
git checkout pr129
make
make install

@dawbarton
Copy link
Author

dawbarton commented Aug 18, 2018 via email

@abraunegg
Copy link
Owner

@dawbarton
Any update on this issue?

@dawbarton
Copy link
Author

Appears to be working though very slow (that could be my connection) and it did throw an error (key not found) at one point while syncing changes -

Uploading file ./Coding/MATLABPlots/.git/objects/13/7767a42af4a6bc4e8d823feb3bedec27ee23b2 ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo|   ETA   --:--:--:     
 done.
Key not found: id
Syncing changes from OneDrive ...
Uploading file ./Coding/MATLABPlots/.git/objects/c3/5ad88f1a738e5617ec31f9313ca26118acfa17 ...
Uploading 100% |oooooooooooooooooooooooooooooooooooooooo|   ETA   --:--:--:                                                                                                
 done.

and again later in the same sync

Uploading 100% |oooooooooooooooooooooooooooooooooooooooo|   ETA   --:--:--:                                                                                                
 done.
Key not found: value
Syncing changes from OneDrive ...

@abraunegg
Copy link
Owner

OK - thanks for the feedback .. looks like the initial changes have worked there (as in not fully crashing out) but now needs some additional checks.

@abraunegg
Copy link
Owner

@dawbarton
Can you rebuild your client with the latest PR 129 change?

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/129/head:pr129
git checkout pr129
make
make install

I have added a check around looking for the value key in changes being passed back from OneDrive, however the Key not found: id one could be coming from anywhere in the code at this point - as there are 22 references.

If you can run with the latest changes, and see if that improves the situation that would be greatly appreciated.

@dawbarton
Copy link
Author

Will do - probably Friday before I'll get chance though. Thanks for looking into it!

@abraunegg abraunegg added In Progress Currently being worked on and removed Investigating labels Aug 23, 2018
@dawbarton
Copy link
Author

I didn't get any errors on my run today but will try again next week when I have more changes to sync. Thanks!

@abraunegg
Copy link
Owner

@dawbarton
Any further update on this issue?

abraunegg added a commit that referenced this issue Aug 27, 2018
* Resolve Gateway Timeout - JSONValue is not an object (Issue #127)
@abraunegg
Copy link
Owner

PR merged

@abraunegg abraunegg added Fixed and removed In Progress Currently being worked on labels Aug 27, 2018
@lock
Copy link

lock bot commented Jan 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed Waiting on Response
Projects
None yet
Development

No branches or pull requests

2 participants