Encrypting on OnDrive has pathIsTooLong Error

You can use the obfuscated file name mode which is less secure but much shorter.