The requested folder does not exist with box.com

Hello,

Attempting to backup ~134G to Box provider (/Backups/Library) and receiving this warning client side after about 20G worth of files/folders were already sent:

Failed to create folder: The requested folder does not exist
System.Exception: 400 - item_name_invalid: Item name invalid
   at Duplicati.Library.Backend.Box.BoxBackend.BoxHelper.ParseException(Exception ex)
   at Duplicati.Library.JSONWebHelper.GetResponse(AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.JSONWebHelper.ReadJSONResponse[T](AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.Backend.Box.BoxBackend.GetCurrentFolder(Boolean create)
   at Duplicati.Library.Main.BackendManager.ThreadRun()

After 5 out of 5 attempts, Duplicati gives up with a fatal error:

Fatal error
Duplicati.Library.Interface.FolderMissingException: The requested folder does not exist
   at Duplicati.Library.Main.BackendManager.List()
   at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
   at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
   at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)

AFAIK, nothing is changing in the source directory during backup, not even metadata. I’ve seen a suggestion that I try using the webdav api to Box. Would that be a decent (temporary) solution?

Thanks in advance for your advice. Please let me know what other info I can provide to help.

Thanks,
Marc

Really? Nobody knows what’s going on here?

Hello @hallmarc, welcome to the forum!

Have a little patience - all the people helping out with issues here are volunteers and most likely have real lives (and jobs) that need tending to. :slight_smile:

A few things I’d suggesting starting with include:

  1. what version of Duplicati are you using?
  2. what client OS are you running it on?
  3. is your internet connection usually reliable or does it frequently drop or get slow?
  4. did you try the WebDAV suggestion you found?
  5. if you look at the “Show log …” job menu then select the “Remote” button what do you see listed around the time of the error (note that clicking on the bullet point log entry will expand it to show any details that might be available)?

Apologies JonMikeIV, I jumped the gun because I just found Duplicati and it does almost the exact same thing as StableBit CloudDrive in many ways, which is too unreliable for regular use. I was excited then disappointed in the space of a half hour! Also, uncharacteristic of me not to include all the info you mentioned.

So:

Duplicati 2.0.2.19_canary_2018-02-12 on Windows 10.

Internet connection is mostly reliable and stable though very occasionally my Netgear R7000 inexplicably slows down. It hasn’t happened recently.

I did not yet try the WebDAV suggestion.

There are no details or errors in the Remote log beyond PUT operations

I’ve discovered a bunch more log messages in the Duplicati Server log “tab”:

Feb 27, 2018 12:33 AM: Failed while executing "Backup" with id: 2
Feb 26, 2018 10:19 PM: Request for http://localhost:8200/api/v1/remoteoperation/create gave error
Feb 26, 2018 10:19 PM: Reporting error gave error
Feb 26, 2018 10:19 PM: Failed while executing "Backup" with id: 2
Feb 26, 2018 10:10 PM: Failed while executing "Backup" with id: 1
Feb 26, 2018 10:10 PM: Error in worker
Feb 26, 2018 9:54 PM: Request for http://localhost:8200/api/v1/remoteoperation/create gave error
Feb 26, 2018 9:54 PM: Reporting error gave error
Feb 26, 2018 9:52 PM: Request for http://localhost:8200/api/v1/remoteoperation/create gave error
Feb 26, 2018 9:52 PM: Reporting error gave error
Feb 26, 2018 9:52 PM: Request for http://localhost:8200/api/v1/remoteoperation/create gave error
Feb 26, 2018 9:52 PM: Reporting error gave error

Here is the detail for the “Error in worker” entry:

System.Threading.ThreadAbortException: Thread was being aborted.
   at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)
   at Duplicati.Library.Utility.WorkerThread`1.Runner()

That’s new. Here is the detail for the “Failed while executing “Backup” with id: 1” entry:

System.Threading.ThreadAbortException: Thread was being aborted.
   at Duplicati.Library.Main.Operation.BackupHandler.HandleFilesystemEntry(ISnapshotService snapshot, BackendManager backend, String path, FileAttributes attributes)
   at Duplicati.Library.Main.Operation.BackupHandler.RunMainOperation(ISnapshotService snapshot, BackendManager backend)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass17_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)
   at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)

Here is the detail for the “Failed while executing “Backup” with id: 2” entry:

Duplicati.Library.Interface.FolderMissingException: The requested folder does not exist
   at Duplicati.Library.Main.BackendManager.List()
   at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
   at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList(BackendManager backend, Options options, LocalDatabase database, IBackendWriter log, String protectedfile)
   at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify(BackendManager backend, String protectedfile)
   at Duplicati.Library.Main.Operation.BackupHandler.Run(String[] sources, IFilter filter)
   at Duplicati.Library.Main.Controller.<>c__DisplayClass17_0.<Backup>b__0(BackupResults result)
   at Duplicati.Library.Main.Controller.RunAction[T](T result, String[]& paths, IFilter& filter, Action`1 method)
   at Duplicati.Library.Main.Controller.Backup(String[] inputsources, IFilter filter)
   at Duplicati.Server.Runner.Run(IRunnerData data, Boolean fromQueue)

and finally, the detail for the last entry of “create gave error”:

System.Exception: 400 - item_name_invalid: Item name invalid
   at Duplicati.Library.Backend.Box.BoxBackend.BoxHelper.ParseException(Exception ex)
   at Duplicati.Library.JSONWebHelper.GetResponse(AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.JSONWebHelper.ReadJSONResponse[T](AsyncHttpRequest req, Object requestdata)
   at Duplicati.Library.Backend.Box.BoxBackend.GetCurrentFolder(Boolean create)
   at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.CreateFolder(String uri, RequestInfo info)
   at Duplicati.Server.WebServer.RESTHandler.DoProcess(RequestInfo info, String method, String module, String key)

I will get back to you on webdav if I can make it work.

Regards,
Marc

Folks,

The WebDAV method seems to be working well. Let it run for 10+ hours overnight and no errors yet.

Is it still worth trying to figure out what’s going on with the Box API?

Thanks!

-Marc

Yeah - there 4 different logs, which can be confusing to people (but they really are for different parts of the application).

The “Thread was being aborted” message is usually caused by the user cancelling / aborting a backup. Particularly if the “Stop now” button is used instead of the “Stop after upload” button. It’s nothing to worry about.

Again, I suspect this is due to aborting the job with id “1”.

OK - so this seems to be happening as part of the “VerifyRemoteList” process. Were you perhaps getting this error at the END of the job run?

What I’m thinking is that Duplicati is uploading a file (might be find-able in the “Remote” log) to box.com then right away asking “hey, did you get that file I just sent you?”. Then box.com replies with the error “item_name_invalid” (perhaps because it hasn’t finished closing out the file Duplicati just sent) which Duplicati INCORRECTLY interprets as “folder does not exist” (which is kind of what @kenkendk was saying here):


Since you have the WebDAV version working (yay!) I completely understand if you’d prefer to leave things alone, but if you’d like to test something with the API you could try settting --backup-test-samples=0.

--backup-test-samples (default: 1)
After a backup is completed, some files are selected for verification on the remote backend. Use this option to change how many. If this value is set to 0 or the option --no-backend-verification is set, no remote files are verified

If your backup is very new you may have only one or two actual uploaded files in which case Duplicati may be asking do download the file that it JUST uploaded. If that request is happening too quickly for the backend, it could cause a scenario like I described above.

(Oh, and I hope you don’t mind but added “with box.com” to the topic title to make searches easier for others.)

Thanks!

I don’t think that option will help because as I mentioned, the backup never completed…it errored out after less than 1/6 of the data was transferred. Does Duplicati try to verify during the backup or only after?

-Marc

As far as I know, only after.

So we’re back to the “did you get the file I just sent” check. The “RemoteListAnalysis” process in the “folder does not exist” message is described as:

/// Helper method that verifies uploaded volumes and updates their state in the database.
/// Throws an error if there are issues with the remote storage

The only stuff I found from box.com about this error is:

But I don’t know what to do with that, so I guess for now sticking with the WebDAV method sounds like the best option.