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

Stop autosave when session is closed #4080

Closed
max-nextcloud opened this issue Apr 26, 2023 · 0 comments · Fixed by #4504
Closed

Stop autosave when session is closed #4080

max-nextcloud opened this issue Apr 26, 2023 · 0 comments · Fixed by #4504

Comments

@max-nextcloud
Copy link
Collaborator

Describe the bug
I noticed some 403 responses to sync requests during a conflict e2e test. Looks like they are triggered by calls to the autosave function in the SyncService even after the session was closed.
This probably happens because autosave gets triggered by an onChange handler that persists even after closing the session.

To Reproduce
Steps to reproduce the behavior:

  1. Run the cypress tests for conflict handling - in particular noticed it during the 'keep the server version' one.
  2. Open the console while the test runs and keep the window open after it finished
  3. Watch the network requests and see error some seconds after the test ended.

Expected behavior
No 403 responses, no dangling handlers from an old session.

Screenshots
Will add them later.

max-nextcloud added a commit that referenced this issue Jul 12, 2023
This would normally happen in the save call before closing.
However if that call fails
(for example due to a conflict)
we still clear the pending autosync calls to prevent 403s.

Fixes #4080.

Signed-off-by: Max <max@nextcloud.com>
juliushaertl pushed a commit that referenced this issue Jul 12, 2023
This would normally happen in the save call before closing.
However if that call fails
(for example due to a conflict)
we still clear the pending autosync calls to prevent 403s.

Fixes #4080.

Signed-off-by: Max <max@nextcloud.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Nov 6, 2023
This would normally happen in the save call before closing.
However if that call fails
(for example due to a conflict)
we still clear the pending autosync calls to prevent 403s.

Fixes #4080.

Signed-off-by: Max <max@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants