nextcloud / tasks

:white_check_mark: Tasks app for Nextcloud
https://apps.nextcloud.com/apps/tasks
GNU Affero General Public License v3.0
572 stars 99 forks source link

Trash Bin doesn't open #2609

Open DedRoller opened 3 months ago

DedRoller commented 3 months ago

Steps to reproduce

  1. Click on "Trash Bin" button in Tasks

Expected behavior

The trash bin interface should open

Actual behaviour

Entire interface become grey and inactive. Quit from greyed interface is possible only with refresh tab.

Tasks app version

0.16.0

CalDAV-clients used

-

Browser

Firefox 127.0.1

Client operating system

Windows, Manjaro

Server operating system

Debian

Web server

Nginx

Database engine version

MariaDB

PHP engine version

PHP 8.1

Nextcloud version

29.0.2

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

TypeError: this.component is null
    _ensureCoverage https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    utcOffset https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    utcOffset https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    toUnixTime https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    toJSDate https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    get jsDate https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    get https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    a https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    items https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    effect https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    run https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    get value https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    get https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    default https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    r https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    Tt https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    default https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    r https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    setup https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    o4 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ie https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    run https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    update https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    nA https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    promise callback*rA https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    $h https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    effect https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    Hh https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    fr https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    set https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    set https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    onShow https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    r https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    r0 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    Y9 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    onClick https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    onClick https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    r0 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    u https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
store-DE2z1cMA.mjs:2:15555
    N9 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    kc https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    o4 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ie https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    run https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    update https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    nA https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    (Asyncronous: promise callback)
    rA https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    $h https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    effect https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    Hh https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    fr https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    set https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    set https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    onShow https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    r https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    r0 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    Y9 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    onClick https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    onClick https://<my_nc_domain>/apps/tasks/js/tasks-main.mjs?v=f21fb9c7-87:2
    ua https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    r0 https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2
    u https://<my_nc_domain>/apps/tasks/js/store-DE2z1cMA.mjs:2

Additional info

No response

raimund-schluessler commented 3 months ago

I can reproduce it. Thanks for the report.

nRaecheR commented 3 months ago

Is there any way to clear the trash bin from the command line (occ) or without this dialog?

We've a task that has been duplicated (another bug?) and can't be deleted because it is already in the trash bin.

tamas646 commented 2 months ago

Hi! I have the same problem.

@nRaecheR task deletion issues used to be earlier too. See server/#37577. And I still experience duplication/deletion problems but now without sync errors. I think it's another bug. If I have time I will file a new issue or update the previous issue in the server repository.

tamas646 commented 2 months ago

@nRaecheR you can clear the trash bin from the Calendar app. They share a common database.

raimund-schluessler commented 2 months ago

For some reason I cannot reproduce the issue anymore. There was a server update to 29.0.4 in the meantime, but I don't know whether this is the reason.

DedRoller commented 2 months ago

Hm, i have updated my server to 29.0.4, but issue is reproducing in my case.

raimund-schluessler commented 2 months ago

@DedRoller Can you open the trash bin in the Calendar app?

raimund-schluessler commented 2 months ago

It could also be, that a certain, maybe broken task causes this issue, which got deleted on my instance after the 30 days retention period.

raimund-schluessler commented 2 months ago

@DedRoller I tried to guess a fix based on the log report above. It could be that toJSDate is the problem. An attempt to work around this is in #2637. I built and packed a version of Tasks including this fix, please find it here: tasks.tar.gz

It would be good if you could test if this fixes the issue for you. Thanks a lot!

ostasevych commented 2 months ago

@DedRoller I tried to guess a fix based on the log report above. It could be that toJSDate is the problem. An attempt to work around this is in #2637. I built and packed a version of Tasks including this fix, please find it here: tasks.tar.gz

It would be good if you could test if this fixes the issue for you. Thanks a lot!

2637 doesn't fix the trash bin being not working

raimund-schluessler commented 2 months ago

@ostasevych Could you please show the browser log when trying to open the trash bin?

ostasevych commented 2 months ago

@ostasevych Could you please show the browser log when trying to open the trash bin?

JQMIGRATE: Migrate is installed, version 3.4.1
session-heartbeat.js:154 session heartbeat disabled
store-BAR8kSTD.mjs:4342 vobjects loaded {vobjects: Array(2)}vobjects: (2) [qc, qc][[Prototype]]: Object

TypeError: Cannot read properties of null (reading 'getAllSubcomponents')
    at Proxy._ensureCoverage (store-BAR8kSTD.mjs:487:9589)
    at Proxy.utcOffset (store-BAR8kSTD.mjs:487:8306)
    at Proxy.utcOffset (store-BAR8kSTD.mjs:487:17606)
    at Proxy.toUnixTime (store-BAR8kSTD.mjs:487:19468)
    at Proxy.toJSDate (store-BAR8kSTD.mjs:487:18249)
    at get jsDate (store-BAR8kSTD.mjs:487:86275)
    at Reflect.get (<anonymous>)
    at NA.get (store-BAR8kSTD.mjs:2:8061)
    at tasks-main.mjs?v=ae27179c-95:5:8320
    at Array.map (<anonymous>)

See attached: nc-1722892684946.log

raimund-schluessler commented 2 months ago

Thanks for the report. It seems a function internal to a dependency we use (ical.js) fails. Could you please try again with this version of Tasks: tasks.tar.gz

I bumped ical.js to the latest version, maybe that fixes the problem.

ostasevych commented 2 months ago

Thanks for the report. It seems a function internal to a dependency we use (ical.js) fails. Could you please try again with this version of Tasks: tasks.tar.gz

I bumped ical.js to the latest version, maybe that fixes the problem.

Nothing changed, plus some style errors added :( nc_tasks-1722896202087.log

raimund-schluessler commented 2 months ago

I am a bit out ouf ideas what causes this issue, especially, since I cannot reproduce it on my instances (anymore). I could pack a debug version of the Tasks app, that might give some more meaningful error log messages. @ostasevych would you be ok to try such a version on your server? It won't be functionally different from the standard version, the files are just not compressed, so the loading times are a bit higher.

ostasevych commented 2 months ago

I am a bit out ouf ideas what causes this issue, especially, since I cannot reproduce it on my instances (anymore). I could pack a debug version of the Tasks app, that might give some more meaningful error log messages. @ostasevych would you be ok to try such a version on your server? It won't be functionally different from the standard version, the files are just not compressed, so the loading times are a bit higher.

Send me the file, please.

DedRoller commented 2 months ago

@DedRoller Can you open the trash bin in the Calendar app?

Yeah, i've cleared trash bin from callendar app, and tasks bin is working now! Thanks)

raimund-schluessler commented 2 months ago

@DedRoller Can you open the trash bin in the Calendar app?

Yeah, i've cleared trash bin from callendar app, and tasks bin is working now! Thanks)

Hm, so it seems to be a certain task, that crashes the trash bin. Would be good to know what property leads to the issue.

ostasevych commented 1 month ago

@DedRoller Can you open the trash bin in the Calendar app?

Yeah, i've cleared trash bin from callendar app, and tasks bin is working now! Thanks)

Hm, so it seems to be a certain task, that crashes the trash bin. Would be good to know what property leads to the issue.

Hi! I have identified the reason - it is about your availability.

raimund-schluessler commented 1 month ago

@DedRoller Can you open the trash bin in the Calendar app?

Yeah, i've cleared trash bin from callendar app, and tasks bin is working now! Thanks)

Hm, so it seems to be a certain task, that crashes the trash bin. Would be good to know what property leads to the issue.

Hi! I have identified the reason - it is about your availability.

* go to your personal settings

* add your absence time slot

* delete it

* find it in the calendar trash bin

* check that the tasks trash bin is not working

* delete the availability item from the calendar trash bin

* check that the task trash bin is working

You mean this? grafik

Deleting / deactivating does not generate a trash bin entry for me.

ostasevych commented 1 month ago

@DedRoller Can you open the trash bin in the Calendar app?

Yeah, i've cleared trash bin from callendar app, and tasks bin is working now! Thanks)

Hm, so it seems to be a certain task, that crashes the trash bin. Would be good to know what property leads to the issue.

Hi! I have identified the reason - it is about your availability.

* go to your personal settings

* add your absence time slot

* delete it

* find it in the calendar trash bin

* check that the tasks trash bin is not working

* delete the availability item from the calendar trash bin

* check that the task trash bin is working

You mean this? grafik

Deleting / deactivating does not generate a trash bin entry for me.

Yes, exactly this one. For me it worked... However, I didn't have other items in the trash bin. So, probably it is about emptying it in general 🤔

raimund-schluessler commented 2 weeks ago

I can now reproduce it (again). Having an all-day event in the trash bin triggers the issue. It does not happen for all-day tasks, though.