can't connect with owncloud calendars

Bug #1626454 reported by tuxboson on 2016-09-22
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Canonical System Image
David Barth
Ubuntu Calendar App
Renato Araujo Oliveira Filho
account-plugins (Ubuntu)
Alberto Mardegan

Bug Description

Running my own ownCloud (v9.1.1). Tried to connect Aquarius 4.5 with Calendar App
The httpS certificate is official, up to date and not self-signed
I use 7 calendars in my ownCloud-calendar-app.
(yes, username and password is correct)

This I tried:

https://mydomain/owncloud/ (suggested minimal path on the phone)
Error message: Invalid username or password

Error message: Invalid host URL

https://mydomain/owncloud/remote.php/dav/ --> (This is the primary caldav address suggested by ownCloud calendar-app)
Error message: Invalid host URL

Error message: Invalid host URL

Error message: Invalid host URL

Error message: Invalid host URL
--> This direct path to one of my calendars I use for example to connect my different calendars with Thunderbird lightning (its working)

I tried all with and without ending "/"

Related branches

Bill Filler (bfiller) on 2016-09-22
Changed in ubuntu-calendar-app:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
importance: Undecided → High


My guess is that you are trying to insert the url on the online account creation screen. Right?

This screen needs the root url for your server.I guess it uses the same url that you use in the browser to login in the server.

Are you able to login from the browser?

@mardy Any idea what is the problem?

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
assignee: nobody → Alberto Mardegan (mardy)
Alberto Mardegan (mardy) wrote :

Please try connecting to the phone with the phablet-shell command and run this:

   OAU_LOGGING_LEVEL=2 OAU_DAEMON_TIMEOUT=9999 online-accounts-service

Then try creating the account again in your phone (using the suggested minimal path), and you should see some output from the command above. If you could then attach that output to this bug, that should show us what exactly is going wrong.

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: New → Incomplete
tuxboson (tpayer) wrote :

Thank you 4 your answers. æ mardy: Have some problems to connect with phablet-shell....
If you want to test yourself I added a testing user in my ownCloud and Nextcloud:
User & Passwd for both (own- & Next- Cloud): phablet & phablet

Default calendar with one entry still existing.

The accounts will be active for - lets say - one week. Only 10 MB space on it ;-)


tuxboson (tpayer) wrote :

Ohh, Calendar-Sync with the new phablet account is working as expected. With multiple calendars ...

tuxboson (tpayer) wrote :

@mardy Tried your command (via adb shell). But there was no output during connecting to my real account, just following warnings:

sudo OAU_LOGGING_LEVEL=2 OAU_DAEMON_TIMEOUT=9999 online-accounts-service
[sudo] password for phablet:

(process:7564): accounts-glib-WARNING **: Failed to get D-Bus connection (Cannot autolaunch D-Bus without X11 $DISPLAY)
Manager could not be created. DB is locked

(process:7564): accounts-glib-WARNING **: Failed to get D-Bus connection (Cannot autolaunch D-Bus without X11 $DISPLAY)
Manager could not be created. DB is locked

(process:7564): accounts-glib-WARNING **: Failed to get D-Bus connection (Cannot autolaunch D-Bus without X11 $DISPLAY)
Manager could not be created. DB is locked

(process:7564): accounts-glib-CRITICAL **: ag_manager_list_enabled: assertion 'AG_IS_MANAGER (manager)' failed

tuxboson (tpayer) wrote :

also in this - i think right - order:
phablet@ubuntu-phablet:~$ OAU_LOGGING_LEVEL=2
phablet@ubuntu-phablet:~$ OAU_DAEMON_TIMEOUT=9999
phablet@ubuntu-phablet:~$ online-accounts-service

no output ...

tuxboson (tpayer) wrote :

OHHHHH, i got the SOLUTION of this error:

I changed my password to a really weak one. Only letters (like abcdefgh ..). THIS works !!!
If I use my real very good password (like abcdef@ghi&jklmn ...) - this doesn't work !!!!

There should be a problem with submitting a password with special character


tuxboson (tpayer) wrote :

Try to sync with this, you get an error:
User: phablet
Password: abcdef@ghi&jklmn (i changed to this)

With ubuntuphone / calendarapp you get the error: Invalid username or password
but you can login with webbrowser at all..

have a nice evening.

Alberto Mardegan (mardy) wrote :

Thanks @tuxboson! That information really helped! Indeed, the plugin is not properly encoding username and password, so the "&" character was passed to the server unquoted, causing it to be interpreted as the beginning of another query item.

We'll fix this.

affects: ubuntu-system-settings-online-accounts (Ubuntu) → account-plugins (Ubuntu)
Changed in account-plugins (Ubuntu):
importance: Undecided → High
status: Incomplete → Confirmed
status: Confirmed → In Progress
tuxboson (tpayer) wrote :

Ok, fine. Hope there are so security flaws within this bug. What happens if someone insert some sql code within the username or password ...

Changed in canonical-devices-system-image:
assignee: nobody → David Barth (dbarth)
importance: Undecided → High
milestone: none → 14
status: New → In Progress
slash (slash-tux) wrote :

When i'm using a 2 step authentification on owncloud + app password i cannot login into my owncloud
the app password is like : OYMGY-LVNGX-BFXDJ-RXRUI

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
slash (slash-tux) wrote :

When does the fix will land to Rc-proposed ?
Currently the 06/10/16, i still cannot use pwd like OYMGY-LVNGX-BFXDJ-RXRUI to connect to owncloud calendar, from syncevolution no prob.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package account-plugins - 0.13+16.10.20160929.1-0ubuntu1

account-plugins (0.13+16.10.20160929.1-0ubuntu1) yakkety; urgency=medium

  * Owncloud: properly encode username and password in POST request (LP:

 -- Alberto Mardegan <email address hidden> Thu, 29 Sep 2016 09:23:40 +0000

Changed in account-plugins (Ubuntu):
status: In Progress → Fix Released
slash (slash-tux) wrote :

To sort out my issue, I've:
- Create a new user with a weaker password,
- share my calendar to this new user,
- connect the ubuntu owncloud account to this new user.


Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Ralf Hersel (ralf.hersel) wrote :

I have the same problem even after OTA 14:
- medium secure password (just upper/lower case and numbers, no special chars)
- https (unknown DigiCert certificate)
Error message: Invalid host URL

- I also still can't use special chars in my password.

- ssl works fine whit my system though... I use a ssl certificate of letsencrytp, so my certificate is not selfsigned.

Ralf Hersel (ralf.hersel) wrote :

Error still in OTA-14
- signed certificate
- simple passwort
- no problems with log-in from Firefox 50.1.0 on Linux PC
Ubuntu Touch: Error message: Invalid host URL

Ralf Hersel (ralf.hersel) wrote :

I've created aa account for testing purpose:

Use: ralfhersel
Password: bmbwbmbw
Primary CalDav Adress:

Please use it only for testing with regard to this bug, thanks.

Alberto Mardegan (mardy) wrote :

Ralf, the account plugin is not for generic calvad servers, it's specifically written for owncloud / nextcloud.

Also, note that the newest versions of nextloud server have some bug which prevents the account from being created: see bug 1651938.

slash (slash-tux) wrote :

The new server require a new header info that has been fixed but not implemented on the Ubuntu touch image. I've ask Ubport project to implement it.

Regarding my problem of password, it's not linked to Ubuntu touch but nextcloud ... i found it recently.

With the App password nextcloud doesn't allow POST request identification information :

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.