• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Nextcloud calendar sync not working

Scheduled Pinned Locked Moved Unsolved Support
8 Posts 4 Posters 873 Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fairose
      last edited by 31 Oct 2023, 16:16

      Hello everyone,

      I am trying to set up my calendar on my UT-Fairphone 4 OTA-2 stable. I have a nextcloud calendar running that syncs with no problems with my thunderbird calendar. But I can't get the calendar to show up on ubuntu touch. My phone and the server are both in the same network.

      I had a running setup with a different nextcloud server and a Fairphone 2. From that I remember, that I had to use"Genereric CalDAV" instead of "Nextcloud" in the calendar-account settings.

      I tried the stup with the following URLs already because I think in the past the URL was the problem:
      http://192.168.x.x/remote.php/dav
      https://192.168.x.x/remote.php/dav
      http://192.168.x.x/remote.php/dav/calendars/"Nextcloud-username"/"Calendar-name"
      https://192.168.x.x/remote.php/dav/calendars/"Nextcloud-username"/"Calendar-name"

      I always get a notification-popup that says that the sync finished. If I use https the popup apperas nearly instantly. If I use http it takes a few minutes. No appointment is shown in the calendar. The CalDAV-account is listed in the phones settings. In the calendar-app overview of calendars my nextcloud-calendar is not listed.

      Does anyone know what I am doing wrong? I remember that it was a lot of work setting up the calendar on the Fairphone 2 but somehow now I can't get it to work at all with the FP4.

      Thank you in advance.

      F 1 Reply Last reply 31 Oct 2023, 22:51 Reply Quote 0
      • F Offline
        fairose @fairose
        last edited by 31 Oct 2023, 22:51

        Additional info:

        With the command account-console list I can find out the id of the currently existing account (28). If I type account-console show 28 into the terminal I get the following text:

        account: id 28, enabled, provider: generic-caldav
        Global settings:
        /usr/bin/account-console:244: DeprecationWarning: Accounts.AccountSettingIter.next is deprecated
        (ok, key, value) = iterator.next()
        CredentialsId: 28 (<class 'int'>)
        auth/mechanism: password (<class 'str'>)
        auth/method: password (<class 'str'>)
        enabled: True (<class 'bool'>)
        host: http://192.168.x.x/remote.php/dav/calendars/"Nextloud-username"/"Calendar-name" (<class 'str'>)
        name: "Nextcloud-username"@192.168.x.x/remote.php/dav/calendars/"Nextloud-username"/"Calendar-name" (<class 'str'>)

        What does this deprecation warning mean?

        1 Reply Last reply Reply Quote 0
        • T Offline
          TheBird
          last edited by TheBird 11 Jan 2023, 09:06 1 Nov 2023, 08:58

          Nextcloud (I have Owncloud) sync is working correctly with my phone and server. When I do account-console show x I get the same "DeprecationWarning". So this will not be your problem.

          But I see another difference in the output.

          host: https://owncloud.domain-name.eu
          name: nextclouduser-name@owncloud.domain-name.eu

          So I think you should only give the base url when you add the nextcloud account in accounts. Could this be your problem?

          Oh, and I choose Owncloud, not generic. So that could be why these lines are different.

          BQ Aquaris E4.5
          Pixel 3a XL on Focal which realy rocks!

          F 1 Reply Last reply 1 Nov 2023, 20:07 Reply Quote 0
          • F Offline
            fairose @TheBird
            last edited by 1 Nov 2023, 20:07

            @TheBird Thank you for your answer. Good to know that the deprecation warning does not matter.

            If I type http://192.168.x.x in my browser I get "Error: net::ERR_CONNECTION_REFUSED". https://192.168.x.x leads me to the nextcloud login page. So I think 192.168.x.x is my "base url". I now tried ownCloud, Nextcloud and Generic CalDAV with http://192.168.x.x and https://192.168.x.x. If I choose ownCloud or Nextcloud I get an error saying that the host-URL is invalid and I can't create the account at all. With Generic CalDAV I can create the account but the calender does not sync.

            I synced my new phone with my old nextcloud server. I noticed that my old nextcloud server is reachable through http and https while my new one is only reachable via https. I am only in my local network so https is not that important. Are there any known issues with CalDAV and https on UT?

            A 1 Reply Last reply 1 Nov 2023, 20:52 Reply Quote 0
            • A Online
              arubislander @fairose
              last edited by 1 Nov 2023, 20:52

              @fairose said in Nextcloud calendar sync not working:

              Are there any known issues with CalDAV and https on UT?

              Not specifically. But it is know that UT does not trust self signed certificates.

              πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
              Happily running Ubuntu Touch
              Google Pixel 3a (20.04 DEV)
              JingPad (24.04 preview)
              Meizu Pro 5 (16.04 DEV)

              F 1 Reply Last reply 4 Nov 2023, 13:07 Reply Quote 0
              • F Offline
                fairose @arubislander
                last edited by 4 Nov 2023, 13:07

                @arubislander That my be the problem.

                Is there a way to trust a certificate in UT? I found ths 4 years old thread:
                https://forums.ubports.com/post/16216
                Is there a better way of trusting a certificate by now? Or could I use a trusted certificate on my local server?

                @zlamalp Did you have any trouble with your method of trusting the certificate of your nextcloud server?

                F 1 Reply Last reply 4 Nov 2023, 20:07 Reply Quote 0
                • F Offline
                  fairose @fairose
                  last edited by 4 Nov 2023, 20:07

                  I tryed using this way, DO NOT TRY YOURSELF, I MAY HAVE DAMAGED MY INSTALLATION:

                  # make the root file system writable
                  sudo mount -o remount,rw /
                  # copy certificate
                  cp /home/.../nextcloud.pem /usr/share/ca-certificates
                  # run this command
                  dpkg-reconfigure ca-certificates
                  

                  I tinkered around a little bit and moved the certificate between /usr/share/ca-certificates and /usr/share/ca-certificates/mozilla. I also renamed it "nextcloud.pem", "cert.pem" or "nextcloud.crt".

                  After the dpkg-reconfigure ca-certificates there is a question shown if I want to trust the new certificates. The answer-options are "yes", "no" and "ask". I ran the command multiple times. Sometimes I choose "yes", sometimes "ask". The next page shows a list with all the certificates. Unfortunatly the screen is croped and I can't read all the text. But I can select my new certificate.

                  I tryed navigating to https://192.168.x.x:1234 (my nextcloud instance) in the morph-browser to check if there is a warning about an untrusted certificate. Unfortunatly there still is. And additionally sudo dpkg-reconfigure ca-certificates now shows the error message /usr/sbin/dpkg-reconfigure: ca-certificates is broken or not fully installed and exits after the error.

                  I am not sure where I went wrong with my tinkering. Any Ideas of how to repair the damage in the sudo dpkg-reconfigure ca-certificates?

                  Z 1 Reply Last reply 12 Nov 2023, 19:04 Reply Quote 0
                  • Z Offline
                    zlamalp @fairose
                    last edited by 12 Nov 2023, 19:04

                    Hi @fairose,

                    I still use the way mentioned in my post from almost 5 years ago. It gets overwritten from time to time, but I just re-run the commands to trust my cert again.

                    I think I changed .pem to .crt, but otherwise it is in /usr/share/ca-certificates/certificate.crt (filename doesn't really matter).

                    I don't know why are you getting the error, but I guess there is a problem with some certificate you put in there.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post