Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscriptions never updated after creation #2146

Closed
palegrand opened this issue Apr 3, 2020 · 12 comments
Closed

subscriptions never updated after creation #2146

palegrand opened this issue Apr 3, 2020 · 12 comments
Labels
0. to triage Pending approval or rejection bug

Comments

@palegrand
Copy link

Ever since I updated to calendar 2.0.1 changes/additions shard calendars are not shown anymore.

After creating a new subscription (mainly shared outlook-calendars with *.ics-link) the subscribed calendar shows nicely with all events after the first 'cron' run.
cron does call \UpdateCalendarResourcesRoomsBackgroundJob regularely, executes without error but does NOT show updates in the calendar.
Recommended update to Nexctcloud 18 did no change the behaviour

Steps to reproduce

  1. create subscription to foreign calendar (*.ics link)
  2. subscribed calendar entries show nicely after first 'cron' run
  3. change something in the 'other' calendar
  4. The change does not show in Nextcloud after next cron run

Expected behaviour

step 4 should show the updated/added entry from step 3 in Nextcloud-calendar
used to work like that before calendar 2.0.1

Actual behaviour

subscribed calendar in Nextcloud shows the state it had after creation/first cron run and does not reflect any changes in the original calendar

  • deleting and recreating the subscription (with the same link) shows nicely the current sate (including all changes) - but this state will never change (as above)
  • cross-check: ICSx5 (Android) using the same link perfectly works as before, i.e. shows all updated entries

Calendar app

Calendar app version: 2.0.2

CalDAV-clients used: (Thunderbird Lightning, DAVx5, Evolution, macOS Calendar, etc)
DAVx5

Client configuration

Browser: recent Firefox/chrome/Vivaldi.
Problem is independent of the browser

Operating system: Windows 10, Debian 10

Server configuration

Operating system: Debian 10

Web server: Apache

Database: MariaDB

PHP version: 7.3

Nextcloud Version: 18.0.3
same behaviour as 17.0.3

Updated from an older installed version or fresh install: updated

@palegrand palegrand added 0. to triage Pending approval or rejection bug labels Apr 3, 2020
@tcitworld
Copy link
Member

Default subscription refreshing interval is of one week (unless the subscription itself asks for a different rate).
You may override it with something like:

./occ config:app:set dav calendarSubscriptionRefreshRate --value "P1D"

to refresh all of the server's subscriptions every day. Value is a DateInterval

@palegrand
Copy link
Author

@tcitworld: Thank you very much! I obviously missed that change. I set the calendarSubscriptionRefreshRate and it updates perfectly as before.

@tcitworld
Copy link
Member

No worries, it still needs to be added to the documentation.

@laborb-sb
Copy link

laborb-sb commented Apr 8, 2020

I'm in the same boat.
May I ask, if there is planed to have a possibilty to set the interval from the User GUI? The interval in the calendar setting don't has any effect.
However, I tried to set some shorter intervals with occ for testing. But I got following error


0. /app/data/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php line 94
   Sabre\VObject\DateTimeParser::parseDuration("P30M")
1. /app/code/cron.php line 125
   OCA\DAV\BackgroundJob\RefreshWebcalJob->execute(OC\BackgroundJob\JobList {}, OC\Log {})

at 2020-04-08T15:20:35+00:00```

@georgehrke
Copy link
Member

@laborb-sb That’s no surprise, since P30M is an invalid value. Use PT30M

@hansdez
Copy link

hansdez commented May 25, 2020

For the past two weeks I thought that my ICS subscription wasn't working. Whenever I imported via the URL it would have all the appointments. But any new appointments or changes wouldn't show up.

I would then remove the subscription and re-add it.

Today I decided to search for a solution and after searching in the Github issues here, on the Nextcloud help forums and in the documentation, I finally found that there is default refresh rate of a week.

If it isn't possible to set the reset rate per subscription, might it then be an idea to change this refresh rate to once per day? That way people will have a bigger chance to realise that their subscription are actually working.

P.S. Thanks for making this essential app!

@georgehrke
Copy link
Member

If it isn't possible to set the reset rate per subscription, might it then be an idea to change this refresh rate to once per day? That way people will have a bigger chance to realise that their subscription are actually working.

This is already possible.

Use the occ tool to set a custom appValue for dav calendarSubscriptionRefreshRate.
https://github.com/nextcloud/server/blob/master/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php#L88

A per-calendar value is used, if the calendar data is providing any. (As in, if the calendar-feed is containing the information that it should be updated once an hour, Nextcloud remembers that and will update the calendar once an hour). You can also change it manually in the database if you really have to. See the refreshrate column of the corresponding subscription in the oc_calendarsubscriptions table.

@tcitworld
Copy link
Member

See the docs as well : https://docs.nextcloud.com/server/18/admin_manual/groupware/calendar.html#refresh-rate

@hansdez
Copy link

hansdez commented May 25, 2020

I did indeed find it in the manual eventually. (Although I first found this link through Google https://docs.nextcloud.com/server/15/user_manual/pim/calendar.html, and read this about subscribing 'Finished. Your calendar subscriptions will be updated regularly.' I didn't realise until just now that I was reading an old manual).

I realize I could have been clearer in my original post. My point is more about providing defaults that work wel for most use cases. Why is the default a week and not every day? Is doing a refresh that computationally intensive? Or do you have data showing that most people use these subscription links mostly for things like a holiday calendar which will barely ever change?

Unfortunately many of us can't trust the calendar-feed providing the right refresh information (or can influence that). In my case, for example, I have to deal with some Microsoft Outlook Web-feed that I am quite sure won't nicely validate (so happy it works at all to be honest).

@disolva
Copy link

disolva commented Nov 12, 2021

I set the rate to 'PT5M' where I expect it to be 5 minutes. Is that correct? Because, it does not update after 5 mins. But also not after 1 week. I'm confused about what it actually it's set now. At least in the database, there is none refresh rate set to the subscripted calendar. Where can I (cross) check the setting?

./occ config:app:set dav calendarSubscriptionRefreshRate --value "P1D"

@thewavelength
Copy link

thewavelength commented Mar 14, 2022

@disolva You can check in the table oc_appconfig where configkey = calendarSubscriptionRefreshRate.

I've set this value to 5 minutes (PT5M), ran the cronjob and it just doesn't work. I successfully added one subscription for an iCloud calendar, it worked, added another, and it doesn't work. No errors but also no sync. Both are hosted on iCloud and shared by the same owner. I'm lost and don't know where to further look. I investigated all issues related to subscriptions in this repo already everything looks about fine.

Any further debug options I can enable?

Edit: I found the solution... the subscribed calendar contained an invalid location string. An error message is nowhere to be found, even with LOGLEVEL set to 0 (debug). Folks, if you have this problem after checking all the other issues, download the calendar in question and try to import in manually once while having you developer console (F12) open. It will let you know if it fails to parse the ical file.

@mirenbz
Copy link

mirenbz commented Jul 4, 2022

I was having this same issue about remote calendars not syncing. Solved it thanks to @georgehrke 's fix: I was using time intervals without the T. This was throwing refreshrate in database is invalid errors in nextcloud.log. I set my calendarSubscriptionRefreshRate to PT6H and everything *seems* to be working now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage Pending approval or rejection bug
Projects
None yet
Development

No branches or pull requests

8 participants