Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing nearly impossible - spinning wheel and "The contact you were trying to edit has changed" messages" #842

Closed
Bodenseematze opened this issue Jan 9, 2019 · 37 comments
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working
Milestone

Comments

@Bodenseematze
Copy link

Bodenseematze commented Jan 9, 2019

Describe the bug

Editing of fields in the mask lead to "changed" messages and the edited text will be discarded

To Reproduce
When adding a new contact or editing an existing one, I go into any of the editing fields and try to enter some text there.
A soon as I'm "slow" in editing, the spinner wheel in the top right corner of the mask appears, I assume to show me that it tries to sync the entered data with the data.
When I continue typing and don't wait until the spinning wheel disappears - the message "The contact you were trying to edit has changed. Please manually refresh the contact. Any further edits will be discarded" appears.
When I then click on that button to refresh the data one of the two following things happen:

  1. my entered / edited data get's cut somewhere and characters are missing and changes are rejected or
  2. everything seems to be fine (texts are completely shown) until I change to another contact and then back to the initial contact - then the entered data fields miss some of the changes

Expected behavior
Editing of text in the fields should be kept back until the input field will be changed - and then the spinning wheel may appear and transfer the changed text to the server.

Actual behavior
The spinning wheel occurs when the typing is not "fast" enough - it seems that it takes some time to transfer the data to the server; when typing / more changes occur in that time the message seems to occur...

Server configuration

The mentioned Issue Template app is not available for Nextcloud 15...

Operating system:
Server: Linux (Debian, Shared Hoster)
Client: Windows 10

Web server: Apache

Database: MariaDB 5.5.31

PHP version: 7.1.2

Nextcloud version: 15.0

Contacts version: 3.0.1

Updated from an older Nextcloud or fresh install: Update from latest V14

Signing status:

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:
` - activity: 2.8.2

  • admin_audit: 1.5.0
  • announcementcenter: 3.4.0
  • apporder: 0.6.0
  • audioplayer: 2.5.1
  • bookmarks: 0.15.1
  • calendar: 1.6.4
  • cloud_federation_api: 0.1.0
  • comments: 1.5.0
  • contacts: 3.0.1
  • dav: 1.8.0
  • external: 3.2.0
  • federatedfilesharing: 1.5.0
  • federation: 1.5.0
  • files: 1.10.0
  • files_external: 1.6.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
  • flowupload: 0.0.9
  • gallery: 18.2.0
  • gpxpod: 3.0.1
  • groupfolders: 2.0.2
  • impersonate: 1.2.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.3.0
  • metadata: 0.8.0
  • nextcloud_announcements: 1.4.0
  • notifications: 2.3.0
  • oauth2: 1.3.0
  • polls: 0.9.5
  • previewgenerator: 2.0.0
  • provisioning_api: 1.5.0
  • serverinfo: 1.5.0
  • sharebymail: 1.5.0
  • systemtags: 1.5.0
  • tasks: 0.9.8
  • theming: 1.6.0
  • twofactor_backupcodes: 1.4.1
  • updatenotification: 1.5.0
  • user_usage_report: 1.1.1
  • workflowengine: 1.5.0`

Nextcloud configuration:
{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***", "***REMOVED SENSITIVE VALUE***" ], "activity_expire_days": "60", "datadirectory": "***REMOVED SENSITIVE VALUE***", "filelocking.debug": false, "filelocking.enabled": true, "filelocking.ttl": 1800, "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "version": "15.0.0.10", "installed": true, "dbtype": "mysql", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "default_language": "de", "defaultapp": "files", "integrity.check.disabled": true, "knowledgebaseenabled": true, "enable_avatars": true, "allow_user_to_change_display_name": true, "theme": "", "secret": "***REMOVED SENSITIVE VALUE***", "loglevel": 3, "logdateformat": "Y-m-d H:i:s", "logtimezone": "Europe\/Berlin", "log_rotate_size": 20971520, "skeletondirectory": "\/home\/www\/nextcloud_data\/skeleton", "updatechecker": true, "trashbin_retention_obligation": "auto", "versions_retention_obligation": "disabled", "appstoreenabled": true, "appstore.experimental.enabled": true, "singleuser": false, "maintenance": false, "htaccess.RewriteBase": "\/", "mail_smtpmode": "smtp", "updater.release.channel": "stable", "mail_smtpsecure": "ssl", "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "updater.secret": "***REMOVED SENSITIVE VALUE***", }

Client configuration

Browser: Firefox 64.0, 64-Bit

Operating system:

Windows 10 - Pro

CardDAV-clients:

Logs

Web server error log

Insert your webserver log here

Nextcloud log

data/nextcloud.log

Insert your Nextcloud log here

Browser log

Console Log:

JQMIGRATE: Migrate is installed, version 1.4.0 core.js:7:542
New search handler registered search.js:67:4
Connected to dav! 
Object { rootUrl: Getter & Setter, advertisedFeatures: Getter & Setter, currentUserPrincipal: Getter & Setter, principalCollections: Getter & Setter, calendarHomes: Getter & Setter, addressBookHomes: Getter & Setter, parser: Getter & Setter, _isConnected: Getter & Setter, _request: Getter & Setter, … }
contacts.js:84:29413
Source-Map-Fehler: TypeError: NetworkError when attempting to fetch resource.
Ressourcen-Adresse: https://***REMOVED SENSITIVE VALUE***/apps/contacts/js/contacts.js?v=5865a6bf-48
Source-Map-Adresse: contacts.js.map[Weitere Informationen]

netzwerklog


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #358 (Empty contact list showing a spinning wheel), #145 (spinning wheel in contacts NC 11), #53 (spinning wheel when selecting 'all contacts' after upgrade to 1.5.1), #141 (Contact changes in activity stream), and #562 (Changes not saved on Contacts).

@nextcloud-bot nextcloud-bot added the bug Something isn't working label Jan 9, 2019
@skjnldsv
Copy link
Member

@Bodenseematze Hey! What kind of hardware are you using for nextcloud?

@skjnldsv skjnldsv added the needs info Not enough information provided label Jan 11, 2019
@nick-denry

This comment has been minimized.

@skjnldsv
Copy link
Member

@nick-denry I created a dedicated issue for yours since this is different :)
Please continue yours on #854

@devlux
Copy link

devlux commented Jan 12, 2019

I some times have the same issue. I am using a synology DiskStation DS218+ (Intel Celeron J3355, 64bit, Dual Core 2.0 burst up to 2.5 GHz). Honestly I do not think this is hardware related. Why not update the state on blur instead of using a debouncing mechanism with a relatively short time offset?

@skjnldsv
Copy link
Member

@devlux I think we need both to be honest. But yes, this is not directly a hardware issue, but low power system tends to have some requests taking longer than others and therefore some are finishing before the previous one, generating a 412. Though I need to find something for that!

cc @raimund-schluessler @georgehrke any idea? Cancel the queue? Cancle only unfired requests?

@georgehrke
Copy link
Member

@skjnldsv Maybe you could create a queue for editing using plimit and set the limit to 1

@raimund-schluessler
Copy link
Member

@skjnldsv Maybe you could create a queue for editing using plimit and set the limit to 1

I agree it doesn’t make sense to send a follow up request when the first one hasn’t finished. So p-limit seems appropriate. But we need some kind of caching to preserve all changes made wile the initial request is still running.

@nick-denry
Copy link

@skjnldsv

This could be not only slow hardware issue but also network issue too if async queries used. The "first one" request could ends later than other requests, so if order of requests is matter it's better to use sync requests instead.

@nick-denry
Copy link

nick-denry commented Jan 12, 2019

Anyway, editing go wrong if typos fixed or even slow or fast typing.

I've install test nextcloud with contacts app to create a screencast.

https://youtu.be/Plr_fKu98JA

https://youtu.be/ZVQzwRNspj8

As you could see it's display "reload" button every time when I try to edit before the previous request is complete. So it's possible to create contact and wait before every request is complete, but editing is worst and changes dropped.

@skjnldsv
Copy link
Member

@nick-denry thank you so much for the details info! This really helps! :)
On the first video, there is an error 500, can you check what it is?

Also, yes, we need to prioritise the queue, then I guess this won't happens anymore 🤔

@Huster-at-github
Copy link

Same behavior as @nick-denry and @Bodenseematze :

NC 15.0.2
Contacts 3.0.1

Ubuntu 16.04
PHP 7.2.13
php-info.txt
config.php.txt

Shall I follow this issue here or that:
#854
?

@Bodenseematze
Copy link
Author

I don't know which hardware is used - the NC instance is installed at a shared hoster's web space.
The hoster partially used very old software - patched to be more secure, but still very old (e.g. Apache 2.2).

Inbetween my hoster moved my web space to another server - which seems to be a bit faster than the old one.
Now I only can reproduce the problem if I'm really fast in typing when editing....

So I think the problem is only noticeably on servers with slow reaction / communication...

But why has every key press be transferred to the server?
Wouldn't it be sufficient to send the complete text when the user leaves an editing field?

@Bodenseematze
Copy link
Author

O.K. I got the error again and was able to get a screenshot of the 412 network error:
grafik

I hope, this helps a bit...

@skjnldsv
Copy link
Member

I will work on this this week and provide a patch.
Can I count on you to test it?

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed needs info Not enough information provided labels Jan 14, 2019
@skjnldsv skjnldsv added this to the 3.0.2 milestone Jan 14, 2019
@Bodenseematze
Copy link
Author

If I can - sure!
But as told - since my move to a new hosted server, the bug does only occur sometimes and is not reproducable!
But I hope it happens often enough ;-)

@nick-denry
Copy link

nick-denry commented Jan 14, 2019

On the first video, there is an error 500, can you check what it is?

Sorry, can't reproduce for now with several attempts. I'll create new issue if it'll happens somewhen.

@Huster-at-github
Copy link

Strange: Now it's working for ~ 98%.

I deactivated 1 of 3 address books. After that no more errors. Now activated all 3 address books again and have the 98%.

:'(

Difficult ..... will investigate.

@mcnesium
Copy link
Contributor

I see this behavior on NC v15.0.2, Contacts v3.0.1, running native Docker image on a 2GHz J1900 system connected via 5Ghz Wifi, having just one address book. It has only been seen for a little while, though the setup has been running for many years. Can't tell whether it started with the v15 upgrade.

@skjnldsv skjnldsv modified the milestones: 3.0.2, next Jan 21, 2019
@tarator
Copy link

tarator commented Jan 21, 2019

Same problem here (running Nextcloud 15 in a docker container on a machine with Intel(R) Xeon(R) CPU D-1521 @ 2.40GHz and 32GB RAM.

The contacts app is unusable in this state. There are 700 Addresses in the addressbook.

@Huster-at-github
Copy link

@JC5
Copy link

JC5 commented Jan 23, 2019

I'm experiencing the same thing. I have to be patient and wait for the loading icon to stop spinning after every change. To prevent issues I first prep all my data in Notepad before I create a new contact.

@devlux
Copy link

devlux commented Jan 24, 2019

@skjnldsv: yes, this is a network issue and network calls should be minimized as much as possible. I would suggest to have a look at the lazy modifier of vuejs. IMHO this is a much better user experience.

@skjnldsv
Copy link
Member

On it today :)

@georgehrke
Copy link
Member

@skjnldsv-bot release 3.0.3 😉

@Bodenseematze
Copy link
Author

Does this mean the fix will be in 3.0.3? Or is it already in 3.0.2?

I can see some behaviour change in 3.0.2 - it works better, but still not good.
Now if I edit some fields and type fast (e.g. adding some characters and removing / changing them again) I can see that some of the edits will not find their way to the database - and some of the characters vanish - frustrating if you edit a phone number and some of the digits silently are gone...

And if I do a lot of changes in a field, I still can see the "The contact you were trying to edit has changed" message.

@skjnldsv
Copy link
Member

3.0.3

@Bodenseematze
Copy link
Author

Bodenseematze commented Jan 25, 2019

3.0.3

which is currently not released / available in the app store ;-)

BTW, it seems that the "nightly builds" no longer work - the latest is from 2018-06-15...

@skjnldsv
Copy link
Member

@Bodenseematze Yes, you need to wait for 3.0.3
The nightly builds are off yes.

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 1. to develop Accepted and waiting to be taken care of labels Jan 25, 2019
@Huster-at-github
Copy link

Should already be fixed in the incoming version
Can you test contacts.tar.gz ?

Bug already exists with this version, @skjnldsv :-(

@starox
Copy link

starox commented Mar 25, 2019

Hello,

I am using contact 3.0.3 and I have this bug making me mad.
NC is hosted in house with fast hardware (xeon E3-1240v2, 16GB ram, nvme disk,, GB network) and I am editing locally on the GB network.
It seems the bug is still there,

Best regards

@raimund-schluessler
Copy link
Member

I am using contact 3.0.3 and I have this bug making me mad.

Please update to 3.0.5. There were some fixes for similar problems in 3.0.4.

@starox
Copy link

starox commented Mar 25, 2019

It is much better now, thank you

@CharlesBordet
Copy link

I still have this issue with 3.1.1. It's almost impossible to add a new contact. Even when I think it's been added, a quick refresh shows me half of the entries are missing.

NC 15.0.2.0
Contacts 3.1.1
Debian 9
PHP 7.0.33

@skjnldsv
Copy link
Member

@Huitziii please open a new issue and fill the issue template :)
Please also attach a screenshot of your network requests.
Before you do anything, still on the development tools, there is a tab called network. Click on it and then the xhr filter. Do your contact edit and screenshot the network log like this:
capture d ecran_2018-09-27_21-49-46

@pwepwe973
Copy link

pwepwe973 commented Jun 3, 2019

hello i have the same problem

@skjnldsv
Copy link
Member

skjnldsv commented Jun 3, 2019

@pwepwe973 same answer. Open your own ticket and fill the required informations please :)

@nextcloud nextcloud locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4. to release Ready to be released and/or waiting for tests to finish bug Something isn't working
Projects
None yet
Development

No branches or pull requests