Tasks: Tasks don't save properly

Created on 11 Feb 2019  路  17Comments  路  Source: nextcloud/tasks

Hello,

Steps to reproduce

  1. Create a new task
  2. Fill all the informations you want (more than one)
  3. Leave the task completely and then go back to it

Expected behaviour

Task has been saved and displays all of the informations that have been filled in the fields

Actual behaviour

Task has saved only one field at best and all other fields are blank

Server configuration

Operating system: Ubuntu 18.04.2 LTS

Web server: Apache 2.4.29

Database: MariaDB 10.2.21

PHP version: 7.2.10 (libapache_mod_php)

Nextcloud version: (see Nextcloud admin page) 15.0.4

Tasks version: (see Nextcloud apps page) 0.9.8

Updated from an older Nextcloud or fresh install: Fresh install

Signing status:

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
No errors have been found.

List of activated apps:

Enabled:
  - accessibility: 1.1.0
  - activity: 2.8.2
  - admin_audit: 1.5.0
  - announcementcenter: 3.4.1
  - cloud_federation_api: 0.1.0
  - comments: 1.5.0
  - dav: 1.8.1
  - deck: 0.5.2
  - federatedfilesharing: 1.5.0
  - federation: 1.5.0
  - files: 1.10.0
  - 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
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - onlyoffice: 2.1.2
  - password_policy: 1.5.0
  - polls: 0.9.5
  - provisioning_api: 1.5.0
  - radio: 0.6.4
  - registration: 0.4.5
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - spreed: 5.0.2
  - support: 1.0.0
  - survey_client: 1.3.0
  - systemtags: 1.5.0
  - tasks: 0.9.8
  - theming: 1.6.0
  - twofactor_backupcodes: 1.4.1
  - updatenotification: 1.5.0
  - workflowengine: 1.5.0
Disabled:
  - contacts
  - encryption
  - files_external
  - user_ldap

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.brownfields.in-cubes.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "15.0.4.0",
        "overwrite.cli.url": "https:\/\/cloud.brownfields.in-cubes.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "trashbin_retention_obligation": "auto, 90",
        "skeletondirectory": "\/home\/default",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser:

Google Chrome | 71.0.3578.98聽(Official Build)聽(64-bit)聽(cohort: Stable)
-- | --
Revision | 15234034d19b85dcd9a03b164ae89d04145d8368-refs/branch-heads/3578@{#897}
OS | Windows
JavaScript | V8聽7.1.302.31

Operating system:
Windows7, windows 10

CalDAV-clients:

Logs

Web server error log

Webserver logs holds no particular error.

Nextcloud log (data/nextcloud.log)

Nextcloud log holds no error relating to the **tasks** app

Browser log

Java script log, the errors occurs everytime I leave a field after input

Navigated to https://cloud.brownfields.in-cubes.com/index.php/apps/tasks/
VM1388 core.js:7 JQMIGRATE: Migrate is installed, version 1.4.0
VM1388 core.js:20 Deprecation warning: use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.
w @ VM1388 core.js:20
y @ VM1388 core.js:20
_a @ VM1388 core.js:20
$a @ VM1388 core.js:20
(anonymous) @ VM1410 merged.js:1977
invoke @ VM1410 merged.js:41
(anonymous) @ VM1410 merged.js:43
q @ VM1410 merged.js:7
bb @ VM1410 merged.js:43
c @ VM1410 merged.js:21
yc @ VM1410 merged.js:21
ee @ VM1410 merged.js:20
(anonymous) @ VM1410 merged.js:313
j @ VM1388 core.js:2
fireWith @ VM1388 core.js:2
ready @ VM1388 core.js:2
I @ VM1388 core.js:2
VM1388 core.js:3226 PUT https://cloud.brownfields.in-cubes.com/remote.php/dav/calendars/next-adm/personal/Nextcloud-s8d47ofls1kq0t995hcq7r.ics 412 (Precondition failed)
request @ VM1388 core.js:3226
update @ VM1410 merged.js:1977
i.doUpdate @ VM1410 merged.js:1977
i.setStart @ VM1410 merged.js:1977
i.initStartDate @ VM1410 merged.js:1977
_$scope.editStart @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:249
b @ VM1410 merged.js:125
e @ VM1410 merged.js:272
$eval @ VM1410 merged.js:144
$apply @ VM1410 merged.js:145
(anonymous) @ VM1410 merged.js:272
dispatch @ VM1388 core.js:3
r.handle @ VM1388 core.js:3
VM1388 core.js:3226 PUT https://cloud.brownfields.in-cubes.com/remote.php/dav/calendars/next-adm/personal/Nextcloud-s8d47ofls1kq0t995hcq7r.ics 412 (Precondition failed)
request @ VM1388 core.js:3226
update @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:158
e @ VM1410 merged.js:45
(anonymous) @ VM1410 merged.js:48
setTimeout (async)
Yf.k.defer @ VM1410 merged.js:48
f @ VM1410 merged.js:158
i.triggerUpdate @ VM1410 merged.js:1977
_$scope.triggerUpdate @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:249
$eval @ VM1410 merged.js:144
(anonymous) @ VM1410 merged.js:271
(anonymous) @ VM1410 merged.js:284
q @ VM1410 merged.js:7
$$writeModelToScope @ VM1410 merged.js:283
(anonymous) @ VM1410 merged.js:283
g @ VM1410 merged.js:281
e @ VM1410 merged.js:281
$$runValidators @ VM1410 merged.js:282
$$parseAndValidate @ VM1410 merged.js:283
$commitViewValue @ VM1410 merged.js:282
(anonymous) @ VM1410 merged.js:284
$eval @ VM1410 merged.js:144
$apply @ VM1410 merged.js:145
$$debounceViewValueCommit @ VM1410 merged.js:284
$setViewValue @ VM1410 merged.js:284
l @ VM1410 merged.js:176
dispatch @ VM1388 core.js:3
r.handle @ VM1388 core.js:3
VM1388 core.js:3226 PUT https://cloud.brownfields.in-cubes.com/remote.php/dav/calendars/next-adm/personal/Nextcloud-s8d47ofls1kq0t995hcq7r.ics 412 (Precondition failed)
request @ VM1388 core.js:3226
update @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:158
e @ VM1410 merged.js:45
(anonymous) @ VM1410 merged.js:48
setTimeout (async)
Yf.k.defer @ VM1410 merged.js:48
f @ VM1410 merged.js:158
i.triggerUpdate @ VM1410 merged.js:1977
i.setPercentComplete @ VM1410 merged.js:1977
_$scope.setPercentComplete @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:249
$eval @ VM1410 merged.js:144
(anonymous) @ VM1410 merged.js:271
(anonymous) @ VM1410 merged.js:284
q @ VM1410 merged.js:7
$$writeModelToScope @ VM1410 merged.js:283
(anonymous) @ VM1410 merged.js:283
g @ VM1410 merged.js:281
e @ VM1410 merged.js:281
$$runValidators @ VM1410 merged.js:282
$$parseAndValidate @ VM1410 merged.js:283
$commitViewValue @ VM1410 merged.js:282
(anonymous) @ VM1410 merged.js:284
$eval @ VM1410 merged.js:144
$apply @ VM1410 merged.js:145
$$debounceViewValueCommit @ VM1410 merged.js:284
$setViewValue @ VM1410 merged.js:284
l @ VM1410 merged.js:176
dispatch @ VM1388 core.js:3
r.handle @ VM1388 core.js:3
VM1388 core.js:3226 PUT https://cloud.brownfields.in-cubes.com/remote.php/dav/calendars/next-adm/personal/Nextcloud-s8d47ofls1kq0t995hcq7r.ics 412 (Precondition failed)
request @ VM1388 core.js:3226
update @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:158
e @ VM1410 merged.js:45
(anonymous) @ VM1410 merged.js:48
setTimeout (async)
Yf.k.defer @ VM1410 merged.js:48
f @ VM1410 merged.js:158
i.triggerUpdate @ VM1410 merged.js:1977
_$scope.triggerUpdate @ VM1410 merged.js:1977
(anonymous) @ VM1410 merged.js:249
$eval @ VM1410 merged.js:144
(anonymous) @ VM1410 merged.js:271
(anonymous) @ VM1410 merged.js:284
q @ VM1410 merged.js:7
$$writeModelToScope @ VM1410 merged.js:283
(anonymous) @ VM1410 merged.js:283
g @ VM1410 merged.js:281
e @ VM1410 merged.js:281
$$runValidators @ VM1410 merged.js:282
$$parseAndValidate @ VM1410 merged.js:283
$commitViewValue @ VM1410 merged.js:282
(anonymous) @ VM1410 merged.js:284
$eval @ VM1410 merged.js:144
$apply @ VM1410 merged.js:145
$$debounceViewValueCommit @ VM1410 merged.js:284
$setViewValue @ VM1410 merged.js:284
l @ VM1410 merged.js:176
dispatch @ VM1388 core.js:3
r.handle @ VM1388 core.js:3

I'm available if further informations needs to be provided.
Regards,

bug

Most helpful comment

Btw, without an ETag send properly, Contacts will also not work.

All 17 comments

This should be fixed in master with #194. Could you please test the current alpha build: https://github.com/nextcloud/tasks/issues/270#issuecomment-462764100

Thank you,

I just installed the alpha build of the app on our server, we're gonna try it and come back to you to tell whether or not it fixed the issue

Regards.

Sadly after testing I have to report that the issue is still occuring, despite the new icons showing the state of save at every step and saying everything went OK.

We still can't seem to get more than the first item modified to be saved, if it can be of any help below is some Console output from my browser:

This one seems to happen everytime a second item is modified (eg: you modify one field, ok, once you modify a second field and are done then this appear):

VM969 tasks.js:7 PUT https://cloud.brownfields.in-cubes.com/remote.php/dav/calendars/next-adm/test01/F703173A-5272-4C5E-88B2-33468F46B1BA.ics 412 (Precondition failed)
(anonymous) @ VM969 tasks.js:7
_ @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
t.(anonymous function) @ VM969 tasks.js:7
Z @ VM969 tasks.js:7
a @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
_ @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
t.(anonymous function) @ VM969 tasks.js:7
Z @ VM969 tasks.js:7
a @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
_ @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
t.(anonymous function) @ VM969 tasks.js:7
ut @ VM969 tasks.js:7
a @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:339
_ @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
t.(anonymous function) @ VM969 tasks.js:7
_r @ VM969 tasks.js:339
a @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:312
d.dispatch @ VM969 tasks.js:312
dispatch @ VM969 tasks.js:312
(anonymous) @ VM969 tasks.js:339
_ @ VM969 tasks.js:7
(anonymous) @ VM969 tasks.js:7
t.(anonymous function) @ VM969 tasks.js:7
_r @ VM969 tasks.js:339
a @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:339
(anonymous) @ VM969 tasks.js:312
d.dispatch @ VM969 tasks.js:312
dispatch @ VM969 tasks.js:312
n.(anonymous function) @ VM969 tasks.js:312
setProperty @ VM969 tasks.js:339
finishEditing @ VM969 tasks.js:339
value @ VM969 tasks.js:339
o @ VM969 tasks.js:7

This error appears as well from time to time but I can't tell what makes it occur:

VM1125 tasks.js:7 TypeError: Cannot read property 'then' of undefined
    at a.react (VM1125 tasks.js:339)
    at Vt (VM1125 tasks.js:7)
    at HTMLDivElement.n (VM1125 tasks.js:7)
    at HTMLDivElement.o._wrapper (VM1125 tasks.js:7)
Ut @ VM1125 tasks.js:7
Ht @ VM1125 tasks.js:7
zt @ VM1125 tasks.js:7
Vt @ VM1125 tasks.js:7
n @ VM1125 tasks.js:7
o._wrapper @ VM1125 tasks.js:7

Still no obvious error in the nextcloud or apache and php logs tho
Again, I'm available if further information or testing is needed

Regards.

Hm, the fact that it happens with both Tasks versions lets me think that the server must be involved in the problem somehow. The 412 (precondition failed) points into the same direction.

I have a couple of questions, would be great if you could answer them. :)

  • Does the same problem also occur for other apps like Calendar or Contacts? As of version 3.0.0, Contacts uses the same library as Tasks 0.10.0-alpha1 for communication with the server. Calendar 1.x.x instead uses the same approach as Tasks 0.9.8, so this might be a good hint.

  • You wrote, that the green checkmark appears, although the change was not saved? Could you confirm that, please? The checkmark should only appear when the change was saved correctly to the server.

  • Could you please post the browser network log for the requests that occur when you create a task until the first failed saving attempt?

Also, if it would be ok for you to grant me a user account to your server for testing, this might simplify things a bit. If it is ok with you, write me an email, please. If not thats perfectly fine as well. :)

Your problem could be the same as #167. Maybe https://github.com/nextcloud/tasks/issues/167#issuecomment-442432403 helps?

Hey,

Thanks for your answers, my turn:

I will create a non administrative user for you to test it and send you the details in an email.

I just looked into the comment you linked but I don't have the configuration that seemed to be problematic in the first place nor a "If-None-Math" or "If-Match" Header

Regards.

@lencell Thanks a lot for the account, I had a look at the problem now.

When I create a task, the creation goes well, the next request to change the tasks properties goes fine as well, but the second request to change the tasks properties fails. I then see a reload button, indicating that changing the task failed (This is the expected behaviour when a request failed). See:

screenshot_2019-02-13 tasks - privatecloud

The reason that this fails is that your server for some reason does not answer with an ETag, whereas it should:
unbenannt

It does send the OC-ETag though, which has the same value as the ETag but is not interpreted by the Nextcloud CalDAV library.

I don't really know, why your server does not answer with an ETag. I still guess there is a weird configuration issue with your server that strips off the ETag.

Maybe @skjnldsv or @georgehrke have an idea?

Btw, without an ETag send properly, Contacts will also not work.

There is a reverse proxy in front of the web server that does remove the ETag header from the response before sending it back to the client(although the server does answer with it)
I'll change this and tell you if it fixes this issue

Ok, I removed the configuration that stripped the ETag header and it looks like both tasks and contacts apps are working properly now.
I'll have the users try it too and confirm that everything is ok but it looks good so far.
I'll let the account I created for you active a few more days if you want to perform tests on your side too.

I would also like to thank you for the excellent help you provided to us!

Good to hear it works now and glad I could help.

While debugging I just realised there is another issue. While a request is running and you change a tasks property, the second request will fail, because the first one will lead to a change of the ETag which the second request does not know yet. So for now, you have to make sure to let the first request finish, before changing the next property. I will create an issue for that: https://github.com/nextcloud/tasks/issues/275.

@lencell Feel free to close this issue when your users confirm it is working.

They seem to say everything is ok now, closing.

Regards.

Ok, I removed the configuration that stripped the ETag header and it looks like both tasks and contacts apps are working properly now.
I'll have the users try it too and confirm that everything is ok but it looks good so far.
I'll let the account I created for you active a few more days if you want to perform tests on your side too.

I would also like to thank you for the excellent help you provided to us!

@lencell Could you tell me how to do that? I have the very same problem.

Hi, I can't tell you specifcly for your setup, for the ETag HTTP header to be stripped you would have to specifically configure either your web server or the software that is in front of it (reverse proxy or any other software that had access to the layer 7) to do that, so if you or the person(s) who installed the server(s) your nextcloud relies on don't know how to undo this configuration it's probably not the cause of your problem. (Unless you copy pasted some configuration without checking it)

Are you sure that the ETag header is removed from the HTTP responses ?

If they're not removed, maybe try updating your app and if it still does not work I think the best thing to do would be to open another issue.

I麓m not sure, how can I check it? Think that I don麓t have much server/programming knowledge. I have Nextcloud installed thanks to Softaculous.
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Valdnet picture Valdnet  路  7Comments

janvonde picture janvonde  路  8Comments

raimund-schluessler picture raimund-schluessler  路  8Comments

rullzer picture rullzer  路  6Comments

tschiu picture tschiu  路  3Comments