Code Monkey home page Code Monkey logo

Comments (15)

bt90 avatar bt90 commented on September 25, 2024

Anything logged in the browser console or happening request wise?

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

Not much; when the page refresh occurs, all I get is:

image

For comparison, a normal (manual) page refresh looks like this:

image

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

On my third affected device (my OpenWRT router), since I not accessing the web UI through the machine itself, but rather over the network via my Linux system, the behaviour is different. Instead of reloading, the page shows a connection error (as if the daemon was shut down). The browser console then looks like this:

image

The daemon however is not actually down, as I am able to manually reload the page to get the WebUI to work again. Not as bad as outright discarding any pending changes, but still annoying.

from syncthing.

calmh avatar calmh commented on September 25, 2024

I'd try a different browser or disable some plugins

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

I just tested on a clean installation of ungoogled chromium. The issue still occurs on the local machine's WebUI, but doesn't seem to appear on the remote WebUI.

from syncthing.

AudriusButkevicius avatar AudriusButkevicius commented on September 25, 2024

I don't think we do anything special depending on whether it's viewed locally or from a remote machine, so that still sounds like something specific to that machine.

Try running syncthing on the other machine and see if you can reproduce that locally.

from syncthing.

valaphee avatar valaphee commented on September 25, 2024

It's noteworthy that the event XHR request fails because of 403 Forbidden,

which causes the page to reload https://github.com/syncthing/syncthing/blob/main/gui/default/syncthing/core/eventService.js#L44

from syncthing.

bt90 avatar bt90 commented on September 25, 2024

Hm. Maybe it's cookie related?

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

I initially thought it was, because uMatrix had disabled cookies for the WebUI. However the issue still happens:

  • with cookies enabled on uMatrix
  • with uMatrix turned off
  • with the uMatrix addon completely disabled
  • with the fresh install of ungoogled Chromium (which has no addons)

I might've missed a test case, but I suspect it's probably not cookie related.

Another finding from looking at the network graph of the remote WebUI is that the endpoint request eventually fails with "CSRF Error", triggering a page reload (likely via the file @valaphee posted).

from syncthing.

bt90 avatar bt90 commented on September 25, 2024

That cookie warning looks suspicious.

from syncthing.

bt90 avatar bt90 commented on September 25, 2024

This might be related to #7399. Maybe Chromium is a bit more strict?

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

Huh. In that case, maybe the CSRF Cookie expires after a while, which causes the backend to return 403 when Syncthing attempts to do a periodic update, and that in turn causes the page to reload.

In which case: is this an intended feature? And can it be turned off?

from syncthing.

calmh avatar calmh commented on September 25, 2024

"csrf error" typically just means auth error, doesn't need to be the csrf specifically. I suspect something yeeting the auth cookie.

from syncthing.

bt90 avatar bt90 commented on September 25, 2024

We're not setting the SameSite attribute for the CSRF-TOKEN-XXXXXXX and sessionid-XXXXXX cookies. Maybe Ungoogled Chromium is a bit more strict in that regard?

Not sure if this intended or not, but the CSRF cookie is also missing the Secure attribute.

grafik

from syncthing.

Cre8or avatar Cre8or commented on September 25, 2024

Update on my situation:

about a month ago I decided to change the GUI listen address across my desktop and laptop. Additionally I went ahead and cleared my page cookies after I had everything set up, to make sure I was starting out in a relatively fresh state. So far the issue hasn't come up again, but I don't know what ultimately fixed it...

If it really was cookies, then that wouldn't explain why the issue appeared on a completely fresh browser with a brand new user profile. But then again, I don't know what else to pin it on. In any case, glad it's resolved for now.

On an unrelated note, thank you all for working on this project. I didn't think to say it last time, and I worry it didn't come across due to the nature of the conversation, but I genuinely appreciate having Syncthing in my life (especially as a dev).

from syncthing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.