`.local/FreeTube` data folder cannot be symlinked since 15.1
Behavior of the program
I have the .local/FreeTube folder configured as a symlink to be able to synchronize subscriptions, playlist, and history via a shared Syncthing folder. This was working perfectly in the 15.0 release. Since 15.1, when opening the FreeTube application, it initially reads all my data, but then the symlink is overwritten with a JSON file.
Where does FreeTube store the data since the 15.1 release?
To Reproduce Please add all steps to reproduce the behavior:
-
mkdir /tmp/FreeTube; ln -s /tmp/FreeTube FreeTube - Open and use FreeTube (save videos)
- FreeTube folder is now a JSON file.
Environment Information (please complete the following information):
- OS: Ubuntu 21.10
- FreeTube version: 15.1
- Installation Method (If applicable): deb
Same here. My .config/FreeTube directory is symlinked and it gets corrupted everytime I open up. I downgraded back to 15.0 for now until this is resolved
This issue was introduced by #1764 the electron upgrade from 13 to 15. The symlink is changed to a file as soon as you open a video to watch. The file contents are something like:
{"expect_ct":[],"sts":[{"expiry":1673104646.291372,"host":"wZZ8JKgM6Xst/0H/aQngtw68XGgcxgs/3LiRsWRIXEM=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1641568646.291375}],"version":2}
Or
{"expect_ct":[],"sts":[{"expiry":1673106772.608567,"host":"Ifty0kmGtBkqpzyRNEJ2iccvLpOffAEtEf72UjNCr0U=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1641570772.60857},{"expiry":1673106771.85869,"host":"wZZ8JKgM6Xst/0H/aQngtw68XGgcxgs/3LiRsWRIXEM=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1641570771.858693}],"version":2}
I tested on commit ed188eba3efac7178f5dbf48649a94dfd6e0e14b (the one before #1764 was merged and the issue doesn't occur. Then tested on commit 413219525c7dc40c59259d4eec9f8a9175d187fd ( the merge commit from #1764 ) and the issue happens.
If you are testing that the commits mentioned do indeed cause the issue remember to do a yarn install between swapping commits otherwise you won't reproduce the failure/success.
Can confirm the same happening.
A similar issue happens as well:
- When symlinking just a single file (e.g. history.db), the symlink will get removed immediately and a new history.db file will get created. The same happens to hardlinks.
As a workaround, you can set the XDG_CONFIG_HOME variable to use for running FreeTube.
Can confirm the same happening.
A similar issue happens as well:
* When symlinking just a single file (e.g. history.db), the symlink will get removed immediately and a new history.db file will get created. The same happens to hardlinks.
The issue with symlinks seems to be fixed for me.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
We are currently on Electron v21. Is this still an issue in the latest nightly build?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.