nextcloud / calendar

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

Calendar freezes #6235

Open Julia-TGC opened 3 months ago

Julia-TGC commented 3 months ago

Steps to reproduce

We're unsure what triggered this initially and cannot reproduce it outside of this server. A user was making a regular change to an event when the issues started.

  1. Enable calendar app
  2. Go to calendar in the web interface.

Expected behavior

Calendars should load, webUI should function, and the calendars should sync with thunderbird and DAVx5

Actual behaviour

When opening the calendar app, the web interface freezes, multiple calendars are indicated with a loading circle, and the entire web interface becomes unresponsive. No calendar can sync to a client.

When the Dashboard was enabled, the whole web interface would immediately freeze when it tried to fetch calendar events.

Everything else works fine when the Calendar app is disabled.

Calendar app version

4.7.14

CalDAV-clients used

DAVx5, thunderbird, web

Browser

various

Client operating system

various

Server operating system

Docker/k8s

Web server

Nginx

Database engine version

MySQL

PHP engine version

PHP 8.1

Nextcloud version

27.1.10.2

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

Enabled:
  - activity: 2.19.0
  - audioplayer: 3.4.1
  - calendar: 4.7.14
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.5.3
  - contactsinteraction: 1.8.0
  - dav: 1.27.0
  - deck: 1.11.5
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - files_versions_s3: 0.2.2
  - firstrunwizard: 2.16.0
  - forms: 3.4.7
  - group_everyone: 0.1.13
  - groupquota: 0.2.1
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.10.1
  - notifications: 2.15.0
  - oauth2: 1.15.2
  - onlyoffice: 9.3.0
  - password_policy: 1.17.0
  - photos: 2.3.0
  - polls: 7.1.4
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - spreed: 17.1.10
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - twofactor_totp: 9.0.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - approval: 1.1.1 (installed 1.1.1)
  - bruteforcesettings: 2.7.0
  - dashboard: 7.7.0 (installed 7.5.0)
  - encryption: 2.15.0
  - files_lock: 27.0.7 (installed 27.0.7)
  - support: 1.10.1 (installed 1.4.0)
  - survey_client: 1.15.0 (installed 1.7.0)
  - suspicious_login: 5.0.0
  - updatenotification: 1.17.0 (installed 1.8.0)
  - user_ldap: 1.17.0
  - user_saml: 5.2.7 (installed 5.2.7)

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "XXXXXXXXXXX",
            "XXXXXXXXXXXXX.thegood.cloud"
        ],
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/apps2",
                "url": "\/apps2",
                "writable": true
            }
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "objectstore": {
            "class": "\\OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
                "autocreate": true,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "hostname": "XXXXXXXXXXXXXXX.thegood.cloud",
                "port": 443,
                "use_ssl": true,
                "region": "default",
                "use_path_style": true
            }
        },
        "dbtype": "mysql",
        "version": "27.1.10.2",
        "overwrite.cli.url": "https:\/\/XXXXXXXXXXXXXXX",
        "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***",
        "logtimezone": "Europe\/Amsterdam",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379",
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "auth.bruteforce.protection.enabled": "false",
        "upgrade.disable-web": "true",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "tgl_admin",
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [
            "all",
            "mt",
            "temp"
        ],
        "mail_sendmailmode": "smtp",
        "loglevel": 0,
        "maintenance": false,
        "skeletondirectory": "\/var\/www\/html\/data\/skeleton-tgc",
        "knowledgebaseenabled": false,
        "integrity.check.disabled": true,
        "default_phone_region": "NL",
        "profile.enabled": false,
        "enable_previews": true,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Movie",
            "2": "OC\\Preview\\MKV",
            "3": "OC\\Preview\\MP4",
            "4": "OC\\Preview\\AVI",
            "5": "OC\\Preview\\PNG",
            "6": "OC\\Preview\\JPEG",
            "7": "OC\\Preview\\GIF",
            "8": "OC\\Preview\\BMP",
            "9": "OC\\Preview\\XBitmap",
            "10": "OC\\Preview\\MP3",
            "11": "OC\\Preview\\TXT",
            "12": "OC\\Preview\\MarkDown",
            "13": "OC\\Preview\\OpenDocument",
            "14": "OC\\Preview\\Krita",
            "15": "OC\\Preview\\Illustrator",
            "16": "OC\\Preview\\HEIC",
            "17": "OC\\Preview\\Photoshop",
            "18": "OC\\Preview\\StarOffice",
            "19": "OC\\Preview\\SVG",
            "20": "OC\\Preview\\TIFF",
            "21": "OC\\Preview\\Font"
        },
        "onlyoffice": {
            "editors_check_interval": 0
        }
    }
}

Web server error log

No response

Log file

[dav] Warning: Sabre\VObject\ParseException: This parser only supports VCARD and VCALENDAR files at <<closure>>

0. /var/www/html/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 90
   Sabre\VObject\Parser\MimeDir->parseDocument()
1. /var/www/html/3rdparty/sabre/vobject/lib/Reader.php line 47
   Sabre\VObject\Parser\MimeDir->parse()
2. /var/www/html/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php line 247
   Sabre\VObject\Reader::read()
3. /var/www/html/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php line 86
   OCA\DAV\CalDAV\WebcalCaching\RefreshWebcalService->queryWebcalFeed()
4. /var/www/html/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php line 115
   OCA\DAV\CalDAV\WebcalCaching\RefreshWebcalService->refreshSubscription()
5. /var/www/html/lib/public/BackgroundJob/Job.php line 81
   OCA\DAV\BackgroundJob\RefreshWebcalJob->run()
6. /var/www/html/lib/public/BackgroundJob/Job.php line 67
   OCP\BackgroundJob\Job->start()
7. /var/www/html/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php line 108
   OCP\BackgroundJob\Job->execute()
8. /var/www/html/cron.php line 152
   OCA\DAV\BackgroundJob\RefreshWebcalJob->execute()

at 2024-08-06T10:21:03+02:00

[dav] Warning: InvalidArgumentException: SSL CA bundle not found: /tmp/oc_tmp_lf2KBf-.crt at <<closure>>

 0. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 59
    GuzzleHttp\Handler\CurlFactory->applyHandlerOptions()
 1. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/CurlHandler.php line 43
    GuzzleHttp\Handler\CurlFactory->create("*** sensitive parameters replaced ***")
 2. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 28
    GuzzleHttp\Handler\CurlHandler->__invoke()
 3. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Handler/Proxy.php line 48
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 4. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 256
    GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 240
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 6. /var/www/html/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php line 35
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 7. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 31
    GuzzleHttp\PrepareBodyMiddleware->__invoke()
 8. /var/www/html/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php line 71
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
 9. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Middleware.php line 63
    GuzzleHttp\RedirectMiddleware->__invoke()
10. /var/www/html/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php line 75
    GuzzleHttp\Middleware::GuzzleHttp\{closure}("*** sensitive parameters replaced ***")
11. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 331
    GuzzleHttp\HandlerStack->__invoke()
12. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 168
    GuzzleHttp\Client->transfer()
13. /var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php line 187
    GuzzleHttp\Client->requestAsync("*** sensitive parameters replaced ***")
14. /var/www/html/lib/private/Http/Client/Client.php line 230
    GuzzleHttp\Client->request()
15. /var/www/html/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php line 214
    OC\Http\Client\Client->get()
16. /var/www/html/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php line 86
    OCA\DAV\CalDAV\WebcalCaching\RefreshWebcalService->queryWebcalFeed()
17. /var/www/html/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php line 115
    OCA\DAV\CalDAV\WebcalCaching\RefreshWebcalService->refreshSubscription()
18. /var/www/html/lib/public/BackgroundJob/Job.php line 81
    OCA\DAV\BackgroundJob\RefreshWebcalJob->run()
19. /var/www/html/lib/public/BackgroundJob/Job.php line 67
    OCP\BackgroundJob\Job->start()
20. /var/www/html/apps/dav/lib/BackgroundJob/RefreshWebcalJob.php line 108
    OCP\BackgroundJob\Job->execute()
21. /var/www/html/cron.php line 152
    OCA\DAV\BackgroundJob\RefreshWebcalJob->execute()

at 2024-08-06T11:51:04+02:00

Browser log

No response

Additional info

We first encountered this issue in Nextcloud v25 with the 4.6.8 calendar app. We had a upgrade scheduled and found no issues upgrading to 26 and then to 27 but the same issue persists. Most of the calendars are shared internally. When looking at the calendars in the webinterface, the shared calendars seem to perpetually load while the 'personal' calendar does not.

tcitworld commented 3 months ago

Can you try to provide browser logs as well? Open F12 before accessing the app.

Julia-TGC commented 3 months ago

calendar-app-browser.log

Ah, I checked it with the app already open, and it didn't show me any errors, so I did not add it. It did this time. See attached.

Nuube commented 4 days ago

I can confirm the bug. I have the same issue on Nextcloud Hub 9 (30.0.2) and Calendar 5.5 on Docker.

When calling the calendar weekly overview the browser page freezes. It is not even possible to open the developer console with F12 (That's why console logs can not be provided).

I accessed my calendar with Windows Firefox and Edge on one computer, Windows Vivaldi and Edge on another, and Linux Vivaldi as a third option. In every case the browser tabs freezes completely and can only be closed.

I even installed a new Nextcloud AiO on Docker. I migrated the user using the user migration add on using the occ command line for export and import. The user migration includes the migration of the calendars. After importing the user in the new AiO system I have the same behavior in the AiO (freezing of the tab).

I am not much of a programmer, but I can't imagine to much scenarios where a browser tab would become completely unresponsive. Most likely a "while" statement in the calendar app which never reaches it abortion condition? Caused by an odd entry in the calendar database?

Since the calendar is the mostly used app it would be nice to find a solution soon.

I had the same issue with the calendar dashboard app (see #5063) which solved itself after a couple of weeks, However, the issue seems to regularly showing up again (#4921, #4758, #4736, #4036 and #3551)

I took a look at the solution suggested in #3858 but I don't have any entries with {DAV:}resourcetype in oc_properties