onedrive-api-docs: ODB: The OneDrive API is inconsistent with providing hash data in /delta JSON response (URGENT BUG)

Category

  • Question
  • Documentation issue
  • Bug

The OneDrive API

Expected or Desired Behavior

The hashes component should always have an entry.

"file": {
				"hashes": {
					"quickXorHash": "qlLLA1L3gC6HiNFu2JkgxT8ICuk="
				},
				"mimeType": "text/plain"
			},

Observed Behavior

As per https://github.com/abraunegg/onedrive/issues/2423 - the OneDrive Client for Linux now is only looking for quickXorHash or sha256Hash for files - however it appears in some instances the API does not always provide hashes in the /delta API response:

"file": {
				"hashes": {},
				"mimeType": "text/plain"
			},

image

Steps to Reproduce

Use the /delta query or the OneDrive Client for Linux - see https://github.com/abraunegg/onedrive/issues/2433 Thank you.

[ ]: http://aka.ms/onedrive-api-issues [x]: http://aka.ms/onedrive-api-issues

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 24 (8 by maintainers)

Most upvoted comments

@ificator

@abraunegg in that case, if the item contains the deleted facet, could we skip the logic that asserts the required hashes are present? That’ll avoid some noise in your client logs while this type of hash-less data ages out of the system.

In the current v2.4.x codebase, unfortunately this is not going to be possible without a new v2.4.26 release.

In the v2.5.x codebase (which is in active development & is a 100% re-write of the client to implement some major features & change) this has already factored in - and only items that are files and not deleted are checked for the presence of the required hash items.

Mine is a business account, but it seems to me (I have just the id, and the name of the directories) that my non-zero files causing the error are related to OneNote.

@ificator The code looks at quickxorhash then sha256hash as the fallback

This looks to be an edge case with 0-byte files not generating a quickXorHash value.