runerasmussen / google-photos-upload

Upload a local image directory into an Album in Google Photos (works on mac/pc/linux). Coded in C# .NET Core 3.0
Other
29 stars 12 forks source link

There is not sufficient space available in your Google Account #10

Open Garildi opened 3 years ago

Garildi commented 3 years ago

Not sure if this is still supposed to work with the current Google Photos APIs. No matter which API I use (the provided one or my own custom one), I'm always getting the following error message when trying to upload something:

`INFO Authentiation complete. WARN There is not sufficient space available in your Google Account to upload this folder. WARN 10.152905 Mb required, only -9.536743E-07 available Upload failed of Album '001' WARN There is not sufficient space available in your Google Account to upload this folder. WARN 10.8710375 Mb required, only -9.536743E-07 available Upload failed of Album 'New folder'


Upload summary: Album not uploaded. Not sufficient storage space in Google Photos. Album not uploaded. Not sufficient storage space in Google Photos.`

Listing existing albums works fine. It's a Business Standard account that still has more than 1TB free space.

runerasmussen commented 3 years ago

@Garildi it may be an issue with the Google Drive API where storage information for Business Standard account may be exposed in a different way. To confirm this theory is it possible you can share information from the log file (log\google-photos-upload.log) with me? Specifically I'm interested in the 3 lines with the text below, so just extract those lines and update here in this case:

Google account space limit (bytes): Google account space used (bytes): Google account space available (bytes):

Garildi commented 3 years ago

Thank you for looking into this! Here you go:

2021/09/27 12:28:18.765|DEBUG|Google account space limit (bytes):
2021/09/27 12:28:18.765|DEBUG|Google account space used (bytes): 387414638072 2021/09/27 12:28:18.765|DEBUG|Google account space available (bytes): -1

runerasmussen commented 3 years ago

@Garildi: The issue is as expected that the Google Drive with unlimited storage is currently not handled appropriately in the UploadService class in the "Google Photos Upload" tool.

Documentation from the Google Drive API: The usage limit, if applicable. This will not be present if the user has unlimited storage. https://googleapis.dev/dotnet/Google.Apis.Drive.v3/latest/api/Google.Apis.Drive.v3.Data.About.StorageQuotaData.html#Google_Apis_Drive_v3_Data_About_StorageQuotaData_Usage

For safety reasons I had implemented a measure to avoid filling up the storage account completely. This check should be avoided for accounts with unlimited storage.

I expect to fix the issue this coming weekend. Would you be open to test the change? (I don't have an unlimited Google Drive account)

runerasmussen commented 3 years ago

Draft release created. Testing remaining. https://github.com/runerasmussen/google-photos-upload/releases/tag/untagged-2a743773e2ba3b99d9e7