Missing XSRF token

Hello

I’ve installed the lastest beta onto a QNAP NAS. I don’ think you officially support this package, though asking for a bit of help.

I can access the gui, and yet haven’t set backups. Though occasionally, when opening open the gui url, a “missing XSRF token” pop-ups. After clicking OK, I can access the gui again.

Will this issue cause Duplicati to stall on the NAS if I’ve scheduled backups etc. Is it a major problem?

Thanks

Update: I set up a backup, which appears to be running.

Though when I access the gui, also see a second pop up:
Failed to read backup defaults: Missing XSRF Token

After clicking ok, I can access the gui as normal.

I think it is a race condition in the code that handles the XSRF that is triggered on low-powered devices:

The problem also occures on high end devices. I’m getting the same error om 2 Windows devices. In the Google Group this issue was also present; LINK

I recently posted this feedback;

Hi Kenneth,

Randomly i'm having this issue (in multiple browsers) and never could find a link with something not working. Most of the times i reopen the GUI and the error is gone.
Today i had the error again and kept working in the GUI without reopening it. When i wanted to add a new backup in the dropdown menu for the encryption it only showed no encryption.

So maybe the error is related to something with the encryption? After closing the browser and reopening (without the error) the encryption was available again.

Maybe this info helps resolving the issue.

Update; The same occures on a different setup, a refresh (F5) fixes the issue

Maybe this helps solving the problem.

For what it’s worth, I’ve had this come up (non-repeatable) on both a Linux based VM and an older Mac Mini.

I didn’t investigate further on the Mac, but in the Linux VM I found that after the XSRF error I could get into the GUI just fine but my Storage Type selector on the Destination page (step 2) was empty and the configuration seemed missing.

Closing the browser and starting again (using “Open” from the tray icon) and NOT getting the XSRF error seems to have “restored” my missing selector contents and configuration.

2 Likes

The reason that the dropdowns are empty is because the call to the server is rejected (the XSRF error), but the HTML that is displayed is served directly from the server (without XSRF checking).

I have not fully traced the reason for the XSRF error, but it should just reload the page if the error occurs, but for some reason it does not. I hope issue #2635 (linked above) solves it.

1 Like

I experienced the XSRF error today, unfortunately it went away on page reload and I did not get a chance to debug it :cry:

Yeah, most of the time a page reload “fixes” it for me too. I suppose since those are UI (browser) side errors they aren’t logged anywhere, huh?

I think it is a mix. The browser has an old XSRF value, and the page load somehow manages to get the old token and partially the new.

I experienced this same bug while doing resiliency testing: mid-upload, I restarted the PC. When I logged back in, I was greeted with the error. :frowning: I refreshed and the error went away! :smiley:

Then I clicked “Run Now” on the interrupted upload and it finished successfully (+1 on resiliency for Duplicati!). However, this might be related, the progress bar said “0 files” for some reason (one file with two versions):

This is my first go at Duplicati, so that might be normal (i.e., 0 files remaining–uploading last file)?

I have not seen that, but what happens is that Duplicati scans ahead and figures out how many files are in the source folder. If you change the source folder, there is a discrepancy between that number and the actual backed up data.
I think we made the choice to show “0 files” instead of “-12 files” if some files were added during the backup.

So even though an initial scan is made to enumerate files, when Dulicati eventually works it’s way to a specific folder it processes what is found in the folder at that time rather than what was seen during the initial scan? (I assume then that the initial scan is mostly for UX / progress bar use.)

So the initial scan finds X files and as each ACTUALLY FOUND file is processed that initial X scan count gets decreased by 1. Thus if MORE than the initial files are found in directories when the file process reaches those folders the progress bar will eventually shows 0 (instead of -Y) files to go.

Does this mean that if, say, 33 files are DELETED after the initial scan then the progress bar may end up saying “33 files (0 MB) to go”?

Yes, I think it will end up that way.

Btw, the XSRF problem should have been fixed in the latest canary.
Has anyone seen the problem with a canary build (anything newer than 2.0.2.1) ?

I’m running one of the last canary build and experience the issue daily. Synology ds216j.

No need to restart, just accept the message.

My Ubuntu VM (service) on beta used to get it every run, on 2.0.2.8_canary I get a modal that looks like it’s going to tell me something, but then it goes away and the page loads as normal.

My GUESS is it’s the “The page is not loaded yet…” type message I’ve seen from time to time elsewhere (sorry I don’t have the actual copy for you).

So as far as I can tell the XSRF error has been replaced with a much better “hang on, I’m getting there” experience. :slight_smile:

Hi Kenkendk, i still have the problem with the version 2.0.2.8 Win 10 Pro 64bit.
The backup still seems to work correctly, but the data in the Home (Last successful run, Next scheduled run, Source and backup) do not change and emails are not sent.

1 Like

Folgore101, are you saying you’re still getting the missing XSRF token message or was this post intended for a different topic?

I reliably got the XSRF issue when running duplicati as a service on Windows 10 on both my machine and my mother´s (nearly drove me nuts today).

Interestingly it does not happen on either machine when I start duplicati tray icon instead (under user or admin privileges) so for now I settled on starting duplicati tray under admin privileges (so that VSS works) at logon…

Correction, just saw the issue with that approach as well. Have a suspicion it is a race condition of sort as it seems to go away after a few minutes. So maybe I should have simply waited a little longer after boot…

The XSRF issue is still present.

I have seen it with 2.0.2.8 Windows 10 64bit running as a service also. It doesn’t appear nearly has often as it did on the 2.0.2.1 beta. May have seen it 3 or 4 times since I moved to the canary channel a few days ago. With beta I would see it multiple times daily.

I Don’t use the tray icon at all. I just have the address bookmarked in the browser.

1 Like