# \[Solved\] Failed to connect: Only http or https scheme is allowed in 2.0.4.10\_canary\_2018-12-29

**URL:** https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020
**Category:** Support
**Created:** [January 16, 2019, 2:25pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020 "2019-01-16T14:25:25Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![tacioandrade](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tacioandrade/32/641_2.png) [@tacioandrade](https://forum.duplicati.com/u/tacioandrade)
#### Post date: [January 16, 2019, 2:25pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/1 "2019-01-16T14:25:25Z")

</div>

Good afternoon, I’m here again because of a problem I’m having with the 2.0.4.10\_canary\_2018-12-29 connecting with OneDrive.v2.  
Last week all my servers that use OneDrive stopped working, so by searching the forum I discovered that in order to get back to work it was necessary to change the server to OneDrive.v2, after making this change, on one of the servers I updated to 2.0 .4.10\_canary\_2018-12-29.  
After this update I was manually backing up my server and the following error is occurring: “Failed to connect: Only http or https scheme is allowed”

Would anyone have any idea of the cause? If I swap the server for Mega.nz or another works, only the OneDrive.v2 that is experiencing the error.

---

<div class="post-metadata">

### Author: ![tacioandrade](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tacioandrade/32/641_2.png) [@tacioandrade](https://forum.duplicati.com/u/tacioandrade)
#### Post date: [January 16, 2019, 11:16pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/2 "2019-01-16T23:16:23Z")

</div>

The log:

System.ArgumentException: Only http or https scheme is allowed  
at System.Net.Http.HttpRequestMessage.set\_RequestUri (System.Uri value) \<0x4051e060 + 0x0010b\> in :0  
at System.Net.Http.HttpRequestMessage…ctor (System.Net.Http.HttpMethod method, System.Uri requestUri) \<0x4051def0 + 0x0002b\> in :0  
at System.Net.Http.HttpRequestMessage…ctor (System.Net.Http.HttpMethod method, System.String requestUri) \<0x4051d970 + 0x000a3\> in :0  
at Duplicati.Library.Backend.MicrosoftGraphBackend.SendRequest[T] (System.Net.Http.HttpMethod method, System.String url) \<0x4051d8d0 + 0x0004b\> in :0  
at Duplicati.Library.Backend.MicrosoftGraphBackend.Get[T] (System.String url) \<0x4051d840 + 0x0003f\> in :0  
at Duplicati.Library.Backend.MicrosoftGraphBackend.Test () \<0x4051d3d0 + 0x0005b\> in :0  
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.TestConnection (System.String url, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) \<0x40512d80 + 0x003e0\> in :0  
at Duplicati.Server.WebServer.RESTMethods.RemoteOperation.POST (System.String key, Duplicati.Server.WebServer.RESTMethods.RequestInfo info) \<0x40512a10 + 0x001e7\> in :0  
at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) \<0x404a58b0 + 0x01042\> in :0

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [January 17, 2019, 1:32am UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/3 "2019-01-17T01:32:01Z")

</div>

> [@tacioandrade](#):
>
> Only http or https scheme is allowed

Is this running under Mono (i.e. OS is not Windows?). Trying to look that up found possible source [here](https://github.com/mono/mono/blob/eebe4b52857140ba9dea872c6249960273d222f2/mcs/class/System.Net.Http/System.Net.Http/HttpRequestMessage.cs#L93) although I’m not familiar enough with the design to know exactly why it’s complaining, especially as it did.

Can you get any sort of new destination up on OneDrive v2. at least to the point of a “Test connection” working? Please keep it simple, avoiding non-alphanumeric characters, which might be having [problems](https://forum.duplicati.com/t/onedrive-failing-the-remote-server-returned-an-error-410-gone/5936/20).

---

<div class="post-metadata">

### Author: ![tacioandrade](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tacioandrade/32/641_2.png) [@tacioandrade](https://forum.duplicati.com/u/tacioandrade)
#### Post date: [January 17, 2019, 12:42pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/4 "2019-01-17T12:42:41Z")

</div>

> [@ts678](#):
>
> Is this running under Mono (i.e. OS is not Windows?). Trying to look that up found possible source [here](https://github.com/mono/mono/blob/eebe4b52857140ba9dea872c6249960273d222f2/mcs/class/System.Net.Http/System.Net.Http/HttpRequestMessage.cs#L93) although I’m not familiar enough with the design to know exactly why it’s complaining, especially as it did.
> 
> Can you get any sort of new destination up on OneDrive v2. at least to the point of a “Test connection” working? Please keep it simple, avoiding non-alphanumeric characters, which might be having [problems](https://forum.duplicati.com/t/onedrive-failing-the-remote-server-returned-an-error-410-gone/5936/20).

Yes, I am using Ubuntu 14.04 and this job previously ran with OneDrive.v1 normally, only after it was deactivated and the migration to v.2 that the problem appeared.  
I can use GoogleDrive and Mega normally, the problem is that my OneDrive account which is where I have 1TB of storage I can not connect … The strange thing is that I have an EQUAL VPS in the same provider (Vultr) where the migration of OneDrive .v1 for OneDrive.v2 worked perfectly. =/

---

<div class="post-metadata">

### Author: ![tacioandrade](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tacioandrade/32/641_2.png) [@tacioandrade](https://forum.duplicati.com/u/tacioandrade)
#### Post date: [January 21, 2019, 9:46pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/5 "2019-01-21T21:46:17Z")

</div>

Friends, I have 2 servers with the same application, the first one where Duplicati presents the error, I was execute the command to test if https works normally and returns:

```
root@princesinha-sorte:~# mono /usr/lib/duplicati/utility-scripts/TlsTest.exe --web https://github.com

https://github.com
FAILED: #-2146233079
System.Net.WebException: Error: SendFailure (Error writing headers) ---> System.Net.WebException: Error writing headers ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
  at Mono.Security.Protocol.Tls.RecordProtocol.EndReceiveRecord (IAsyncResult asyncResult) <0x41bf0f40 + 0x0010b> in <filename unknown>:0
  at Mono.Security.Protocol.Tls.SslClientStream.SafeEndReceiveRecord (IAsyncResult ar, Boolean ignoreEmpty) <0x41bf0e80 + 0x0002b> in <filename unknown>:0
  at Mono.Security.Protocol.Tls.SslClientStream.NegotiateAsyncWorker (IAsyncResult result) <0x41bedaa0 + 0x00227> in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Net.WebConnection.EndWrite (System.Net.HttpWebRequest request, Boolean throwOnError, IAsyncResult result) <0x41bf2770 + 0x00207> in <filename unknown>:0
  at System.Net.WebConnectionStream+<SetHeadersAsync>c __AnonStorey1.<>m__ 0 (IAsyncResult r) <0x41bf2070 + 0x0013b> in <filename unknown>:0
  --- End of inner exception stack trace ---
  --- End of inner exception stack trace ---
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) <0x41bdefb0 + 0x0019f> in <filename unknown>:0
  at System.Net.HttpWebRequest.GetResponse () <0x41bd9640 + 0x00053> in <filename unknown>:0
  at TlsTest.GetWebPage (System.String url) <0x41ba21e0 + 0x0028c> in <filename unknown>:0
  at TlsTest.Main (System.String[] args) <0x41b98100 + 0x007ef> in <filename unknown>:0

```

On the other server, which I configured exactly the same way:

```
root@www1-pardal:~# mono /usr/lib/duplicati/utility-scripts/TlsTest.exe --web https://github.com

https://github.com

```

Does anyone know how to solve it?

Ubuntu 14.04 (I’m going to have to upgrade, however the problem is that the application only runs on that particular version, I’m waiting for the developers to update).

---

<div class="post-metadata">

### Author: ![tacioandrade](https://forum.duplicati.com/user_avatar/forum.duplicati.com/tacioandrade/32/641_2.png) [@tacioandrade](https://forum.duplicati.com/u/tacioandrade)
#### Post date: [January 21, 2019, 9:56pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/6 "2019-01-21T21:56:34Z")

</div>

I was able to solve the problem. I do not know why, but the mono version was making it not work correctly, I upgraded the mono according to the following tutorial and it worked: [Download - Stable | Mono](https://www.mono-project.com/download/stable/#download-lin)

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [January 21, 2019, 11:08pm UTC](https://forum.duplicati.com/t/solved-failed-to-connect-only-http-or-https-scheme-is-allowed-in-2-0-4-10-canary-2018-12-29/6020/7 "2019-01-21T23:08:45Z")

</div>

Thanks for letting us know what solved this. I marked that as the solution. I hope your next Ubuntu goes well.
