Solved Nextcloud accounts and Invalid url host
Hello, the topic in the above link is quite old but I meet exactly the same issue so I would link it to mine.
I have bought a Nexus 5 and when I try to setup the CalDAV through Nextcloud account, it says
Invalid url host.
- URL used is in
- I have also tried
- Let's encrypt certificate is enabled and valid
- Finally, I have tried the workaround proposed by @ernest :
phablet@ubuntu-phablet:~$ export OAU_LOGGING_LEVEL=2 phablet@ubuntu-phablet:~$ export OAU_DAEMON_TIMEOUT=9999 phablet@ubuntu-phablet:~$ online-accounts-service
however when I launch the 3rd command (
online-accounts-service), I cannot use the keyboard anymore in the account settings.
Do you have any idea about what is wrong ? Thank you very much for your help.
- URL used is in
@prog-amateur via cut and paste you can input your nextcloud credentials into the online accounts.
@povoq Hello, thank you for helping me, I felt a bit alone with this issue.
Actually, the first try was to use
Settings>Accounts>Nextcloudand copy/paste my credentials as you said but this lead to the "invalid URL host" error message.
This is why I have tried the workaround by @ernest but it doesn't work too.
Then I have tried to use normal CalDAV credentials by using the calendar caldav url showed in my Nextcloud account but it doesn't work too.
Then I have tried at least to import my calendar with an
.icsformat but the Agenda app does not recognize this file format !
My agenda has many entries and, unfortunately, I can't enter each one manually from scratch.
So I feel a bit stuck and I need help. I hope you or anybody else will be alble to confirm the issue and find a solution. Thank you very much !
@prog-amateur All I can rember when I had the issue was that it was the second part of the url that I had wrong for my Generic CalDAV which is lakotaubp@-----------mail.com@------.thegood.cloud/caldev/ same for my Nextcloud but without /caldav/ at the end.
I also kept putting a capital letter at the start of a password or email address which also got the error you are.
@prog-amateur Hmm, not sure... maybe check your .well-known settings Nextcloud side? Might be required for discovery.
Thanks to both of you, I can confirm that changing the password with the first letter to lower case does not solve the problem.
In my Nextcloud account, the link for a specific calendar has this specific format :
While if I use the Nextcloud credential sync, I also
I have tried without success.
But I discovered something interesting: the certificate is considered as not secure (red lock)... And I discovered that my French ISP has a bug: they are always in winter time instead of summer time.
So I think when I requested a TLS certificate, it was issued in winter time, while the certificate authority validated it at the same time, but in summer time, which led to this atypical situation.
I called my ISP and they said they didn't think this was the cause of my problem, and asked me to restart my router. However, his solution did not help.
To summarize, it is like if I had no certificate, maybe that could be the issue ?
@prog-amateur That is most probably the case...
Thank you. I have investigated a bit more : my certificate is still the old one (self certificate, not the supposed TLS from ISP... very very strange.
I have decided to follow another workaround, which seems to work according to the member (Morph cannot take into account the self-certificate, but the CalDAV sync does work after this workaround and this is exactly what I want). The proposal is to move the own self-certificate into
/usr/local/share/ca-certificates/. To do so, you have to have read and write permission in the folder by using
sudo mount -o remount,rw /.
By doing so, the output of
sudo mount -o remount,rw /is an
unable to resolve host phablet@ubuntuerror message. So I can't move my self certificate in this folder, I don't know why I have this error message (do you know if it is now impossible to get read and write permissions in OTA 16 ?). This is really frustrating.
Try to use UT Tweak Tools to remount r/w maybe?
do you know if it is now impossible to get read and write permissions in OTA 16 ?
Yes it is possible, see :
Hmm, does the embedded Morph webview in the account manager use the same cache as the main Morph browser? I noticed that it stores old certificates really long. Maybe try deleting your Morph browser history and cache and see if that makes a difference for the certificates as well? A bit of a shot in the dark to be honest...
I have found the root cause of the issue ! First of all, thank you very much for your help and sorry for my late reply, I have checked your advises.
@Keneda, UT Tweak Tool allowed to switch successfully to read/write mode, but in the end moving the certificate to the folder did not solve the issue (still the
Invalid url hosterror).
@poVoq thank you, it was a nice idea, but unfortunately, it didn't worked neither.
So I tried to figure out what conditions are needed to avoid this message:
- you need an official certificate (ex : from Let's Encrypt) and not a self-certificate, otherwise Nextcloud sync does not work.
- you have to open ports 80 to renew your certificate automatically, otherwise Let's Encrypt cannot issue/renew the certificate.
- even with port 80 open, the certificate could not be installed (error message
timeouterror). So I checked the firewall: everything seemed to be normal.
However, I noticed that my Nextcloud settings had an
https-onlyoption enabled. Once I disabled the option, the certificate could be installed, and I was able to sync my Nextcloud account by entering the following format:
https://mydomain.free.fr/(no need for
/nextcloudat the end)
What a challenge !!! Thank you very much all !!!
Thanks for your feedback.
Hopefully it'll help others to avoid such trouble.
Can you please also change the topic to a question and then mark it solved ?
You can find the options in the cog wheel menu at the top of the page.
@applee Yes with pleasure, I hope it will help