Skip to content

GoogleDrive folder appears empty after file update #23284

Closed

Description

@atroxix

Steps to reproduce

  1. Add GoogleDrive external storage
  2. Update some file in GoogleDrive (re-uploading to either Google Drive or OwnCloud web UI)

Expected behaviour

File should be update. I hoped to see whether versions are stored too.

Actual behaviour

When uploaded to OwnCloud then 2 files with the same name appeared in both UIs.
I then removed this newer version from Google Drive and re-uploaded it in Google Drive UI.
In Google Drive UI I still see 2 files with the same name, but with different modification times. In OwnCloud the folder is totally empty now (it had 1 other file besides it).

Server configuration

Operating system: FreeBSD

Web server: Apache 2.4

Database: MariaDB 10.0

PHP version: 5.6

ownCloud version: 9.0.0

Updated from an older ownCloud or fresh install: Updated from 8.2 through 9.0-RC1

Where did you install ownCloud from: FreeBSD ports

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

Enabled:
  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.5
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_external: 0.5.2
  - files_pdfviewer: 0.8
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: true
  - updatenotification: 0.1.0
Disabled:
  - encryption
  - external
  - gallery
  - user_external
  - user_ldap

The content of config/config.php:

The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
{
    "system": {
        "instanceid": "occ40e4dc891",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/srv\/www\/owncloud_data",
        "dbtype": "mysql",
        "version": "9.0.0.19",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "trusted_domains": [
            "oc.kodu"
        ],
        "forcessl": false,
        "mail_smtpmode": "php",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updatechecker": false,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "singleuser": false,
        "loglevel": 2,
        "logfile": "\/var\/log\/owncloud.log",
        "maintenance": false,
        "appstore.experimental.enabled": false,
        "trashbin_retention_obligation": "auto",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\APCu",
        "memcache.local": "\\OC\\Memcache\\APCu"
    }
}

Are you using external storage, if yes which one: Google Drive

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Firefox or Chromium

Operating system: OpenSUSE 42.1

Logs

Web server error log

(nothing)

ownCloud log (data/owncloud.log)

(nothing)

Browser log

Nothing at first, but when doing reload in Firefox I get (in any folder though):

Content Security Policy: Directive 'frame-src' has been deprecated. Please use directive 'child-src' instead. <unknown>
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
Content Security Policy: The page's settings blocked the loading of a resource at self ("script-src http://oc.kodu 'unsafe-eval'"). files
window.controllers is deprecated. Do not use it for UA detection. ace.js:1716:0
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead. jquery.min.js:5:17117

Activity

  1. PVince81 commented on Mar 21, 2016

    @PVince81
    Contributor

    @atroxix GDrive by design allows users to upload two files with the same name, but considers them as separate files. It doesn't create versions when you upload directly to GDrive, bypassing OC.

    Since OC doesn't support having several files with same names, it will ignore such files (the owncloud.log will tell you).

    What should work is overwriting the same file through ownCloud.

    Having several files with same names inside GDrive (created directly on GDrive) isn't supported by ownCloud.

  2. PVince81 commented on Mar 21, 2016

    @PVince81
    Contributor

    I hoped to see whether versions are stored too.

    To answer your question, versions for external storages are ownCloud-only. This means that when you use GDrive through ownCloud, the versions are stored locally. They are not semantically linked with GDrive's own versions system.

  3. atroxix commented on Mar 22, 2016

    @atroxix
    Author

    I hoped to see whether versions are stored too.

    To answer your question, versions for external storages are ownCloud-only.

    Tested this a bit now, and it seems to work quite OK, but with a few interesting nuances in versions... here's what happened:

    1. Created text file in computer -- appears in UI too
    2. Added additional line from computer -- under Versions instead of the initial version the 2nd one is shown (and downloaded)
    3. Added additional line from UI -- the previous version is preserved properly
    4. Added additional line from computer -- the previous version (with line added from UI) isn't listed under Versions
    5. Added additional line from UI -- the previous version is preserved properly, but listed twice
  4. PVince81 commented on Jun 17, 2016

    @PVince81
    Contributor

    Can you try again with 9.0.3RC1 or 9.1.0beta2 ? Note that in 9.1 we updated the Google SDK lib, so there might be more improvements.

  5. atroxix commented on Jun 23, 2016

    @atroxix
    Author

    I upgraded to 9.1.0beta2 now. Tested the same sequence with computer (owncloud-client 2.2.2) and web UI. Here's what happened:

    1. Added line from UI -- got updated and downloaded to computer
    2. Added line from computer:
      • got uploaded to server, but then disappeared from web UI
      • in computer it's logged under activity that it was deleted
      • under Google Drive I see the same file 2 times now - one which was last updated from UI and another one which was last updated from computer

    When I remove the duplicate (older) version of the file from GoogleDrive then the file re-appears and has all the version history available and everything. But when I update the file from computer again then the file is again duplicated in GoogleDrive and thus disappears from OwnCloud view.

  6. PVince81 commented on Sep 20, 2016

    @PVince81
    Contributor

    If the file appears twice on GDrive with the same name, OC is ignoring it as if it didn't exist because it cannot handle this kind of situation.

    Now the question is why a second version was created in the first place, sounds similar to this report: https://central.owncloud.org/t/issue-with-versioning-on-google-drive/1683/9 and #25827

  7. self-assigned this
    on Jan 27, 2017
  8. added this to the 10.0 milestone on Jan 27, 2017
  9. PVince81 commented on Apr 6, 2017

    @PVince81
    Contributor

    Closing in favor of #25827

  10. lock commented on Aug 2, 2019

    @lock

    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.

  11. locked as resolved and limited conversation to collaborators on Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions