GithubHelp home page GithubHelp logo

Comments (3)

abraunegg avatar abraunegg commented on May 26, 2024 1

@diegoortizmatajira
Whilst these look at the surface these look OK, the item that is potentially tripping you up is 'Leading and trailing spaces in file or folder names also aren't allowed.'

The client conforms to the URL details you have listed, so potentially it will be either trailing 'whitespace' or the trailing '.' in the items being skipped, for example:

/Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC.

Now .. trailing '.' is not listed in the URL (I do not know why) - but if any directory that has a trailing '.' that causes a bad query through the Microsoft OneDrive API - for example (after I modify the code to not check for trailing '.'), when trying to create the directory online:

Scanning the local file system '~/OneDrive' for new data to upload
Skipping item - excluded by sync_list config: ./random_25k_files
OneDrive Client requested to create this directory online: ./Apps
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps
Successfully created the remote directory ./Apps on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack
Successfully created the remote directory ./Apps/ComicTrack on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content
Successfully created the remote directory ./Apps/ComicTrack/content on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries
Successfully created the remote directory ./Apps/ComicTrack/content/libraries on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries/DC
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries/DC
Successfully created the remote directory ./Apps/ComicTrack/content/libraries/DC on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC.
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC.
OneDrive generated an error when creating this path: ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC.

ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 400 (Bad Request)
  Error Reason:     Invalid request
  Error Code:       invalidRequest
  Error Timestamp:  2024-03-23T20:52:31
  API Request ID:   a90b9804-63cc-456a-a258-6743099df28b
  Calling Function: createDirectoryOnline()

The path 'Convergence Infinity INC.' cannot be created - so in essence this is either an API bug or a documentation bug (most likely an API bug at this point).

So if I attempt to now create the missing folder 'Convergence Infinity INC.' online , this cannot be created online:

image

So ... this is not an API bug, but a Microsoft documentation bug where the documentation is missing that files or folders, with a trailing '.' cannot be created.

Essentially - the client is operating correctly - your directory names are invalid for Microsoft OneDrive via online or via the Graph API .. sorry.

Closing this issue as this is not a bug or problem with the client. To resolve, you will need to rename your folders - sorry.

from onedrive.

abraunegg avatar abraunegg commented on May 26, 2024

@diegoortizmatajira
Further to this, the v2.5.0-rc1 documentation has been updated to ensure clarity on this aspect:

https://github.com/abraunegg/onedrive/blob/onedrive-v2.5.0-release-candidate-1/docs/usage.md#guidelines-for-local-file-and-folder-naming-in-the-synchronisation-directory

Specifically, in v2.5.0 and above, complete checking for UTF-16 characters is also done (a gap in v2.4.x) - thus, a potential solution for you might be to replace your trailing . with the UTF-16 One Dot Leader character (U+2024).

On Linux this would look like the following:

[alex@onedrive-client-dev OneDrive]$ mkdir -p "Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․"
[alex@onedrive-client-dev OneDrive]$ ls -la Apps/ComicTrack/content/libraries/DC/
total 0
drwxrwxr-x. 3 alex alex 41 Mar 24 19:40  .
drwxrwxr-x. 3 alex alex 16 Mar 24 19:40  ..
drwxrwxr-x. 2 alex alex  6 Mar 24 19:40 'Convergence Infinity INC․'
[alex@onedrive-client-dev OneDrive]$ 

To 'Windows' this looks like the following:
image

To the 'onedrive' client (v2.5.x) this looks like the following:

...
OneDrive Client requested to create this directory online: ./Apps
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps
Successfully created the remote directory ./Apps on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack
Successfully created the remote directory ./Apps/ComicTrack on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content
Successfully created the remote directory ./Apps/ComicTrack/content on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries
Successfully created the remote directory ./Apps/ComicTrack/content/libraries on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries/DC
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries/DC
Successfully created the remote directory ./Apps/ComicTrack/content/libraries/DC on Microsoft OneDrive
OneDrive Client requested to create this directory online: ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․
The requested directory to create was not found on OneDrive - creating remote directory: ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․
Successfully created the remote directory ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․ on Microsoft OneDrive
Performing a last examination of the most recent online data within Microsoft OneDrive to complete the reconciliation process
Fetching /delta response from the OneDrive API for Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
...

Online, this looks like the following:
image

With zero issue uploading data via a browser to the folder terminating in the UTF-16 character:

image

Or downloading that file using the v2.5.0-rc1 client:

...
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 8
Finished processing /delta JSON response from the OneDrive API
Processing 7 applicable changes and items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state
Number of items to download from OneDrive: 1
Downloading file: Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․/dummy_file.docx ... done
Syncing this OneDrive Business Shared Folder: my_shared_folder
Fetching /delta response from the OneDrive API for Drive ID: b!BhWyqa7K_kqXqHtSIlsqjR5iJogxpWxDradnpVGTU2VxBOJh82Y6S4he4rdnGPBT
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 0
...

Or uploading new local content from Linux -> online:

...
The file has not changed
Scanning the local file system '~/OneDrive' for new data to upload
Skipping item - excluded by sync_list config: ./random_25k_files
New items to upload to OneDrive: 1
Total New Data to Upload:        21 Bytes
Uploading new file ./Apps/ComicTrack/content/libraries/DC/Convergence Infinity INC․/new_local_file.txt ... done.
Performing a last examination of the most recent online data within Microsoft OneDrive to complete the reconciliation process
...

Actions for you:

  1. Upgrade your client to use v2.5.0-rc1
  2. Fix all your folders that have trailing white space characters
  3. Change all your folders that end in a fullstop/period character to use the UTF-16 One Dot Leader character (U+2024)

from onedrive.

abraunegg avatar abraunegg commented on May 26, 2024

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.

from onedrive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.