Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload any files when using a nested path with --single-directory if folders already exist on OneDrive #1582

Closed
plouj opened this issue Jul 19, 2021 · 11 comments · Fixed by #1583
Labels
Bug Something isn't working Fixed
Milestone

Comments

@plouj
Copy link

plouj commented Jul 19, 2021

Bug Report Details

I'm unable to upload any of my files and the error in all/most cases appears to be:

Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file:

Application and Operating System Details:

  • Ubuntu Focal 20.04.2 LTS, Linux 5.8.0-50-generic
  • no gui
  • OneDrive Account Type: Personal
  • Built from scratch in Docker with docker build . -t local-onedrive -f contrib/docker/Dockerfile
  • OneDrive Application Version: onedrive v2.4.13-3-g398e790
  • OneDrive Application Configuration:
onedrive version                       = v2.4.13-3-g398e790
Config path                            = /home/onedrive/.config/onedrive
Config file found in config path       = false
Config option 'check_nosync'           = false
Config option 'sync_dir'               = /home/onedrive/OneDrive
Config option 'skip_dir'               = 
Config option 'skip_file'              = ~*|.~*|*.tmp
Config option 'skip_dotfiles'          = false
Config option 'skip_symlinks'          = false
Config option 'monitor_interval'       = 300
Config option 'min_notify_changes'     = 5
Config option 'log_dir'                = /var/log/onedrive/
Config option 'classify_as_big_delete' = 1000
Config option 'upload_only'            = false
Config option 'no_remote_delete'       = false
Config option 'remove_source_files'    = false
Config option 'sync_root_files'        = false
Selective sync 'sync_list' configured  = false
Business Shared Folders configured     = false
  • Tthe version of curl in the container:
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.53.1 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
  • The configured 'sync_dir' is a local directory with the main directory being a fuse.sshfs mount:
$ ls -la /var/tmp/remote/
total 12
drwxrwxr-x  3 plouj plouj 4096 Jul 18 11:33 .
drwxrwxrwt 28 root  root  4096 Jul 18 11:02 ..
drwxrwxrwx  1 plouj plouj   61 Mar 10 20:11 games
$ mount|grep remote
remote:/storage/games/ on /var/tmp/remote/games type fuse.sshfs (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000,allow_other)

The mount was created with:

mkdir /var/tmp/remote
sshfs -o ro,allow_other,ServerAliveInterval=15,ServerAliveCountMax=3,reconnect remote:/storage/games/ /var/tmp/remote/games/

I think the actual files on the remote machine resides on a zfs partitition.

I run onedrive with Docker like this:

$ docker run --rm -ti -v $HOME/.config/onedrive/:/onedrive/conf -v "/var/tmp/remote/:/onedrive/data/:ro" -e "ONEDRIVE_UID=$(id -u)" -e "ONEDRIVE_GID=$(id -g)" local-onedrive:latest --dry-run --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only
  • The OneDrive folder is not shared with any other systems or platforms at the same time.

  • Full debug log sent to support@mynas.com.au as onedrive-plouj-debug-http.log

Output for a small sub-directory

$ docker run --rm -ti -v $HOME/.config/onedrive/:/onedrive/conf -v "/var/tmp/remote/:/onedrive/data/:ro" -e "ONEDRIVE_UID=$(id -u)" -e "ONEDRIVE_GID=$(id -g)" local-onedrive:latest --dry-run --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose 
+ : 1000
+ : 1000
++ getent group 1000
+ odgroup=
+ odgroup=onedrive
+ groupadd onedrive -g 1000
++ getent passwd 1000
+ oduser=
+ oduser=onedrive
+ useradd -m onedrive -u 1000 -g 1000
+ chown onedrive:onedrive /onedrive/ /onedrive/conf
+ ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 10 -gt 0 ']'
+ ARGS=("${@}")
+ exec gosu onedrive /usr/local/bin/onedrive --dry-run --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose
Using 'user' Config Dir: /onedrive/conf
Using 'system' Config Dir: 
No user or system config file found, using application defaults
DRY-RUN Configured. Output below shows what 'would' have occurred.
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /onedrive/data
Application version: v2.4.13-3-g398e790
Account Type: personal
Default Drive ID: f993e581423ec894
Default Root ID: F993E581423EC894!101
Remaining Free Space: 784889219809
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from this selected path: games/quake/darkplaces-engine/source/dpdefs
Syncing changes from selected local path only - NOT syncing data changes from OneDrive ...
Uploading differences of games/quake/darkplaces-engine/source/dpdefs
Uploading new items of games/quake/darkplaces-engine/source/dpdefs
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source/dpdefs
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source/dpdefs
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake
The parent for this path is in the local database - adding requested path (games/quake) to database
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc
@abraunegg
Copy link
Owner

abraunegg commented Jul 19, 2021

@plouj
Thanks for all the details.

OK - a couple of things - by default, when running as a Docker container, --single-directory is not supported for that mode of operation, however, you appear to be invoking the container with that command, which, by rights, then just limit the application to this location. This could be a contributing factor to what is going on, but I am not confident this is root cause.

The second issue is (and this is probably a compiler / Docker container item here) - is that, for whatever reason, the application is deciding to generate a fake OneDrive API response for the parent folder, thus, as this data is nonsensical, and only makes sense if --dry-run is used, is why potentially the next issue is occurring - but you are not using --dry-run thus the fake response should never be generated ....

The next issue appears to stem from the client 'thinking' that the upload location is a 'shared folder' ... but this is because the 'parent' is not known (see above) ... so just to confirm this thinking - can you confirm that the upload location for this data is or is not a OneDrive Personal Shared Folder? I suspect that it is not.

This will help with trying to unpick what is going on here.

Built from scratch in Docker with docker build . -t local-onedrive -f contrib/docker/Dockerfile

Currently the Docker image is built with 2.092.1 - and should be updated.

I think for the first port of call here, given the oddity of this issue, is to get the Dockerfiles updated and have you rebuild your Docker Container from a PR, that is using the updated compiler.

If you are then still seeing an issue, then dig deeper into the code.

@abraunegg
Copy link
Owner

@plouj

Please can you test the following PR:

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/1583/head:pr1583
git checkout pr1583

Once your local 'onedrive' git repository is created, you will need to rebuild your Docker container as per your current process:

docker build . -t local-onedrive -f contrib/docker/Dockerfile

When running the updated Docker container, your version of the client should be onedrive v2.4.13-4-gb78b6a8 - but more importantly, when the container is being built, it should reference checking version of D compiler... 2.097.0

If you can test & provide feedback that would be greatly appreciated.

@plouj
Copy link
Author

plouj commented Jul 19, 2021

Thank you for such a quick response!

Saw this during the new build:

Step 7/10 : RUN ./configure &&     make clean &&     make &&     make install
 ---> Running in 4cd7bc490e78
checking for a BSD-compatible install... /usr/bin/install -c
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for dmd... dmd
checking version of D compiler... 2.097.0

but you are not using --dry-run this the fake response should never be generated ....

I actually did have --dry-run in my command line by accident, a leftover from previous testing.

can you confirm that the upload location for this data is or is not a OneDrive Personal Shared Folder? I suspect that it is not.

I don't think it's a shared folder, but I honestly don't know and I don't know how to check. I've created this folder (games/) very recently and I didn't share it with anyone.

With the newer compiler, using --dry-run (for completeness) I still get the 400 errors:

$ docker run --rm -ti -v $HOME/.config/onedrive/:/onedrive/conf -v "/var/tmp/remote/:/onedrive/data/:ro" -e "ONEDRIVE_UID=$(id -u)" -e "ONEDRIVE_GID=$(id -g)" local-onedrive:latest --dry-run --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose 
+ : 1000
+ : 1000
++ getent group 1000
+ odgroup=
+ odgroup=onedrive
+ groupadd onedrive -g 1000
++ getent passwd 1000
+ oduser=
+ oduser=onedrive
+ useradd -m onedrive -u 1000 -g 1000
+ chown onedrive:onedrive /onedrive/ /onedrive/conf
+ ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 10 -gt 0 ']'
+ ARGS=("${@}")
+ exec gosu onedrive /usr/local/bin/onedrive --dry-run --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose
Using 'user' Config Dir: /onedrive/conf
Using 'system' Config Dir: 
No user or system config file found, using application defaults
DRY-RUN Configured. Output below shows what 'would' have occurred.
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /onedrive/data
Application version: v2.4.13-4-gb78b6a8
Account Type: personal
Default Drive ID: f993e581423ec894
Default Root ID: F993E581423EC894!101
Remaining Free Space: 784889219809
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from this selected path: games/quake/darkplaces-engine/source/dpdefs
Syncing changes from selected local path only - NOT syncing data changes from OneDrive ...
Uploading differences of games/quake/darkplaces-engine/source/dpdefs
Uploading new items of games/quake/darkplaces-engine/source/dpdefs
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source/dpdefs
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source/dpdefs
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine
The parent for this path is in the local database - adding requested path (games/quake/darkplaces-engine) to database
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping uploading this new file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc
Skipping item - OneDrive returned a 'HTTP 400 - Bad Request' when attempting to query if file exists
ERROR: To resolve, rename this local file: /onedrive/data/games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc

Without --dry-run I don't see the 400 errors, but it appears to still refuse to upload my files:

$ docker run --rm -ti -v $HOME/.config/onedrive/:/onedrive/conf -v "/var/tmp/remote/:/onedrive/data/:ro" -e "ONEDRIVE_UID=$(id -u)" -e "ONEDRIVE_GID=$(id -g)" local-onedrive:latest --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose 
+ : 1000
+ : 1000
++ getent group 1000
+ odgroup=
+ odgroup=onedrive
+ groupadd onedrive -g 1000
++ getent passwd 1000
+ oduser=
+ oduser=onedrive
+ useradd -m onedrive -u 1000 -g 1000
+ chown onedrive:onedrive /onedrive/ /onedrive/conf
+ ARGS=(--monitor --confdir /onedrive/conf --syncdir /onedrive/data)
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 0 == 1 ']'
+ '[' 9 -gt 0 ']'
+ ARGS=("${@}")
+ exec gosu onedrive /usr/local/bin/onedrive --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --verbose
Using 'user' Config Dir: /onedrive/conf
Using 'system' Config Dir: 
No user or system config file found, using application defaults
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /onedrive/data
Application version: v2.4.13-4-gb78b6a8
Account Type: personal
Default Drive ID: f993e581423ec894
Default Root ID: F993E581423EC894!101
Remaining Free Space: 784889219809
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from this selected path: games/quake/darkplaces-engine/source/dpdefs
Syncing changes from selected local path only - NOT syncing data changes from OneDrive ...
Uploading differences of games/quake/darkplaces-engine/source/dpdefs
Uploading new items of games/quake/darkplaces-engine/source/dpdefs
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source/dpdefs
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source/dpdefs
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine
The parent for this path is in the local database - adding requested path (games/quake/darkplaces-engine) to database
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc

However, if I shorten --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs down to just --synchronize --single-directory games/ then it seems to work (so far).

Perhaps I'm just not using this tool as intended.

@abraunegg
Copy link
Owner

@plouj
OK ... a couple of things here:

  1. If you are using --dry-run .. then the 400 error are probably going to be normal.
  2. The 400 errors when not using --dry-run is abnormal
  3. That --synchronize --single-directory games/ works and that --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs does not work points to a potential issue.

Please can you generate a new verbose debug log (last time you also used --debug-https ... no need for that) - just --verbose --verbose when using the updated client / Docker container (and make sure no --dry-run)

This will give an updated debug log file, ensuring that all the data should be in the correct places .. and give a clearer picture as to what is going on.

I don't think it's a shared folder, but I honestly don't know and I don't know how to check.

The only way to do this is via logging into OneDrive online via a browser, and looking at all of the folders.

Once you send the updated debug log, I can add in more logging output to hone in whats happening.

@plouj
Copy link
Author

plouj commented Jul 19, 2021

If you are using --dry-run .. then the 400 error are probably going to be normal.

I think that's what confused me.

This time, after running --synchronize --single-directory games/ for a while (and stopping it before it completed), I was able to successfully run --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs as well:

+ exec gosu onedrive /usr/local/bin/onedrive --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --no-remote-delete --verbose
Using 'user' Config Dir: /onedrive/conf
Using 'system' Config Dir: 
No user or system config file found, using application defaults
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Opening the item database ...
All operations will be performed in: /onedrive/data
Application version: v2.4.13-4-gb78b6a8
Account Type: personal
Default Drive ID: f993e581423ec894
Default Root ID: F993E581423EC894!101
Remaining Free Space: 784889219809
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing the Synchronization Engine ...
Syncing changes from this selected path: games/quake/darkplaces-engine/source/dpdefs
Syncing changes from selected local path only - NOT syncing data changes from OneDrive ...
Uploading differences of games/quake/darkplaces-engine/source/dpdefs
Processing games/quake/darkplaces-engine/source/dpdefs
The directory has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/README.txt
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
The file has not changed
Processing games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc
The file has not changed
Uploading new items of games/quake/darkplaces-engine/source/dpdefs

Perhaps because now the needed folders are in the local dabatase?

If I clear the local database (re-create all of /onedrive/conf) it doesn't work again:

+ exec gosu onedrive /usr/local/bin/onedrive --confdir /onedrive/conf --syncdir /onedrive/data --synchronize --single-directory games/quake/darkplaces-engine/source/dpdefs --upload-only --no-remote-delete --verbose
Using 'user' Config Dir: /onedrive/conf
Using 'system' Config Dir: 
No user or system config file found, using application defaults
Initializing the OneDrive API ...
Configuring Global Azure AD Endpoints
Authorize this app visiting:

****

Enter the response uri: ****
Opening the item database ...
All operations will be performed in: /onedrive/data
Application version: v2.4.13-4-gb78b6a8
Account Type: personal
Default Drive ID: f993e581423ec894
Default Root ID: F993E581423EC894!101
Remaining Free Space: 784889219809
Fetching details for OneDrive Root
OneDrive Root does not exist in the database. We need to add it.
Added OneDrive Root to the local database
Initializing the Synchronization Engine ...
Syncing changes from this selected path: games/quake/darkplaces-engine/source/dpdefs
Syncing changes from selected local path only - NOT syncing data changes from OneDrive ...
Uploading differences of games/quake/darkplaces-engine/source/dpdefs
Uploading new items of games/quake/darkplaces-engine/source/dpdefs
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source/dpdefs
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source/dpdefs
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine/source
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine/source
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake/darkplaces-engine
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake/darkplaces-engine
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games/quake
The requested directory to create was found on OneDrive - skipping creating the directory: games/quake
The parent for this path is not in the local database - need to add parent to local database
OneDrive Client requested to create remote path: games
The requested directory to create was found on OneDrive - skipping creating the directory: games
The parent for this path is in the local database - adding requested path (games) to database
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/dpextensions.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/source_compare.pl
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/menudefs.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/source_compare.txt
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/README.txt
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/csprogsdefs.qc
Skipping uploading this new file as parent path is not in the database: games/quake/darkplaces-engine/source/dpdefs/progsdefs.qc

Does this mean the folder is not shared?
gamesnotshared

@abraunegg
Copy link
Owner

@plouj
re the graphic - the 'games folder' is not shared, newly created ... but what about any of the sub folders ... I am going to assume for the moment no they are not shared.

If I clear the local database (re-create all of /onedrive/conf) it doesn't work again:

OK .. then this is a bug ...

If you can provide a full debug output that would be great.

I will also try and replicate the issue locally in the meantime.

@abraunegg abraunegg added Bug Something isn't working Unable to reproduce labels Jul 19, 2021
@abraunegg
Copy link
Owner

abraunegg commented Jul 19, 2021

@plouj
Tested locally and unable to reproduce with a path of 'games/quake/darkplaces-engine/source/dpdefs' being entirely local, not shared.

Will have to update the PR to generate more debug output to analyse what is going on.

Edit: Running again, error is displayed ..... able to reproduce now.

@abraunegg
Copy link
Owner

abraunegg commented Jul 19, 2021

@plouj
Please can you test the updated PR.

When running the updated client / Docker container, the client version should be: onedrive v2.4.13-8-g9b5ad13 or greater.

@abraunegg abraunegg changed the title Can't upload any files Can't upload any files when using a nested path with --single-directory if folders already exist on OneDrive Jul 19, 2021
@abraunegg abraunegg added this to the v2.4.14 milestone Jul 19, 2021
@plouj
Copy link
Author

plouj commented Jul 20, 2021

@plouj
Please can you test the updated PR.

When running the updated client / Docker container, the client version should be: onedrive v2.4.13-8-g9b5ad13 or greater.

Looks like you fixed it as I don't get 400 errors with --dry-run and I can successfully upload nested sub-directories with --single-directory in this version!

@abraunegg
Copy link
Owner

@plouj
Thanks for the confirmation. Will mark this as fixed and merge this into 'master'

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed
Projects
None yet
2 participants