-
Notifications
You must be signed in to change notification settings - Fork 814
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
[Bug]: Invalid warning: Failed to move the old config directory to its new location
#6201
Comments
I also observed one warning for each folder sync connection log immediately following the one above:
|
same here, on my steam deck (checking other machines this evening): nextcloud.gui.application: Migrating old config from "/home/deck/.var/app/com.nextcloud.desktopclient.nextcloud/data/Nextcloud" to "/home/deck/.var/app/com.nextcloud.desktopclient.nextcloud/config/Nextcloud" note: ccc = file name |
The migration only runs if oldDir exists: desktop/src/gui/application.cpp Lines 492 to 493 in ab3e4e7
The migration itself normally would rename oldDir to newDir (aka: desktop/src/gui/application.cpp Lines 504 to 505 in ab3e4e7
Then it falls back on trying to move the files within oldDir one-by-one: desktop/src/gui/application.cpp Lines 507 to 517 in ab3e4e7
There are some other spots where migration can happen - e.g.: desktop/src/libsync/configfile.cpp Lines 343 to 366 in ab3e4e7
Notably, the desktop/src/gui/syncrunfilelog.cpp Line 35 in ab3e4e7
It's valid because for some reason the simple rename migration didn't originally cover you for some reason. It just means the fallback mode kicks in (one-by-one above). The fallback kicking in now makes sense because you have both old and new directories now so a simple rename of the old directory won't work. The questions are:
P.S. Manjaro's package data is weird. It says 3.10.1 on the listing on their web site but when you click on it it's for 3.9 and links to an invalid broken build source link. |
@joshtrichards Thanks for helpfull insight. On my Manjaro desktop, the *_sync.log files under .local/share/Nextcloud have a current modification date (Nov 16) whereas those under .config/Nextcloud have not been modified since Nov 6. The update history for my system shows Based on the code blocks you included, it makes sense that the *_sync.log files are expected to be found in the standard data location whereas the nextcloud.cfg is expected to be in the standard config location. Given this, "oldDir" for the *_sync.log files would be .config/Nextcloud directory. However, this was created by Nextcloud more than two years ago and as the standard config location is still being used to contain the nextcloud.cfg file (and backups) as well as cookies0.db, sync-exclude.lst, and a logs subdirectory containing the application log, i.e., 20231116_0812_nextcloud.log.1 with previous logs as archives. In this configuration, renaming oldDir to newDir does not really make sense. It may just be simply that the *_sync.log files under .config/Nextcloud are now OBE and should be removed. |
The old directory is re-created every time: rm -rf ~/.local/share/Nextcloud/
nextcloud &
ls -d ~/.local/share/Nextcloud/
/home/.../.local/share/Nextcloud/ and it contains a new log file for each sync target. I'm here on Linux with version 3.10.1 |
Same problem here on Linux with 3.10.1: |
Just updated the desktop client Linux Appimage from https://nextcloud.com/install/#install-clients from version 3.10.0 to the latest 3.11.0 and seeing the same thing.
Tried deleteing /home/username/.local/share/Nextcloud but still getting the error message. Is this is a cosmetical problem only, or may things keel over later? |
Also on 3.11.1 Appimage Client |
I can confirm this. |
@joshtrichards said:
That's because, as you mentioned, the Then, on the following application launch, the Application::setupConfigFile() function sees the previously created In my opinion, to properly fix this issue a couple of things have to change:
As far as I understand, this should fix this issue, and make the desktop client a bit more conforming to the XDG guidelines :) Edit: |
Any news on this? |
It seems it works if you delete the folder ~/.local/share/Nextcloud/ . |
At least over here with |
I use Nextcloud-3.13.0-x86_64.AppImage and recently I upgraded my Kubuntu from 22.04 to 24.04 LTS (maybe that has an impact?) |
This is not right. |
Oh sorry, I was wrong. I paused synchronization, that's why it seemed to work. I started a few times. |
@Tachi107 Don't know if I'm missing something, but how about Edit: I guess that path is new in Qt 6.7 and Nextcloud client uses a previous version? :( |
Yeah, that's the direct Qt abstraction. It has been added in Qt 6.7 though, and wasn't available when I submitted my suggestion.
|
I had the problem that nextcloud client was hangig for long times and sometimes even wasn't able to sync at all.
This creates even more journalctl entries "Failed to move" and "Fallback move ... also failed" but in the end it works. |
Failed to move the old config directory to its new location
Hell no, it should NEVER place log files in the config directory! Please, just read the spec everyone: https://specifications.freedesktop.org/basedir-spec/latest/index.html It clearly states the following:
And for the state directory:
Please... Just don't ever put log files in a config directory. That's like putting the Nextcloud server log in There's a standard for a reson. One of those reasons is that users could sync their config directories between machines if they only contained config... And not the state. But this just breaks every time an application puts stuff there that is definitely not config. Electron, for instance, just puts the bloody cache in that damn directory. WTF, cache is not config. Another one is that users could easily backup their config. If users backup their Nextcloud config, they will also accidentally backup log files, which just unnecessarily use up disk space, even though it has never been intended to backup those as well. Just follow the standard please. Some very clever people put a lot of thought into it. |
Hi @erebion, we clearly all know that the Nextcloud client is currently doing stuff wrong, and in #6201 (comment) I've already mentioned what should be done instead. Please calm down :) |
I couldn't not spot any link to the spec yet, nor an excerpt. It seemeed only logical to clarify. |
Right or wrong, sane or insane, this change caused my official-APT-repo [EDIT]: Sadly, the problem returned after a day. Or maybe it was just after suspending/resuming my laptop. I still have the symlink in place pointing |
I just implemented a stupidly effective solution which seems to be working on my machine once again, though I need to keep a close eye on it. I used the https://github.com/xrgtn/nullfs ...to give Nextcloud a
Voila! No more insane log file creation, no SSD wear, no frozen Nextcloud GUI, and Nextcloud is none the wiser. |
I'd just prefer a setting that disables logging, I don't need it either. |
Bug description
During startup, the following warning is logged:
nextcloud[2402]: nextcloud.gui.application: Failed to move the old config directory to its new location ( "/home/xxxxxxx/.local/share/Nextcloud" to "/home/xxxxxxx/.config/Nextcloud" )
I believe this is an invalid warning since my
~/.config/Nextcloud
directory already containsnextcloud.cfg
and a series of monthly backups. The directory~/.local/share/Nextcloud
does not containnextcloud.cfg
but does contain a*_sync.log
file for each folder sync connection. There is also a*_sync.log
file for each folder sync connection under~/.config/Nextcloud
but these no longer appear to be up-to-date compared to those under~/.local/share/Nextcloud
. Is it possible that the*_sync.log
files in~/.config/Nextcloud
are OBE and need to be removed? The Desktop Client appears to work at this point but I would have no way to know if the cause of this warning would eventually lead to a break in client functionality.Steps to reproduce
Start the Nextcloud Client and view the message in the system log.
Expected behavior
The message should either correctly state the condition it is warning about or not be generated.
Which files are affected by this bug
nextcloud.cfg
Operating system
Linux
Which version of the operating system you are running.
Manjaro
Package
Distro package manager
Nextcloud Server version
24.0.12
Nextcloud Desktop Client version
3.10.1
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 3.4.2 to 3.4.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
Are you using an external user-backend?
Nextcloud Server logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: