calendar icon indicating copy to clipboard operation
calendar copied to clipboard

Maximum call stack exceeded when clicking the `Show more events` heading link

Open skjnldsv opened this issue 1 year ago • 6 comments

Steps to reproduce

  1. Have multiple day events
  2. See the xxx more events button
  3. Click on it 2024-01-02_14-30

Expected behavior

  • Popup opens instantly

Actual behaviour

  • Nothing happens first
  • After a while (2-3 minutes) the popup opens with a console error
  • The UI gets frozen

Calendar app version

5.6.1

CalDAV-clients used

No response

Browser

Brave version 1.60.125 Chromium: 119.0.6045.199 (Build officiel) (64 bits)

Client operating system

Arch btw

Server operating system

No response

Web server

None

Database engine version

None

PHP engine version

None

Nextcloud version

28.0.1

Updated from an older installed version or fresh install

None

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

sentry.js?v=a0438487-1764:2 Uncaught RangeError: Maximum call stack size exceeded
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
    at Vh.handleInvalidInsertion (internal.js:414:22)
    at Vh.insertEntry (internal-common.js:5765:21)
    at Vh.splitEntry (internal-common.js:5792:29)
    at Vh.handleInvalidInsertion (internal-common.js:5774:25)
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
splitEntry	@	internal-common.js:5792
handleInvalidInsertion	@	internal-common.js:5774
handleInvalidInsertion	@	internal.js:414
insertEntry	@	internal-common.js:5765
setTimeout (async)		
(anonymous)	@	sentry.js?v=a0438487-1764:2
l	@	index.js:23
r	@	sentry.js?v=a0438487-1764:2
setTimeout (async)		
(anonymous)	@	sentry.js?v=a0438487-1764:2
l	@	index.js:23
r	@	sentry.js?v=a0438487-1764:2
setTimeout (async)		
(anonymous)	@	sentry.js?v=a0438487-1764:2
c

Browser log

No response

Additional info

No response

skjnldsv avatar Jan 02 '24 13:01 skjnldsv

Now I also get this on creating any event. Browsing weeks is inpossible.

Calendar 4.6.5 with 28.0.3rc2

cc @nextcloud/groupware

skjnldsv avatar Feb 28 '24 17:02 skjnldsv

Sadly, this is known.

Please don't ping the full team. @miaulalala is monitoring new tickets in this repo :pray:

ChristophWurst avatar Feb 28 '24 18:02 ChristophWurst

@st3iny is https://github.com/nextcloud/calendar/issues/2960 back?

ChristophWurst avatar Feb 28 '24 18:02 ChristophWurst

Certainly looks a bit like it:

Brave version 1.60.125 Chromium

Would be interesting to see if the recently merged update of FC fixes this.

st3iny avatar Feb 28 '24 21:02 st3iny

To simulate a lot of data/events

1h events

#!/bin/bash

CREATED_AT=$(TZ=UTC date +"%Y%m%dT%H%M%SZ")

# Header
cat <<ICS
BEGIN:VCALENDAR
PRODID:-//IDN nextcloud.com//Calendar app 4.7.0-beta.4//EN
CALSCALE:GREGORIAN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Vienna
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
ICS

# Events
for i in {1..1000}
do
  EVENT_UID=$(LC_ALL=C tr -dc a-f0-9 </dev/urandom | head -c 32)
  DTSTART=$(TZ=Europe/Vienna date -d "2024-03-01 - 1 hour + $i hours" +"%Y%m%dT%H%M%S")
  DTEND=$(TZ=Europe/Vienna date -d "2024-03-01 + $i hours" +"%Y%m%dT%H%M%S")

  cat <<ICS
BEGIN:VEVENT
CREATED:${CREATED_AT}
DTSTAMP:${CREATED_AT}
LAST-MODIFIED:${CREATED_AT}
SEQUENCE:0
UID:${EVENT_UID}
DTSTART;TZID=Europe/Vienna:${DTSTART}
DTEND;TZID=Europe/Vienna:${DTEND}
STATUS:CONFIRMED
SUMMARY:Test ${i}
END:VEVENT
ICS
done

# Footer
cat <<ICS
END:VCALENDAR
ICS

Full day events

#!/bin/bash

CREATED_AT=$(TZ=UTC date +"%Y%m%dT%H%M%SZ")

# Header
cat <<ICS
BEGIN:VCALENDAR
PRODID:-//IDN nextcloud.com//Calendar app 4.7.0-beta.4//EN
CALSCALE:GREGORIAN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Vienna
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
ICS

# Events
for i in {1..1000}
do
  EVENT_UID=$(LC_ALL=C tr -dc a-f0-9 </dev/urandom | head -c 32)
  DTSTART=$(TZ=Europe/Vienna date -d "2024-03-01 - 1 hour + $i hours" +"%Y%m%d")
  DTEND=$(TZ=Europe/Vienna date -d "2024-03-01 + $i hours" +"%Y%m%d")

  cat <<ICS
BEGIN:VEVENT
CREATED:${CREATED_AT}
DTSTAMP:${CREATED_AT}
LAST-MODIFIED:${CREATED_AT}
SEQUENCE:0
UID:${EVENT_UID}
DTSTART;TZID=Europe/Vienna:${DTSTART}
DTEND;TZID=Europe/Vienna:${DTEND}
STATUS:CONFIRMED
SUMMARY:Test ${i}
END:VEVENT
ICS
done

# Footer
cat <<ICS
END:VCALENDAR
ICS

however, it doesn't allow me to reproduce the Maximum call stack exceeded bug on Firefox or Chromium.

Edit: testing the state before https://github.com/nextcloud/calendar/pull/5783 for comparison.

ChristophWurst avatar Mar 21 '24 08:03 ChristophWurst

I can also not reproduce this with a build before https://github.com/nextcloud/calendar/pull/5783.

ChristophWurst avatar Mar 21 '24 08:03 ChristophWurst