Dropbox: Error reading JObject from JsonReader. Path '', line 0, position 0

Hi guys,

I’m using Duplicati in a docker (https://hub.docker.com/r/linuxserver/duplicati/) which allowed me to backup to dropbox for a while. 16-06 it stopped working all of a sudden. The host is Ubuntu 17.10. I’m getting this error:

Error reading JObject from JsonReader. Path '', line 0, position 0.

Full stacktrace:
Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x00026] in <dc86da7fc46c487ba6c7ab826da479cc>:0
at Newtonsoft.Json.Linq.JObject.Parse (System.String json, Newtonsoft.Json.Linq.JsonLoadSettings settings) [0x0000c] in <dc86da7fc46c487ba6c7ab826da479cc>:0
at Newtonsoft.Json.Linq.JObject.Parse (System.String json) [0x00000] in <dc86da7fc46c487ba6c7ab826da479cc>:0
at Duplicati.Library.Backend.DropboxHelper.handleDropboxException (System.Exception ex, System.Boolean filerequest) [0x000db] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Library.Backend.DropboxHelper.ListFiles (System.String path) [0x0002b] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Library.Backend.Dropbox.<List>b__14_0 () [0x00000] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Library.Backend.Dropbox.HandleListExceptions[T] (System.Func`1[TResult] func) [0x00000] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Library.Backend.Dropbox+<List>d__14.MoveNext () [0x00040] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Library.Interface.BackendExtensions.TestList (Duplicati.Library.Interface.IBackend backend) [0x00017] in <b7a5128865b14f37a66544de6a7ae6fb>:0
at Duplicati.Library.Backend.Dropbox.Test () [0x00000] in <5574f031befb42a98fe12b07aec6b39b>:0
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x000b7] in <670b0e4a9ae144208688fcb192d20146>:0
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) [0x00091] in <670b0e4a9ae144208688fcb192d20146>:0
at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) [0x0026e] in <670b0e4a9ae144208688fcb192d20146>:100: 

Some help would be appreciated! Apart from the stacktrace, the logging does not show anything else.

PS. I’m getting this on multiple different environments.

EDIT 1: I do not have any restrictions on my network. All outgoing ports etc are open & without proxies.

+1. Same problem with Dropbox.

Hi @RobHofmann & @zlatovlas, welcome to the forum!

The JSON error you’re seeing seems to be related to something specific to the Dropbox API (maybe they changed something?) and is likely not related to your network, ports, or even that you’re running in Docker.

@zlatovlas - are you also running in Docker and did you have a working job that suddenly stopped working?

(By the way, @RobHofmann I edited your post by adding “~~~” before and after the error message to make it easier to read. Oh - and I manually changed the &gt and &lt into < and > symbols.)

no, I am running Windows app. The current canary works flawlessly in this aspect.

Thanks - that helps support the theory that it has nothing to do with source OS or being run in a Docker container. :+1:

I went ahead and created a new (tiny 2 file) backup to Dropbox using 2.0.3.9 canary and it ran just fine on Windows 10. Of course you two seem to be having issues with established backups so it’s not the best test… Though a 2nd run with added source files also run OK.

Can either of you tell if the error happens near the start or end of the backup?

Also, I realize this is unlikely but is it possible you’re hitting the daily bandwidth cap (which I think is 20G)?

It happens right at the start. You click the button for “Backup” and you get the error right away.

I also tried setting up a new docker with clean configuration. Same story unfortunately!

couple of remarks:

  1. it happens right at the start,
  2. quota nor bandwidth cap is the problem as the backup is rather small (1-2GB), while the quote is like 10GB and lots of free space,
  3. happened with latest beta. Latest canary works well even without the need to recreate the backup config.

Hope this helps.

Thanks for the details from both of you - and sorry for the delay in responding.

Does the error go away if you set --no-backend-verification=true? Note that this is just for testing, it’s not a fix…

--no-backend-verification
If this flag is set, the local database is not compared to the remote filelist on startup. The intended usage for this option is to work correctly in cases where the filelisting is broken or unavailable.
Default value: “false”

When I add this flag i get this error in my message log:

Failed to erase file duplicati-be1f14b96313b40d4b0d63ab54bea8449.dblock.zip.aes, treating as deleted: Error reading JObject from JsonReader. Path '', line 0, position 0.
Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
  at Duplicati.Library.Main.BackendManager.Delete (System.String remotename, System.Int64 size, System.Boolean synchronous) [0x0000a] in <ae134c5a9abb455eb7f06c134d211773>:0 
  at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyLocalList (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, Duplicati.Library.Main.IBackendWriter log) [0x00072] in <ae134c5a9abb455eb7f06c134d211773>:0

EDIT: Added another full stacktrace:

{
   "ClassName":"Newtonsoft.Json.JsonReaderException",
   "Message":"Error reading JObject from JsonReader. Path '', line 0, position 0.",
   "Data":null,
   "InnerException":null,
   "HelpURL":null,
   "StackTraceString":" at Duplicati.Library.Main.BackendManager.List () [0x00049] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Operation.FilelistProcessor.RemoteListAnalysis (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, Duplicati.Library.Main.IBackendWriter log, System.String protectedfile) [0x0000d] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Operation.FilelistProcessor.VerifyRemoteList (Duplicati.Library.Main.BackendManager backend, Duplicati.Library.Main.Options options, Duplicati.Library.Main.Database.LocalDatabase database, Duplicati.Library.Main.IBackendWriter log, System.String protectedfile) [0x00000] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) [0x000fd] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x008e0] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Controller+&lt;&gt;c__DisplayClass17_0.&lt;Backup&gt;b__0 (Duplicati.Library.Main.BackupResults result) [0x00036] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]&amp; paths, Duplicati.Library.Utility.IFilter&amp; filter, System.Action`1[T] method) [0x0014b] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Library.Main.Controller.Backup (System.String[] inputsources, Duplicati.Library.Utility.IFilter filter) [0x00068] in &lt;ae134c5a9abb455eb7f06c134d211773&gt;:0 \n at Duplicati.Server.Runner.Run (Duplicati.Server.Runner+IRunnerData data, System.Boolean fromQueue) [0x00494] in &lt;670b0e4a9ae144208688fcb192d20146&gt;:0 ",
   "RemoteStackTraceString":null,
   "RemoteStackIndex":0,
   "ExceptionMethod":null,
   "HResult":-2146233088,
   "Source":"Duplicati.Library.Main"
}

I also recreated the backup (deleting everything). Still the same issue.

Again, sorry for the delay - real life keeps butting in.

Unfortunately, I don’t know where to go with this one. Usually JsonReader errors are related to a communications issue with the destination provider.

If the issue is still happening for you, would you consider updating to the recently released 2.0.3.11 canary version? So far this version seems stable and has resolved a number of outstanding issues while keeping performance at 2.0.3.3 beta levels.

I don’t know why it is not working any more, there has not been any changes to the Dropbox backend for at least a year.

The error message indicates that Dropbox sends a response, but it is not in valid JSON format as expected, which gives the error.

Since the traffic is sent over SSL you cannot simply sniff it to see what actual response you get. Instead, you need to make a configuration file:
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-configure-network-tracing

Simply save the xml document from that link, and name the file the same as the executable you are using, and add .config (i.e. commandline would use Duplicati.CommandLine.exe.config and TrayIcon would be Duplicati.GUI.TrayIcon.exe.config). Then restart (if using web-ui) and try the request. You should get a file called network.log which contains all the data sent and received.

Important: Don’t post the file anywhere as it contains your OAuth login token!

In that trace file you should be able to see what the Dropbox server respons, and that should give a clue as to what the problem is.

1 Like

I was about to ask if a router or firewall might be munging the response, but I guess since it’s SSL that’s pretty unlikely.

That being said, if one of your environments where you get this is portable then it might be worth a quick check to see it it works outside of your regular network.

That could at least rule out your local networking as a a culprit. Note that I doubt it will make a difference, but I’m trying to leave no stone unturned.

Seeing “line 0, position 0” makes me wonder if Duplicati detects and errors specially if it gets nothing at all, or if this is what it says. Though symptoms were different, this was thought to be from Docker network changes.

@zlatovlas is reporting that Windows Beta fails, but Canary works. I’m not sure what @RobHofmann runs, but there’s been a wish for a newer Beta, and the recent 2.0.3.11 seems to be pushing closer than before…

For issues that look like they might be connection-related, using the “Test connection” button is a purer test.

Dropbox has Windows and Linux clients, although possibly you don’t want the disk/network/risk add it brings.

Hi I’m running a docker image provided by https://hub.docker.com/r/linuxserver/duplicati/

The “Test Connection” button gives me exactly the same error. Im on version 2.0.3.3_beta_2018-04-02 (which is the latest version provided by linuxserver/duplicati.

Alright. This was an error on my side. When testing the functionality with the “Test Connection” button and getting an error there made me think. Recently I bought a new gateway in which i did some configuration (read: blocked some devices which were unknown to me). I unintentionally blocked the docker containers MAC address. So in short: no connection possible to the outside world from Duplicati.

I removed the block, and everything is working like before.

Sorry for the inconvenience guys! And a lot of thanks for thinking along with me! It’s appreciated!

TLDR; it was my mistake :frowning: