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 case where API provided deltaLink generates a further API error #1175

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

abraunegg
Copy link
Owner

  • Handle case where API provided deltaLink generates a further API error

* Handle case where deltaLink generates an API error
@abraunegg abraunegg added this to the v2.4.9 milestone Dec 8, 2020
@abraunegg abraunegg linked an issue Dec 8, 2020 that may be closed by this pull request
@abraunegg
Copy link
Owner Author

@norbusan
This fixes the storing issue of the bad deltaLink:

(dmd-2.093.1)[alex@centos7full fix-issue-1174]$ ./onedrive --confdir '~/.config/onedrive-personal/' --synchronize --verbose
Using 'user' Config Dir: /home/alex/.config/onedrive-personal/
Using 'system' Config Dir: 
Configuration file successfully loaded
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /home/alex/OneDrivePersonal
Application version: v2.4.8-1-g4a68eb4
Account Type: personal
Default Drive ID: 66d53be8a5056eca
Default Root ID: 66D53BE8A5056ECA!101
Remaining Free Space: 5368287434
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from OneDrive ...
Applying changes of Path ID: 66D53BE8A5056ECA!101
Updated Remaining Free Space: 5368287434
------------------------------------------------------------------
ISSUE #1174 Triggered
------------------------------------------------------------------

ERROR: OneDrive returned an error with the following message:
  Error Message: HTTP request returned status code 400 (Bad Request)
  Error Reason:  Invalid API or resource
Uploading differences of ~/OneDrivePersonal
Processing .
The directory has not changed
Processing random_files
The directory has not changed
Processing random_images
The directory has not changed
Processing random_videos
The directory has not changed
Processing Dropbox
The directory has not changed
Processing Music
The directory has not changed
Processing Music/audio003.mp3
The file has not changed
Processing Images
The directory has not changed
Processing Images/image003.jpg
The file has not changed
Processing Documents
The directory has not changed
Processing Documents/Uni
The directory has not changed
Processing Documents/Uni/01
The directory has not changed
Processing Documents/Uni/01/asdfasdf.txt
The file has not changed
Processing Documents/Uni/02
The directory has not changed
Processing Documents/Uni/02/qwerqwer.txt
The file has not changed
Processing Documents/Uni/03
The directory has not changed
Processing Documents/Uni/03/zxcvzxcvzxcv.txt
The file has not changed
Processing Documents/Uni/04
The directory has not changed
Processing Documents/Uni/04/fghjfghjfghj.txt
The file has not changed
Processing Documents/Uni/05
The directory has not changed
Processing Documents/Uni/05/dfghdfghdfgh.txt
The file has not changed
Processing Documents/Music
The directory has not changed
Processing Documents/Music/audio001.mp3
The file has not changed
Processing Documents/Images
The directory has not changed
Processing Documents/Images/image001.jpg
The file has not changed
Processing Documents/SpeedTest
The directory has not changed
Processing Documents/SpeedTest/automated_speedtest.log
The file has not changed
Processing Documents/SpeedTest/Bandwidth measurement_ Speedtest.net.csv
The file has not changed
Processing Documents/SpeedTest/Bandwidth measurement_ Speedtest.net.xlsx
The file has not changed
Uploading new items of ~/OneDrivePersonal
Applying changes of Path ID: 66D53BE8A5056ECA!101
Updated Remaining Free Space: 5368287434
Processing 30 OneDrive items to ensure consistent local state
Number of items from OneDrive to process: 1

When triggered, sets the deltaLink to an empty value, which, on next query for /delta, there is no link provided, thus, fixes itself as Microsoft has now fixed the API to respond correctly.

Copy link
Collaborator

@norbusan norbusan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that works!

@abraunegg abraunegg merged commit 335eab3 into master Dec 9, 2020
@abraunegg abraunegg deleted the fix-issue-1174 branch December 9, 2020 03:03
@github-actions
Copy link

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

@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OneDrive generates a 'Invalid API or resource' error message
2 participants