Mono update breaks OneDrive v2

I just upgraded to Mono 6.0.0 Stable (6.0.0.313) on ubuntu 18. This breaks (at least) the OneDrive v2 interface. The error message is:

“Only ‘http’ and ‘https’ schemes are allowed”

Downgrading to 5.20 solves the problem at the moment.

Same here. OneDrive v2. The Docker container (linuxserver) updated the mono packages to 6.0.0.313.

Failed: Only 'http' and 'https' schemes are allowed.

Parameter name: requestUri

Details: System.ArgumentException: Only 'http' and 'https' schemes are allowed.

Parameter name: requestUri

  at Duplicati.Library.Main.BackendManager.List () [0x00049] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  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 <e2da9713f0974e76879d9f9aa7ce0e36>:0

  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 <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) [0x0010d] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x01031] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at CoCoL.ChannelExtensions.WaitForTaskOrThrow (System.Threading.Tasks.Task task) [0x00050] in <6973ce2780de4b28aaa2c5ffc59993b1>:0

  at Duplicati.Library.Main.Operation.BackupHandler.Run (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x00008] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Controller+<>c__DisplayClass13_0.<Backup>b__0 (Duplicati.Library.Main.BackupResults result) [0x00035] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Controller.RunAction[T] (T result, System.String[]& paths, Duplicati.Library.Utility.IFilter& filter, System.Action`1[T] method) [0x0011d] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

 

Log data:

2019-07-26 17:39:42 +02 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error

System.ArgumentException: Only 'http' and 'https' schemes are allowed.

Parameter name: requestUri

  at Duplicati.Library.Main.BackendManager.List () [0x00049] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  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 <e2da9713f0974e76879d9f9aa7ce0e36>:0

  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 <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Operation.BackupHandler.PreBackupVerify (Duplicati.Library.Main.BackendManager backend, System.String protectedfile) [0x0010d] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

  at Duplicati.Library.Main.Operation.BackupHandler.RunAsync (System.String[] sources, Duplicati.Library.Utility.IFilter filter) [0x004fa] in <e2da9713f0974e76879d9f9aa7ce0e36>:0

Same here, " "Error

Failed to connect: Only ‘http’ and ‘https’ schemes are allowed. Parameter name: requestUri" "

Here Mono 6 fails too

I am experiencing the same issue with Mono 6 and OneDrive

It appears that we have some compatibility issues with mono 6. What versions of duplicati are you using?

I tried it with 2.0.4.23 and 2.0.4.5 (and maybe 2.0.4.22, too)

Same issue here with linuxserver.io docker image.
Duplicati version: Duplicati - 2.0.4.23_beta_2019-07-14
Docker image: Linuxserver.io version:- v2.0.4.23-2.0.4.23_beta_2019-07-14-ls28 Build-date:- 2019-07-26T10:47:18+00:00

Same issue here with the latest linuxserver.io docker image.
Duplicati Build: 2.0.4.23_beta_2019-07-14

yep. updated to fix the box.com issue and not get that error for onedrivev2:

image

and the in the log:

  • Aug 3, 2019 11:22 AM: Failed while executing “Backup” with id: 2

  • Aug 3, 2019 11:20 AM: Failed while executing “Backup” with id: 2

  • Aug 2, 2019 3:00 AM: Failed while executing “Backup” with id: 2

am running:

Duplicati - 2.0.4.23_beta_2019-07-14

Mono JIT compiler version 6.0.0.313 (tarball Sun Jul 14 09:57:59 UTC 2019)

I can replicate this too unfortunately.

The OneDrive backend is the only one that uses a different HTTP client, which may explain why it only affects OneDrive users. Unfortunately, I don’t have mono 6 yet to test, but there’s a slight chance that it’s a regression in mono:

If you’re willing to risk a machine (a VM might be good for test) it “looks” like it’s at mono-project.com

The latest Stable Mono release is: 6.0.0 Stable (6.0.0.313)
The latest Preview Mono release is: 6.4.0 Preview (6.4.0.150)

My Linux Mint Update Manager is offering image

but because I don’t see Ubuntu offering it, I suspect it’s because I once used the mono directions, and added the mono-project repo to my apt sources, per the OS-specific directions on the download page.

Possibly less risky would be to stay on whatever 6.0.0 Stable is at, but ask mono to change URI handling:

export MONO_URI_DOTNETRELATIVEORABSOLUTE=true

then start Duplicati via the duplicati script or whatever you run…

After confirming 6.0.0.319 fails on Destination “Test connection”, I set the variable. Backup/restore works.

This suggestion worked for me as well :+1: :+1:

I am on mono 6.0.0.319 / Duplicati 2.0.4.23_beta_2019-07-14 / Linux Mint 19.2

1 Like

As a side issue, Linux Mint Releases shows their only releases are LTS releases, based on Ubuntu LTS. Other distros such as KDE neon take the same approach of building on a stable base, but stability leads sometimes into difficulty of change e.g. to a newer mono version either by distro or bypass-distro efforts.

For any who were hit by this problem, did the new mono come from your distro’s default repos, or did the https://www.mono-project.com/download/stable/#download-lin addition of mono project’s repo lead you?

This ties into a question of how current the mono on an LTS distro will be, in case Duplicati needs newer.

Survey for Linux users, which version of Mono do you have installed?

The workaround does not work for me on Debian 9 / Mono 6.0.0.319 / Duplicati 2.0.4.23_beta_2019-07-14

I have confirmed that the variable reads back true:
printenv MONO_URI_DOTNETRELATIVEORABSOLUTE
true

I have also tried restarting the duplicati service.

The essential question is – does it read back true for mono? You can probably check that with ps:

Output Modifiers
e Show the environment after the command.

The rest of the job is finding Duplicati which will find its mono, e.g. ps -ef e | grep duplicati

How to set environment variable in systemd service?

I’m not a systemd expert. If nothing from above works, there are other systemd references around.
Perhaps you could also try setting the variable globally, but systemd still has to let it go into service.

The essential question is – does it read back true for mono?

I assumed that if I export it as root and duplicati runs as root it would be the same but I don’t know much about environment variable scope.

How to set environment variable in systemd service?

Thanks, I used systemctl edit duplicati.service to set the environment variable there as

[Service]
Environment="MONO_URI_DOTNETRELATIVEORABSOLUTE=true"

and it works. I guess this is perfect workaround for now since it is persistent and should not impact anything but duplicati.

They inherit from parent to child (repeat and repeat) unless steps are taken to stop that, so your setting would affect Duplicati and any scripts that it runs (which might not be relevant at all unless you do that).

OTOH anything else that uses the new mono won’t get it, but based on the scarcity of reports to mono, perhaps little else is affected. I do hope they change the default. They seem to for their own test code…