Notes refresh/sync

I have Nextcloud 20.0.1 running on docker with mariadb and redis behind nginx proxy.
Notes 4.0.0

Everything is running ok but …

  1. create new note
  2. add some text
  3. wait for auto save (star is gone near note name)
  4. close the tab
  5. open new tab and go to note
  6. note is not updated and it takes 7 seconds to refresh!

Or you don’t have to close the tab, just go to other page or just simply refresh (F5)
It is annoying because when you go to note and start typing something after 7 seconds note is refreshed and your new text is gone.
Basically with this issue Notes is unusable.
I haven’t seen similar issue reported. Maybe it is something in my configuration?

Do you have this issue only in the Web UI or also with the Android App?

Please also check your Server logs for related entries and show us the browser console output (press F12).

I don’t use android app for notes.

There is nothing interesting in the console

  1. created new note “test message”
  2. note was autosaved
  3. added test “123” to message
  4. then “123” text disappeared
  5. text “123” appeared again

In server logs I have only

I think that this might be sth wrong with my nginx reverse proxy.
When I am using nextcloud in local network I have no above issues with notes
Here is my nginx config:

  add_header X-Content-Type-Options nosniff;
  add_header X-XSS-Protection "1; mode=block";
  add_header X-Robots-Tag none;
  add_header X-Download-Options noopen;
  add_header X-Permitted-Cross-Domain-Policies none;
  fastcgi_hide_header X-Powered-By;

location /cloud/ {
  proxy_pass http://X.X.X.X:YYYY/;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Server $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

  client_max_body_size 0;
  proxy_max_temp_file_size 0;

  proxy_buffering off;
  proxy_request_buffering off;

  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;

location = /.well-known/carddav {
  return 301 $scheme://$host/cloud/remote.php/dav;
location = /.well-known/caldav {
  return 301 $scheme://$host/cloud/remote.php/dav;

Also I have a question what is service worker?
It is loading tons of megabytes into browsers cache

I cleared browsers cache and everything works ok now.
I suspect that only service worker will start working, problems will appear again

I entered nextcloud page again after some time. Service worker did something again. Downloaded 87MB of some data.
Actually I have total 343MB of data in nextcloud. One video file 285MB, some photos (42MB), some txt notes and default example content.
And I have this sync problem again.
What is this 87MB?

When I clear cache everything works ok until service worker download cache again.

If you suspect a bug in the Notes app, you should opem a ticket in the issue tracker. Since this is a community support forum, most developers don’t read here - and i am only the Notes Android guy :wink:

I am not sure if it is Notes App bug. If it was a bug, someone would have mentioned it already on the git or here.
As I said earlier Notes works ok when I started clean docker instance on local network without nginx reverse proxy.
Probably it is something in my setup. I have also home-assistant running on the same domain.
Home assistant is also using service-workers.
Home assistant is on and nextcloud is
For now I can;t replicate the problem after clearing cache. It appears after some time.
That is why I didn’t create issue on github.
I am not 100% if it is a bug in Notes App.

So probably home-assistant and and nextcloud does not like each other behind nginx reverse proxy :slight_smile:
I can replicate the problem.

  1. clear cache
  2. go to netxtcloud ( and everything works ok
  3. go to home-assistant ( Login.
  4. go to nextcloud and refresh page
  5. type sth in notes
  6. text disappear and appear again after 7 sec.

Problem is that home-assistant does not support webroot change :frowning:

I changed my setup and now everything works
First of all I changed noip to duckdns. It supports wildcards so now I have and
Both homeassistant and nextcloud notes works ok :slight_smile:
So this was not a bug in Notes app.
Problem solved :slight_smile: