Nextcloud account creation failed: Calendar make it fail

REPRODUCIBILITY (% or how often): 100%
BUILD ID: 3.3.0.16 (Rokua)
HARDWARE (Jolla1, Tablet, XA2,…): XA2 plus
UI LANGUAGE: French / changed to English US for this bug report
REGRESSION: (compared to previous public release: Yes, No, ?):

DESCRIPTION:

By setting up a Nextcloud account, it says:
creating account
getting calendar details
then “Oops, probem with account creation
Could not create account
The network request was unsuccessful”

It fails on Calendar.On the creation form, if I uncheck"calendars" the creation is sucessfull.
If I edit the account I can check “calendars” but no calendar appears after that. Even after a manuel sync.
Contacts do sync well.
(i didn’t find yet how files are supposed to be sync)

PRECONDITIONS:

I had Nextcloud calendar setup with a webcalendar before. I deleted the account.

STEPS TO REPRODUCE:

  1. in Settings-> accounts -> add account, Nextcloud
  2. enterijust: login, password and my nextcloud domain, kind of: sub.domain.com
  3. Accept

EXPECTED RESULT:

Create Nextcloud account and syncing

ACTUAL RESULT:

Oops, probem with account creation
Could not create account
The network request was unsuccessful

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

Do you have a subdirectory for nextcloud like: https://yoursi.te/nextcloud ?
Did you maintain .well_known https://help.nextcloud.com/t/well-known-caldav-warning/77429 ?

1 Like

Maybe you can try to run jolla-settings from CLI, so you may see the debug messages from the account creation. To do it, open a terminal and run devel-su -p jolla-settings. It will ask for your developper / ssh password. It would be simpler by the way, to run this from a computer terminal, while being connected to the phone via SSH.

1 Like

Hi Cy8aer,
there’s no subdirectory.
I’m gonna check the .well_know.
Thanks for your help

My CalDAV account via NC stopped syncing approx. two weeks ago. Connection to NC is fine. Looks like there is a prob between local account on my XA2 and the native Jolla calendar.

I asked as well here

and, initially, in German:

Any ideas if something was changed in the background? Debug help?

Same problem with XA2.

SOLVED adding /remote.php/dav to server address,
i.e.

https://my.nextcloud.server/remote.phpe/dav

HTH
Alessandro

1 Like

Have anyone found a solution to it ?
I got exactly the same error when adding a nextcloud account (calendar makes it fail).

I’m on 4.0.1.48 and nextcloud 20 on the server.

Note that SailSync ownCloud app connects correctly.

The solution is indeed to set the .well-known configuration as given in the NC documentation.

Thanks, but the nextcloud server is running fine, and I haven’t touched the .htaccess file. I have the same default rewriterule.
I’m not using a sub-folder (a subdomain rather) and on a shared hosting. Haven’t had any problem anywhere to connect to it (Android, iOS, Linux, Thunderbird, even sailsync in sailfish), only when adding a nextcloud account in Sailfish, I have the error as the OP.

NC doc states the default htaccess is enough:

For the first case the .htaccess file shipped with Nextcloud should do this work for you when you’re running Apache.

In the log for jolla-settings, I get:

being redirected from QUrl(“myurl/.well-known/caldav”) to QUrl(“myurl:443/.well-known/caldav”)
unkown:0 - “QNetworkReply error: 2 with HTTP code: 0”

The url with 443 works fine in the browser.

I’m on Sailfish Kodi 4.

When I specify the caldav path directly (remote.php/dav), I only get the network error:

unkown:0 - “QNetworkReply error: 2 with HTTP code: 0”

And on nextcloud, I can see the device recent activity, which means connection and sign-in went well.

I tried my work nextcloud and it managed to add the account and sync correctly. But still no idea why I can’t sync my personal nextcloud instance.
I’ve been reading NC docs and many resources online but with no success :frowning:

I’m having the same issue with 3.4 and 4.0 and a Nextcloud server that is running in a subdirectory. I can create the account if disabling the calendar, but as soons as I enable it, it fails. .well-known is set up on the server and proved to be working with an Android caldav connector (which works without problems with the same server). Not being able to sync my calendars anymore is my top frustration with Sailfish at the moment…

Only switch from subdirectory Nextcloud installation to subdomain resolved this issue for me.

1 Like

Subdomain is not needed, if .well-known is well configured!

Just to mention that I’ve tried for days many suggestions from here, nextcloud forums, etc., but with no avail. Still the same failture adding a nextcloud account (though it’s working in all other apps, OSs, even SailSync app in SFOS, but not the OS.

I finally got the calendar to work. I have a working .well-known setup and nextcloud in a subdirectory.

First I added the account without calendar, url pointing to address/nextcloud/. After the account was there I edited server url to contain address/nextcloud/remote.php/dav

Possibly related fix: https://git.sailfishos.org/mer-core/buteo-sync-plugin-caldav/merge_requests/79 thanks to dcaliste for his investigations etc.

I wonder: at what point does it fail: at account creation time, or at sync time? I assume account creation time?

I have created JB#53905 to track this issue internally.