Google Drive external storage

When I’m trying to upload a file, I’m receiving no free space alert

Steps to reproduce

  1. Configured the google drive folder

Expected behaviour

Expected to have the file uploaded.
I tried with a file with 1Mb.

Actual behaviour

Receiving an alert saying No Free Space
If I send the same file to other folder, this works well. This only happens on Google Drive

Server configuration

Operating system: Ubuntu 20.04

Web server:: Apache

Database:: MariaDB

PHP version:: 7.4

ownCloud version: (see ownCloud admin page): 10.12

Updated from an older ownCloud or fresh install:: Fresh install

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Enabled:

  • activity:
    • Version: 2.7.1
    • Path: /var/www/owncloud/apps/activity
  • comments:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/comments
  • configreport:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/configreport
  • dav:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/dav
  • federatedfilesharing:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/federatedfilesharing
  • federation:
    • Version: 0.1.0
    • Path: /var/www/owncloud/apps/federation
  • files:
    • Version: 1.5.2
    • Path: /var/www/owncloud/apps/files
  • files_external:
    • Version: 0.9.0
    • Path: /var/www/owncloud/apps/files_external
  • files_mediaviewer:
    • Version: 1.0.5
    • Path: /var/www/owncloud/apps/files_mediaviewer
  • files_pdfviewer:
    • Version: 1.0.1
    • Path: /var/www/owncloud/apps/files_pdfviewer
  • files_sharing:
    • Version: 0.14.0
    • Path: /var/www/owncloud/apps/files_sharing
  • files_texteditor:
    • Version: 2.5.1
    • Path: /var/www/owncloud/apps/files_texteditor
  • files_trashbin:
    • Version: 0.9.1
    • Path: /var/www/owncloud/apps/files_trashbin
  • files_versions:
    • Version: 1.3.0
    • Path: /var/www/owncloud/apps/files_versions
  • firstrunwizard:
    • Version: 1.2.0
    • Path: /var/www/owncloud/apps/firstrunwizard
  • market:
    • Version: 0.7.0
    • Path: /var/www/owncloud/apps/market
  • notifications:
    • Version: 0.5.4
    • Path: /var/www/owncloud/apps/notifications
  • provisioning_api:
    • Version: 0.5.0
    • Path: /var/www/owncloud/apps/provisioning_api
  • systemtags:
    • Version: 0.3.0
    • Path: /var/www/owncloud/apps/systemtags
  • templateeditor:
    • Version: 0.4.0
    • Path: /var/www/owncloud/apps/templateeditor
  • updatenotification:
    • Version: 0.2.1
    • Path: /var/www/owncloud/apps/updatenotification

Are you using external storage, if yes which one: local/smb/sftp/… : Google Drive

Are you using encryption: yes/no : no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…: No

ownCloud log (data/owncloud.log)

{"reqId":"R2Lu56uILCj2nRzhX2FO","level":3,"time":"2023-06-09T10:56:31+00:00","remoteAddr":"139.xxx.xxx.xxx","user":"admin","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/4","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Creating Google storage failed\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(203): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\Google->__construct()\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(253): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus()\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(189): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(169): OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(99): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(344): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(913): OC\\\\Route\\\\Router->match()\\n#9 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#10 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/Google.php\",\"Line\":86}"}
{"reqId":"WBVIoFIbkDbxxVOnO0Bc","level":3,"time":"2023-06-09T10:56:45+00:00","remoteAddr":"139.xxx.xxx.xxx","user":"admin","app":"files_external","method":"GET","url":"\/index.php\/apps\/files_external\/globalstorages\/4?testOnly=true","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Creating Google storage failed\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(203): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\Google->__construct()\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(253): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus()\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(307): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(169): OCA\\\\Files_External\\\\Controller\\\\StoragesController->show()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(99): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(344): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(913): OC\\\\Route\\\\Router->match()\\n#9 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#10 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/Google.php\",\"Line\":86}"

What is your exact ownCloud version? There has been some issues with the free space with OC 10.12.0 and 32 bits systems, but it should be fixed in 10.12.1 and 10.12.2

Other than that, I’m not aware of any other issue with free space, so could you double-check that you have enough space in google drive?

Hey,

Owncloud Version: 10.12.2.1
Linux Version: Linux cloud 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
System: getconf LONG_BIT
64

About the free space in the google drive, yes, I still have free space there, and I’m sending a file with just 15 Kb.

I’m seeing a new error

{"reqId":"LizyoKDf9E0FVHZhuAIJ","level":3,"time":"2023-06-15T07:45:31+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"admin","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/globalstorages\/5","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"Invalid token format\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Lib\\\/Storage\\\/Google.php(78): Google\\\\Client->setAccessToken()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/External\\\/LegacyUtil.php(203): OCA\\\\Files_External\\\\Lib\\\\Storage\\\\Google->__construct()\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/StoragesController.php(253): OC\\\\Files\\\\External\\\\LegacyUtil::getBackendStatus()\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/Controller\\\/GlobalStoragesController.php(189): OCA\\\\Files_External\\\\Controller\\\\StoragesController->updateStorageStatus()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(169): OCA\\\\Files_External\\\\Controller\\\\GlobalStoragesController->update()\\n#5 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(99): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(344): OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke()\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(913): OC\\\\Route\\\\Router->match()\\n#10 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/files_external\\\/3rdparty\\\/google\\\/apiclient\\\/src\\\/Client.php\",\"Line\":521}"}

New update.

I was trying to debug and I changed some part of the code, and after that, the upload started to work.

I commented this block of code

$availableSpace = $freeSpace + $extraSpace;
if ($freeSpace !== FileInfo::SPACE_UNKNOWN && $freeSpace !== FileInfo::SPACE_UNLIMITED && (($length > $availableSpace) || ($availableSpace <= 0.0))) {
      if (isset($chunkHandler)) {
              $chunkHandler->cleanup();
      }
      throw new InsufficientStorage();
}

In the file apps/dav/lib/Connector/Sabre/QuotaPlugin.php

After this change, I was able to upload the files

Hey,

i think this could be solved once the ownCloud team has released a new version including the fix(es) from:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.