Task lists are hiding themselves since 0.10.0
Steps to reproduce
Load Tasks page, as the page loads, the first few lists disappear and are somehow unavailable. This occurred after the 0.10.0 release.
Expected behaviour
All task lists make themselves available.
Actual behaviour
Task lists are somehow hiding themselves. Screencast of it happening.
Server configuration detail
Operating system: Linux 4.19.0-2-amd64 #1 SMP Debian 4.19.16-1 (2019-01-17) x86_64
Webserver: Apache/2.4.38 (Debian) (fpm-fcgi)
Database: mysql 10.3.14
PHP version:
7.3.4-2 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, sodium, standard, cgi-fcgi, mysqlnd, PDO, xml, apcu, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, exif, msgpack, mysqli, pdo_mysql, apc, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Phar, memcached, Zend OPcache
Nextcloud version: 15.0.7 - 15.0.7.0
Updated from an older Nextcloud/ownCloud or fresh install: Updated
Where did you install Nextcloud from: unknown
Signing status
Array ( )
List of activated apps
Enabled:
- accessibility: 1.1.0
- activity: 2.8.2
- admin_audit: 1.5.0
- bruteforcesettings: 1.3.0
- calendar: 1.6.5
- cloud_federation_api: 0.1.0
- comments: 1.5.0
- contacts: 3.1.1
- dav: 1.8.1
- federatedfilesharing: 1.5.0
- federation: 1.5.0
- files: 1.10.0
- files_external: 1.6.0
- files_markdown: 2.0.6
- files_pdfviewer: 1.4.0
- files_sharing: 1.7.0
- files_texteditor: 2.7.0
- files_trashbin: 1.5.0
- files_versions: 1.8.0
- files_videoplayer: 1.4.0
- firstrunwizard: 2.4.0
- gallery: 18.2.0
- issuetemplate: 0.5.0
- logreader: 2.0.0
- lookup_server_connector: 1.3.0
- mail: 0.11.1
- music: 0.9.5
- nextcloud_announcements: 1.4.0
- notes: 2.6.0
- notifications: 2.3.0
- oauth2: 1.3.0
- ocdownloader: 1.7.0
- password_policy: 1.5.0
- previewgenerator: 2.1.0
- provisioning_api: 1.5.0
- serverinfo: 1.5.0
- sharebymail: 1.5.0
- support: 1.0.0
- survey_client: 1.3.0
- systemtags: 1.5.0
- tasks: 0.10.0
- theming: 1.6.0
- twofactor_backupcodes: 1.4.1
- twofactor_totp: 2.1.2
- updatenotification: 1.5.0
- workflowengine: 1.5.0
Disabled:
- encryption
- phonetrack
- spreed
- user_ldap
Configuration (config/config.php)
{
"instanceid": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\APCu",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nc.anpmech.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https:\/\/nc.anpmech.com",
"dbtype": "mysql",
"version": "15.0.7.0",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": "",
"loglevel": 2,
"mail_smtpsecure": "ssl",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mysql.utf8mb4": true,
"twofactor_enforced": "false",
"twofactor_enforced_groups": [],
"twofactor_enforced_excluded_groups": []
}
Are you using external storage, if yes which one: local
Are you using encryption:
Are you using an external user-backend, if yes which one: None
Client configuration
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Operating system: Debian
Logs
Web server error log
Nothing pertinent.
Nextcloud log
Empty
Browser log
JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542 New search handler registered search.js:67:4 RangeError: "invalid array length" St VueJS tasks calendars.js:280 appendTasksToCalendar calendars.js:276 y vuex.esm.js:714 commit vuex.esm.js:382 commit vuex.esm.js:381 _withCommit vuex.esm.js:512 commit vuex.esm.js:380 commit vuex.esm.js:325 t calendars.js:507 P ncvuecomponents.js:211 P ncvuecomponents.js:211 u ncvuecomponents.js:211 calendars.js:516:4 t calendars.js:516 P ncvuecomponents.js:211 P ncvuecomponents.js:211 u ncvuecomponents.js:211 RangeError: "invalid array length" St VueJS tasks calendars.js:280 appendTasksToCalendar calendars.js:276 y vuex.esm.js:714 commit vuex.esm.js:382 commit vuex.esm.js:381 _withCommit vuex.esm.js:512 commit vuex.esm.js:380 commit vuex.esm.js:325 t calendars.js:507 P ncvuecomponents.js:211 P ncvuecomponents.js:211 u ncvuecomponents.js:211 calendars.js:516:4 RangeError: "invalid array length" St VueJS tasks calendars.js:280 appendTasksToCalendar calendars.js:276 y vuex.esm.js:714 commit vuex.esm.js:382 commit vuex.esm.js:381 _withCommit vuex.esm.js:512 commit vuex.esm.js:380 commit vuex.esm.js:325 t calendars.js:507 P ncvuecomponents.js:211 P ncvuecomponents.js:211 u ncvuecomponents.js:211 calendars.js:516:4
Does this happen for all lists or only a few (I couldn’t watch the screencast on my phone, will do so later)? If it’s only a few, is there a difference between them (like shared from other user)?
It happens for a few, only. They're shared with my wife. But a third one, that's not disappearing, is also shared with her if I remember correctly (I can't remember how I can verify this).
Could you please have a look in the network tab, whether the requests to these calendars succeed?
It all looks good, I've got photos of the networks tab here, in case my eyeballs missed it (ignore the name, I meant tasks ;)):
https://nc.anpmech.com/index.php/s/LpAaqzEaDqXNzBX
Hm, looks fine indeed.
@skjnldsv Do you have an idea why
RangeError: "invalid array length"
St VueJS
tasks calendars.js:280
appendTasksToCalendar calendars.js:276
might occur here https://github.com/nextcloud/tasks/blob/master/src/store/calendars.js#L274-L284
Hum.
Could come from calendar.tasks? What is the initial value here?
If the array is badly initiated, the reduce would likely fail! :thinking:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length
This should be an empty array https://github.com/nextcloud/tasks/blob/master/src/store/calendars.js#L75.
@avuton Would it be possible, that you provide the response body of one of the failing calendars? You can find this in the network tab under response. Don't forget to remove any sensitive value! It should look something like this:
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/calendars/raimund.schluessler/**sensitive_value**.ics</d:href><d:propstat><d:prop><d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype><d:getetag>"3a27634bff0c99a93b40f8c1679f266d"</d:getetag><d:resourcetype/><d:owner><d:href>/remote.php/dav/principals/users/raimund.schluessler/</d:href></d:owner><d:current-user-privilege-set><d:privilege><d:write/></d:privilege><d:privilege><d:write-properties/></d:privilege><d:privilege><d:write-content/></d:privilege><d:privilege><d:unlock/></d:privilege><d:privilege><d:write-acl/></d:privilege><d:privilege><d:read/></d:privilege><d:privilege><d:read-acl/></d:privilege><d:privilege><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Nextcloud Tasks v0.10.0-alpha1
BEGIN:VTODO
UID:b1bef459-4703-43e1-9147-940ea04f583b
CREATED:20190315T164115
LAST-MODIFIED:20190326T212409
DTSTAMP:20190326T212409
SUMMARY:**sensitive_value**
DESCRIPTION:**sensitive_value**
END:VTODO
END:VCALENDAR
</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:displayname/><d:sync-token/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/calendars/raimund.schluessler/**sensitive_value**</d:href><d:propstat><d:prop><d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype><d:getetag>"7c64f09b699703e5aa6c6e8530d50474"</d:getetag><d:resourcetype/><d:owner><d:href>/remote.php/dav/principals/users/raimund.schluessler/</d:href></d:owner><d:current-user-privilege-set><d:privilege><d:write/></d:privilege><d:privilege><d:write-properties/></d:privilege><d:privilege><d:write-content/></d:privilege><d:privilege><d:unlock/></d:privilege><d:privilege><d:write-acl/></d:privilege><d:privilege><d:read/></d:privilege><d:privilege><d:read-acl/></d:privilege><d:privilege><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Nextcloud Tasks vundefined
BEGIN:VTODO
CREATED:20190130T141819
DTSTAMP:20190403T130700
LAST-MODIFIED:20190403T130700
UID:e3lbyy445k7
SUMMARY:**sensitive_value**
PRIORITY:1
PERCENT-COMPLETE:0
X-OC-HIDESUBTASKS:0
DESCRIPTION:**sensitive_value**
END:VTODO
END:VCALENDAR
</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:displayname/><d:sync-token/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/calendars/raimund.schluessler/**sensitive_value**</d:href><d:propstat><d:prop><d:getcontenttype>text/calendar; charset=utf-8; component=vtodo</d:getcontenttype><d:getetag>"b283ab8d46561744a4aac26edf1120e0"</d:getetag><d:resourcetype/><d:owner><d:href>/remote.php/dav/principals/users/raimund.schluessler/</d:href></d:owner><d:current-user-privilege-set><d:privilege><d:write/></d:privilege><d:privilege><d:write-properties/></d:privilege><d:privilege><d:write-content/></d:privilege><d:privilege><d:unlock/></d:privilege><d:privilege><d:write-acl/></d:privilege><d:privilege><d:read/></d:privilege><d:privilege><d:read-acl/></d:privilege><d:privilege><d:read-current-user-privilege-set/></d:privilege></d:current-user-privilege-set><cal:calendar-data>BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Nextcloud Tasks v0.9.6
BEGIN:VTODO
CREATED:20180218T093340
DTSTAMP:20190205T162346
LAST-MODIFIED:20190205T162346
UID:d3duks5k1sd
SUMMARY:**sensitive_value**
PRIORITY:0
PERCENT-COMPLETE:0
X-OC-HIDESUBTASKS:0
DESCRIPTION:
STATUS:NEEDS-ACTION
END:VTODO
END:VCALENDAR</cal:calendar-data></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:displayname/><d:sync-token/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
Same problem here, only empty lists are visible. If I create a task (via mobile app) the list is hiding. When I set the task to completed (hence the list is empty again) the list reappears. Also If I click in an empty list of "show completed tasks" the list is hiding again. seems it's hiding as soon as there should be tasks displayed.
@weginet Does the list also disappear when you create a task with Tasks app? If not, it is probably a problem with the content of the task created by your mobile. I suspect that there is a problem with the tasks UID.
Could you please provide the ICS file of such a failing test calendar? You should be able to download it with the calendar app (but you also have to create the calendar in the Calendar app, otherwise it will not show up there).
I'm having the same issue and was able to trace it down a little bit. Lists start hiding once I edit a task in that list via https://tasks.org/
I manually compared the ics files and did some tests manually altering them. As it seems, the app uses a different UID format, leading to the error. I've added the example files as attachments. 866fe597-001f-47a4-bbdc-b2cc95f8d118.ics.txt is the modified working example, 2761239953758557110.ics.txt is the original file that breaks the UI. (.txt just added for upload here)
For upload you can use curl: curl -X PUT --data-binary '@/tmp/2761239953758557110.ics' 'https://
Ah, I see. These other clients use a all numbers UIDs which are then interpreted as Integers. When the UID is larger than 2^32 - 1 (e.g. 2761239953758557110 in your example), the array indexing will fail at https://github.com/nextcloud/tasks/blob/master/src/store/calendars.js#L280, thus leading to the error message RangeError: "invalid array length".
The fix shouldn't be difficult, I guess it should be enough to force the UID to be interpreted as a string. I will prepare a fix and release a bug fix version v0.10.1 soon.
Thanks @pzzz!
Edit: I can reproduce this now.
Sorry I didn't reply in a timely manner (sleep time here). Good to hear you can reproduce.
Thanks for reporting and for taking this up. I have the same issue. If any other debugging or tests are needed, I'll now be notified of changes to this issue.
#395 should fix this. Please test the version I provided in #395.
OK, I moved Nextcloud/apps/tasks to Nextcloud, untarballed 0.10.1, I verified the app was upgraded (under apps) and the problem persists :(. I've got nothing new to add, how can I help?
I tried the fix-394 branch, the problem persists there for me, as well.
Tried to bisect, ran into unrelated issues, maybe with downgrading? Meh.
@avuton Do you still get the same error message?
@avuton And could you maybe provide the ICS file of a task that makes the list disappear?