nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
968 stars 236 forks source link

Subscription based calendar not updating on nextcloud, but updates via davx5 and icsx5 onto android #2891

Open ultimase opened 3 years ago

ultimase commented 3 years ago

Thank you everyone for working on this nice piece of software. It is very satifying to get everything off someone elses server and run your own. I am admittedly new at this so please let me know if I can provide anything else or differently.

Steps to reproduce

  1. Added subscription based calendar via google link
  2. Calendar updates with davx5 and icsx5 and displays on android, but does not display on nextcloud calendar
  3. have utilized "sudo -u www-data php ./occ config:app:set dav calendarSubscriptionRefreshRate --value "PT5M"" to updated subscription every 5 minutes
  4. under basis settings cron is selected and is generally showing executed within 5 minutes.

Expected behaviour

Update subscription based calendar on nextcloud calendar

Actual behaviour

Subscription based calendar does not update on nextcloud calendar

Calendar app

Calendar app version: 2.1.3

CalDAV-clients used: updating to davx5, icsx5 and calyxos calendar

Client configuration

Browser: Brave 1.19.86

Operating system: Windows 10

Server configuration

Operating system: Linux 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l

Web server: Apache (fpm-fcgi)

Database: mysql 10.3.27

PHP version: 7.3.19-1~deb10u1

Nextcloud Version: 20.0.7 - 20.0.7.1

Updated from an older installed version or fresh install: fresh install

List of activated apps:

Enabled:

Nextcloud configuration:

{ "system": { "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusteddomains": { "0": "localhost", "11": "174.73.175.21", "1": "192.168.1.8", "5": "nextcloudpi.local", "7": "nextcloudpi", "8": "nextcloudpi.lan" }, "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "20.0.7.1", "overwrite.cli.url": "http:\/\/localhost", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "oc", "mysql.utf8mb4": true, "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "instanceid": "REMOVED SENSITIVE VALUE", "memcache.local": "\OC\Memcache\Redis", "memcache.locking": "\OC\Memcache\Redis", "redis": { "host": "REMOVED SENSITIVE VALUE", "port": 0, "timeout": 0, "password": "REMOVED SENSITIVE VALUE" }, "tempdirectory": "\/media\/myCloudDrive\/ncdata\/tmp", "mail_smtpmode": "sendmail", "mail_smtpauthtype": "LOGIN", "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_domain": "REMOVED SENSITIVE VALUE", "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "overwriteprotocol": "https", "maintenance": false, "logfile": "\/media\/myCloudDrive\/ncdata\/nextcloud.log", "loglevel": "2", "log_type": "file", "theme": "" } }

Logs

Web server error log (e.g. /var/log/apache)

[PHP] Error: Error: Undefined index: readonly at /var/www/nextcloud/apps/support/lib/Sections/ServerSection.php#268 at <<closure>>

 0. /var/www/nextcloud/apps/support/lib/Sections/ServerSection.php line 268
    OC\Log\ErrorHandler::onError(8, "Undefined index: readonly", "/var/www/nextcl ... p", 268, {0: "And 5 more  ... ]})
 1. <<closure>>
    OCA\Support\Sections\ServerSection->OCA\Support\Sections\{closure}("*** sensitive parameters replaced ***")
 2. /var/www/nextcloud/apps/support/lib/Sections/ServerSection.php line 257
    array_map(Closure {}, {1: OCA\Files_Ex ... "})
 3. /var/www/nextcloud/apps/support/lib/Sections/ServerSection.php line 84
    OCA\Support\Sections\ServerSection->getExternalStorageInfo()
 4. <<closure>>
    OCA\Support\Sections\ServerSection->__construct(OC\AllConfig {}, OC\IntegrityCheck\Checker {}, OC\App\AppManager {}, OC\DB\Connection {}, OC\User\Manager {})
 5. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 101
    ReflectionClass->newInstanceArgs([OC\AllConfig {} ... }])
 6. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 109
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass  ... "})
 7. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 126
    OC\AppFramework\Utility\SimpleContainer->resolve("OCA\\Support\\Sections\\ServerSection")
 8. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 455
    OC\AppFramework\Utility\SimpleContainer->query("OCA\\Support\\Sections\\ServerSection")
 9. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 427
    OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\\Support\\Sections\\ServerSection")
10. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 87
    OC\AppFramework\DependencyInjection\DIContainer->query("OCA\\Support\\Sections\\ServerSection", true)
11. <<closure>>
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 101
    array_map(Closure {}, [ReflectionParam ... "])
13. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 109
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass  ... "})
14. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 126
    OC\AppFramework\Utility\SimpleContainer->resolve("OCA\\Support\\Controller\\ApiController")
15. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 455
    OC\AppFramework\Utility\SimpleContainer->query("OCA\\Support\\Controller\\ApiController")
16. /var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php line 427
    OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback("OCA\\Support\\Controller\\ApiController")
17. /var/www/nextcloud/lib/private/AppFramework/App.php line 139
    OC\AppFramework\DependencyInjection\DIContainer->query("OCA\\Support\\Controller\\ApiController")
18. /var/www/nextcloud/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main("OCA\\Support\\Controller\\ApiController", "generateSystemReport", OC\AppFramework\ ... {}, {_route: "suppor ... "})
19. /var/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/support/generateSystemReport")
20. /var/www/nextcloud/index.php line 37
    OC::handleRequest()

POST /index.php/apps/support/generateSystemReport

[core] Error: Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1449
    OC\DB\Connection->connect()
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 892
    Doctrine\DBAL\Connection->getWrappedConnection()
 2. /var/www/nextcloud/lib/private/DB/Connection.php line 202
    Doctrine\DBAL\Connection->executeQuery("SELECT * FROM `oc_appconfig`", [], [], null)
 3. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 206
    OC\DB\Connection->executeQuery("SELECT * FROM `oc_appconfig`", [], [])
 4. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 217
    Doctrine\DBAL\Query\QueryBuilder->execute()
 5. /var/www/nextcloud/lib/private/AppConfig.php line 345
    OC\DB\QueryBuilder\QueryBuilder->execute()
 6. /var/www/nextcloud/lib/private/AppConfig.php line 110
    OC\AppConfig->loadConfigValues()
 7. /var/www/nextcloud/lib/private/AppConfig.php line 301
    OC\AppConfig->getApps()
 8. /var/www/nextcloud/lib/private/legacy/OC_App.php line 949
    OC\AppConfig->getValues(false, "installed_version")
 9. /var/www/nextcloud/lib/private/Server.php line 668
    OC_App::getAppVersions()
10. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 155
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
11. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 118
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 122
    Pimple\Container->offsetGet("OC\\Memcache\\Factory")
13. /var/www/nextcloud/lib/private/ServerContainer.php line 156
    OC\AppFramework\Utility\SimpleContainer->query("OC\\Memcache\\Factory", true)
14. /var/www/nextcloud/lib/private/Server.php line 1677
    OC\ServerContainer->query("OC\\Memcache\\Factory")
15. /var/www/nextcloud/lib/private/Server.php line 854
    OC\Server->getMemCacheFactory()
16. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 155
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
17. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 118
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
18. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 122
    Pimple\Container->offsetGet("OC\\App\\AppManager")
19. /var/www/nextcloud/lib/private/ServerContainer.php line 156
    OC\AppFramework\Utility\SimpleContainer->query("OC\\App\\AppManager", true)
20. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 56
    OC\ServerContainer->query("OC\\App\\AppManager")
21. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 177
    OC\AppFramework\Utility\SimpleContainer->get("OC\\App\\AppManager")
22. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 155
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
23. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 114
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
24. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 122
    Pimple\Container->offsetGet("OCP\\App\\IAppManager")
25. /var/www/nextcloud/lib/private/ServerContainer.php line 156
    OC\AppFramework\Utility\SimpleContainer->query("OCP\\App\\IAppManager", true)
26. /var/www/nextcloud/lib/private/Server.php line 1886
    OC\ServerContainer->query("OCP\\App\\IAppManager")
27. /var/www/nextcloud/lib/private/legacy/OC_App.php line 370
    OC\Server->getAppManager()
28. /var/www/nextcloud/lib/private/legacy/OC_Util.php line 1460
    OC_App::getEnabledApps(false, true)
29. /var/www/nextcloud/lib/public/Util.php line 516
    OC_Util::needUpgrade(OC\SystemConfig {})
30. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 117
    OCP\Util::needUpgrade()
31. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 78
    OC_Template::initTemplateEngine("error")
32. /var/www/nextcloud/lib/private/legacy/OC_Template.php line 322
    OC_Template->__construct("", "exception", "error", false)
33. /var/www/nextcloud/index.php line 63
    OC_Template::printExceptionErrorPage(Doctrine\DBAL\DBALException {}, 500)

GET /index.php/apps/calendar/dayGridMonth/2021-02-16

#### Log file (data/nextcloud.log)
tried to paste in, but ended up being too many characters.

#### Browser log

Insert your browser log here, this could for example include:

a) The javascript console log b) The network log c) ...

tcitworld commented 3 years ago

5 minutes is a very little timeframe, it's possible that the cron doesn't have time to perform this every time it's called (there's plenty of other tasks to perform). Does it get updated eventually after 10/15 minutes?

You'll have to refresh the calendar page manually, it doesn't get updated automatically.

ultimase commented 3 years ago

I had it originally set at PT30M and then PT15M, and then finally PT5M but it never updated on the nextcloud calendar even if I refreshed it manually. But again the odd thing was it did update on my phone via davx5 and icsx5.

tcitworld commented 3 years ago

Nextcloud caches the subscription on server side for the calendar app, but icsx5 accesses it directly. I'd say there may be an issue while parsing the calendar data during caching. Please provide your nextcloud.log for clues. If you have trouble getting only useful data from the log, you can:

The browser console logs can be useful as well, please provide them too.

ultimase commented 3 years ago

Thank you, we had a bit of an emergency, so unfortunately I'm away from the nextcloud at this moment. I will provide those logs as soon as I get back, my apologizes.

I remember looking at the nextcloud.log and being overwhelmed fairly quickly, so I believe I can find that again. Where are the browser console logs located?

tcitworld commented 3 years ago

Open the browser developer tools with the F12 key, make sure the console tab is selected, then perform the subscription action in Nextcloud calendar.

ultimase commented 3 years ago

Ok I'm back and am local to the nextcloud server. We've updated the nextcloud to 20.0.8 and confirmed that it still appears to not update on the nextcloud calendar.

So apparently I cannot find the nextcloud.log file now, from my searching it looks like I need to create the file and then have nextcloud write to it

https://www.techrepublic.com/article/how-to-enable-logging-in-nextcloud-16/

Also when you mention removing the subscription do you mean remove the calendar subscription from the remote google calendar?

Thank you, apologize for the newbish questions.

xsolinsx commented 3 years ago

Hello, I have the same problem on nextcloud 21.0.3, calendar version 2.3.0 I have a business outlook account and I wanted to add the calendar on that account to my nextcloud instance. Then I see old events (or some events in the future already planned) but then, when something new gets added to the original business calendar, the one on nextcloud won't update.

tcitworld commented 3 years ago

@xsolinsx See the refresh-rate documentation: https://docs.nextcloud.com/server/latest/admin_manual/groupware/calendar.html#refresh-rate

xsolinsx commented 3 years ago

@tcitworld thank you very much, this should be put on a GUI element when adding the calendar or with the possibility to modify it later

ozls commented 7 months ago

I am encountering the same issue. ICSx5 also works fine in my case. I have tried deleting and re-adding the calendar without success.

tcitworld commented 7 months ago

@ozls You probably have a different issue, see https://github.com/nextcloud/server/issues/42143