ERROR reading Native Google formats through mount

What is the problem you are having with rclone?

Unable to edit native Google Docs through rclone mount.

However if I do a simple copy, the file gets copied as a docx format with the contents preserved.

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.13.0-48-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.9
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Google Drive (through Workspace)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount gdrive: /path/to/mount-dir \
    --cache-dir  /path/to/cache-dir \
    --vfs-cache-mode full \
    --vfs-read-chunk-size 300M \
    --vfs-read-chunk-size-limit 600M \
    --drive-export-formats ods,odt,odp \
    --daemon --log-file /path/to/logfile \
    --log-level DEBUG

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

2022/06/15 11:44:59 DEBUG : /: Lookup: name="test_dir"
2022/06/15 11:44:59 DEBUG : /: >Lookup: node=test_dir/, err=<nil>
2022/06/15 11:44:59 DEBUG : test_dir/: Attr: 
2022/06/15 11:44:59 DEBUG : &{test_dir/gdocs_to_odt_conv_test.odt (rw)}: Release: 
2022/06/15 11:44:59 DEBUG : test_dir/gdocs_to_odt_conv_test.odt(0xc000679e80): RWFileHandle.Release
2022/06/15 11:44:59 DEBUG : test_dir/gdocs_to_odt_conv_test.odt(0xc000679e80): close: 
2022/06/15 11:44:59 DEBUG : test_dir/gdocs_to_odt_conv_test.odt(0xc000679e80): >close: err=<nil>
2022/06/15 11:44:59 DEBUG : &{test_dir/gdocs_to_odt_conv_test.odt (rw)}: >Release: err=<nil>
2022/06/15 11:44:59 DEBUG : test_dir/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2022/06/15 11:44:59 DEBUG : test_dir/: Lookup: name="gdocs_to_odt_conv_test.odt"
2022/06/15 11:45:00 DEBUG : test_dir: Removed virtual directory entry vAddFile: ".~lock.gdocs_to_odt_conv_test.odt#"
2022/06/15 11:45:00 DEBUG : test_dir/: >Lookup: node=test_dir/gdocs_to_odt_conv_test.odt, err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/gdocs_to_odt_conv_test.odt: Attr: 
2022/06/15 11:45:00 DEBUG : test_dir/gdocs_to_odt_conv_test.odt: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-r--, err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/: Lookup: name=".~lock.gdocs_to_odt_conv_test.odt#"
2022/06/15 11:45:00 DEBUG : test_dir/: >Lookup: node=test_dir/.~lock.gdocs_to_odt_conv_test.odt#, err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: Attr: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >Attr: a=valid=1s ino=0 size=77 mode=-rw-rw-r--, err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: Open: flags=OpenReadOnly
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: Open: flags=O_RDONLY
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: newRWFileHandle: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >newRWFileHandle: err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >Open: fd=test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw), err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >Open: fh=&{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}, err=<nil>
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: Read: len=4096, offset=0
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): _readAt: size=4096, off=0
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): openPending: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: vfs cache: checking remote fingerprint "77,2022-06-15 02:12:18.121 +0000 UTC,7c4da10f40a1c0d2ccc41bd42319525e" against cached fingerprint "77,2022-06-15 02:12:18.121 +0000 UTC,7c4da10f40a1c0d2ccc41bd42319525e"
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: vfs cache: truncate to size=77
2022/06/15 11:45:00 DEBUG : test_dir: Added virtual directory entry vAddFile: ".~lock.gdocs_to_odt_conv_test.odt#"
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): >openPending: err=<nil>
2022/06/15 11:45:00 DEBUG : vfs cache: looking for range={Pos:0 Size:77} in [{Pos:0 Size:77}] - present true
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): >_readAt: n=77, err=EOF
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: >Read: read=77, err=<nil>
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: Flush: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): RWFileHandle.Flush
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: >Flush: err=<nil>
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: Release: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): RWFileHandle.Release
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): close: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: Attr: 
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: vfs cache: setting modification time to 2022-06-15 02:12:18.121 +0000 UTC
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#(0xc000b2e400): >close: err=<nil>
2022/06/15 11:45:00 DEBUG : &{test_dir/.~lock.gdocs_to_odt_conv_test.odt# (rw)}: >Release: err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >Attr: a=valid=1s ino=0 size=77 mode=-rw-rw-r--, err=<nil>
2022/06/15 11:45:00 DEBUG : test_dir/: Remove: name=".~lock.gdocs_to_odt_conv_test.odt#"
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: Remove: 
2022/06/15 11:45:00 INFO  : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: vfs cache: removed cache file as file deleted
2022/06/15 11:45:00 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: vfs cache: removed metadata from cache as file deleted
2022/06/15 11:45:00 DEBUG : test_dir: Added virtual directory entry vDel: ".~lock.gdocs_to_odt_conv_test.odt#"
2022/06/15 11:45:01 DEBUG : test_dir/.~lock.gdocs_to_odt_conv_test.odt#: >Remove: err=<nil>

See:

Google drive (rclone.org)

Does this mean downloading is not consistent with mount for Google native documents. I'm using fairly standard boilerplate tools (ubuntu, rclone, LibreOffice). Can someone confirm if this works or not for this standard toolset.

It means a mount doesn't generally work for Google Docs.

What happens?

If it was going to work you'd need a --drive-import-formats too.

I added the --drive-import-formats ods,odt,odp, the google doc file gdocs_to_odt_conv_test is now mounted as gdocs_to_odt_conv_test.odt. However, when I try to open it with libreoffice, it throws an error

Read Error: Data could not be read from file

We don't know the size of Google docs until we download them. This confuses nearly everything which expects a file to have a known size.

I thought this might work with --vfs-cache-mode full but it looks like it doesn't.