alainm23 / planify

Task manager with Todoist & Nextcloud support designed for GNU/Linux 🚀
GNU General Public License v3.0
3.52k stars 208 forks source link

CalDAV integration is stuck in "offline mode" #1215

Closed sebastiaanfranken closed 2 months ago

sebastiaanfranken commented 6 months ago

Describe the bug After I installed the update that fixes #1197 I now notice Planify does indeed add the CalDav server (my self-hosted Nextcloud server), but it goes into "offline" mode, and I can't figure out why or how to toggle it to "online" mode (?)

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Preferences' -> 'Integrations' -> 'CalDav'
  2. Click on the on/off slider and add the server
  3. Add required data (username,password,server address)
  4. Click 'Login'. The server is added
  5. Return to the main window, and see that there is now a list called 'Nextcloud' with a refresh icon next to it. Hover over that icon to see a message that Planify has no network connection.

Expected behavior Being able to add and user CalDav/Nextcloud

Screenshots Screenshot from 2024-03-27 15-49-42

Desktop (please complete the following information):

Additional context All Planify installs are done through Flatpak (Flathub)

sebastiaanfranken commented 6 months ago

Going through the bug list, this is probably related to #1197

janvlug commented 6 months ago

My Planify did work for a while fine with my self hosted Nextcloud, but now it does not sync any more, and I see also the text that I'm working offline if I hover above the icon with the round arrows (as described in the original report above). So the difference is that synchronization did work for a while, but now stopped.

I'm using Nextcloud Hub 7 (28.0.3)

janvlug commented 6 months ago

I started Planify on the command line with: flatpak run io.github.alainm23.planify

I synched then, and I see that each <d:response> element has two <d:propstat> elements. The first ones have a <d:status> of HTTP/1.1 200 OK, but the second ones have all a <d:status> of HTTP/1.1 404 Not Found.

/remote.php/dav/calendars/jan/app-generated--deck--board-12/ Deck: Computer /remote.php/dav/principals/users/jan/ 41 #61ac40 10000000 i;ascii-casemap i;octet i;unicode-casemap HTTP/1.1 200 OK HTTP/1.1 404 Not Found

Maybe it is relevant that I also use the Deck app in Nextcloud. But also I see the HTTP/1.1 404 Not Found also in the responses for "normal" calendars.

janvlug commented 6 months ago

As a test, I created a new Project (this is called List in Nextcloud) in Planify. It was synched to Nextcloud, although the pop-up still stated "Offline mode is on". Then, in Nextcloud, I created a task in the project. It was not synched back to Planify. Next I created a task in Planify, this was not synched back to Nextcloud.

sebastiaanfranken commented 6 months ago

I started Planify on the command line with: flatpak run io.github.alainm23.planify

I synched then, and I see that each <d:response> element has two <d:propstat> elements. The first ones have a <d:status> of HTTP/1.1 200 OK, but the second ones have all a <d:status> of HTTP/1.1 404 Not Found.

Maybe it is relevant that I also use the Deck app in Nextcloud. But also I see the HTTP/1.1 404 Not Found also in the responses for "normal" calendars.

If you don't mind my asking, how did you see the response XML stuff? Also, to be fair, I've stopped using Planify since it just doesn't work, and there are more things wrong with it. I've gone back to Errands, which "Just Works (tm)"

alainm23 commented 6 months ago

Hello guys, the offline mode is automatic and detects if you have internet access, offline support is not yet available in Nextcloud.

sebastiaanfranken commented 6 months ago

Hello guys, the offline mode is automatic and detects if you have internet access, offline support is not yet available in Nextcloud.

That's the bug part I guess, since I have internet...

janvlug commented 6 months ago

I can also confirm that my internet connection is functioning properly. Also the icon starts spinning, but after a while it stops spinning. Just a guess: could it be that getting details for one specific project is resulting in an error, and that this causes the synchronization process to break?

janvlug commented 6 months ago

I also noted that if I right click on a specific Project (Task list) and select Refresh from the pop up menu, there is a spinner shown for a little while for most projects. But for a few projects not.

sebastiaanfranken commented 6 months ago

I can also confirm that my internet connection is functioning properly. Also the icon starts spinning, but after a while it stops spinning. Just a guess: could it be that getting details for one specific project is resulting in an error, and that this causes the synchronization process to break?

Which would be odd, since for me it also does this if I have nothing to sync, it never works. There is no data there in my situation to sync, as is stated I believe above.

janvlug commented 5 months ago

I did some further testing. And it appears to me that there are two types of Projects (Task lists) that are not updated:

  1. Projects with repeating tasks
  2. Projects that are bases on task related to the Nextcloud Deck app.

If it is possible to get some logging, let me know, and I will try to get it.

janvlug commented 5 months ago

I notice that when I changed a (repeating) task in Planify, it was still updated in Nextcloud. Even when the "offline mode" symbol is visible. I guess that there might be some issues with specific calendars, which make the "offline mode" symbol appear.

alainm23 commented 4 months ago

Hi guys, the sync issue has been fixed, update to 4.7.2, the offline icon is just an indication.

craigToolBelt commented 4 months ago

Just a quick update. I have been on 4.7.2 since it launched and I am still seeing this issue. Every time I open Planify I have to delete my sync then reconnect. It will then work properly for the entire session. As soon as I close and reopen Planify the CalDAV sync goes into offline mode again.

alainm23 commented 2 months ago

Fixed in Planify 4.10.0