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

Handle OneDrive password change more gracefully #69

Closed
abraunegg opened this issue Jul 15, 2018 · 2 comments
Closed

Handle OneDrive password change more gracefully #69

abraunegg opened this issue Jul 15, 2018 · 2 comments
Labels
Bug Something isn't working Fixed

Comments

@abraunegg
Copy link
Owner

abraunegg commented Jul 15, 2018

After OneDrive user password is changed, onedrive crashes with the following:

onedrive.OneDriveException@src/onedrive.d(544): HTTP request returned status code 400 (Bad Request)
{
    "correlation_id": "d09b98d5-d072-48f4-94cb-7be8df59cdee",
    "error": "invalid_grant",
    "error_codes": [
        50173
    ],
    "error_description": "AADSTS50173: The provided grant has expired due to it being revoked. The user might have changed or reset their password. The grant was issued on '2018-07-04T10:28:18.3020190Z' and the TokensValidFrom date for this user is '2018-07-15T00:49:41.0000000Z'\r\nTrace ID: bc332c13-489d-46ec-8b49-96606a8a1900\r\nCorrelation ID: d09b98d5-d072-48f4-94cb-7be8df59cdee\r\nTimestamp: 2018-07-15 00:50:12Z",
    "timestamp": "2018-07-15 00:50:12Z",
    "trace_id": "bc332c13-489d-46ec-8b49-96606a8a1900"
}
Refresh token invalid, use --logout to authorize the client again
----------------
src/onedrive.d:33 void onedrive.OneDriveApi.checkHttpCode(ref const(std.json.JSONValue)) [0x5a5390]
src/onedrive.d:363 std.json.JSONValue onedrive.OneDriveApi.post!(char).post(const(char)[], const(char)[]) [0x5a5516]
src/onedrive.d:279 void onedrive.OneDriveApi.acquireToken(const(char)[]) [0x5a45e2]
src/onedrive.d:274 void onedrive.OneDriveApi.newToken() [0x5a4597]
src/onedrive.d:291 void onedrive.OneDriveApi.checkAccessTokenExpired() [0x5a4745]
src/onedrive.d:95 std.json.JSONValue onedrive.OneDriveApi.getDefaultDrive() [0x5a33f8]
src/sync.d:160 void sync.SyncEngine.init() [0x5ae2b9]
src/main.d:195 _Dmain [0x59520f]

Handle this more gracefully without the application crashing

@abraunegg abraunegg added Bug Something isn't working In Progress Currently being worked on labels Jul 15, 2018
@abraunegg
Copy link
Owner Author

Resolved in PR #73 that changes the behaviour when account password is changed:

Loading config ...
Using Config Dir: /root/.config/onedrive
No config file found, using defaults
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /root/OneDrive
Initializing the Synchronization Engine ...

Authorization token invalid, use --logout to authorize the client again

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

lock bot commented Jan 6, 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 6, 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
Projects
None yet
Development

No branches or pull requests

1 participant