Webdav + Union of OneDrive: Expecting fs.Object or fs.Directory, got <nil>

What is the problem you are having with rclone?

Same problem as Rclone serve webdav + OneDrive: Expecting fs.Object or fs.Directory, got <nil>.
Using Rclone with a Union of OneDrive accounts (for test 2) in the log I keep getting
ERROR: {[path]}: Expecting fs.Object or fs.Directory, got <nil>
even though the transfer ends with no visible problems.

Is there any news on how to avoid this problem?

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

rclone v1.63.1

  • os/version: ubuntu 22.04 (64 bit)
  • os/kernel: 5.19.0-46-generic (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.20.6
  • go/linking: static
  • go/tags: none

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

Union of two OneDrive

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

rclone serve webdav Unione-Crypt: --addr 192.168.3.66:8000 --vfs-cache-mode full --union-cache-time 0

The rclone config contents with secrets removed.

[OneDrive1]

type = onedrive

token = [secret]

drive_id = [secret]

drive_type = personal

[OneDrive2]

type = onedrive

token = [secret]

drive_id = [secret]

drive_type = personal

[Unione]

type = union

upstreams = OneDrive1: OneDrive2:

[Unione-Crypt]

type = crypt

remote = Unione:

password = [secret]

password2 = [secret]

A log from the command with the -vv flag

2023/07/25 19:07:14 DEBUG : /[path]: OpenFile: flags=O_RDONLY, perm=----------

2023/07/25 19:07:14 DEBUG : [path]: Open: flags=O_RDONLY

2023/07/25 19:07:14 DEBUG : [path]: newRWFileHandle:

2023/07/25 19:07:14 DEBUG : [path]: >newRWFileHandle: err=<nil>

2023/07/25 19:07:14 DEBUG : [path]: >Open: fd=[path] (rw), err=<nil>

2023/07/25 19:07:14 DEBUG : /[path]: >OpenFile: fd=[path] (rw), err=<nil>

2023/07/25 19:07:14 DEBUG : [path](0xc0020491c0): close:

2023/07/25 19:07:14 DEBUG : [path](0xc0020491c0): >close: err=<nil>

2023/07/25 19:07:14 DEBUG : /[path]: OpenFile: flags=O_RDONLY, perm=----------

2023/07/25 19:07:14 DEBUG : [path]: Open: flags=O_RDONLY

2023/07/25 19:07:14 DEBUG : [path]: newRWFileHandle:

2023/07/25 19:07:14 DEBUG : [path]: >newRWFileHandle: err=<nil>

2023/07/25 19:07:14 DEBUG : [path]: >Open: fd=[path] (rw), err=<nil>

2023/07/25 19:07:14 DEBUG : /[path]: >OpenFile: fd=[path] (rw), err=<nil>

2023/07/25 19:07:14 ERROR : {[path] 0xc001c92000}: Expecting fs.Object or fs.Directory, got <nil>

2023/07/25 19:07:14 DEBUG : [path](0xc002049240): close:

2023/07/25 19:07:14 DEBUG : [path](0xc002049240): >close: err=<nil>

try instead of

upstreams = OneDrive1: OneDrive2:

run union over some folder:

upstreams = OneDrive1:union OneDrive2:union

I have tried but the same problem occurs

Not sure if it's your issue.

But when I tried in the past to upload crypted files to OneDrive, my store got locked.
Because Microsoft was thinking my storage was encrypted by some ransomware.
In particular, I was encrypting the filename.

Thanks for the feedback.
I'm currently just doing some tests and have not received any communication in these weeks... if I understand you correctly they have blocked the entire storage 'permanently' and not individual calls, correct?
If so, considering that from the OneDrive webapp I can safely access the files I don't think it's relevant to the problem (but thank you :smiling_face:)

This is a bug - you should never see this message.

I need to see the full log to help though - can you post that somewhere?

Sure, here you go

In the meantime, I varied the configuration slightly.

rclone version

rclone v1.63.1
- os/version: unknown
- os/kernel: 4.4.302+ (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: none

I have also restricted the level number, the problem also occurs when using a OneDrive account directly (without union or encryption)

config

[OneDrive4]
type = onedrive
token = [secret]
drive_id = [secret]
drive_type = personal

I hope I have been helpful, if you need anything please ask

In your log the file testRclone/NAS_1.hbk/synobkpinfo.db gets opened and closed and queued for upload a lot.

What appears to be happening is while the file is being uploaded it loses its directory info.

This means that rclone can't determine the content-type at that time so logs the error and sets the content type to application/octet-stream.

Try this - it should fix the error :slight_smile:

v1.64.0-beta.7175.cca5b2cdc.fix-webdav-error on branch fix-webdav-error (uploaded in 15-30 mins)

Thank you very much!
I'll try it this afternoon and let you know

1 Like

Perfect!
It works without any problems and no more errors appear!
Many thanks again :smiling_face:

1 Like

Thanks for testing :slight_smile:

I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.64

1 Like

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