-
Notifications
You must be signed in to change notification settings - Fork 807
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]: Nextcloud isn't preserving millisecond value on file modified timestamp which causes some apps to get confused #6190
Comments
I have a test Nextcloud system running on a virtual machine in my lab. Just tried to repeat in this environment and same problem. Not using a group folder this time but a text document stored in my Documents folder. LATER - the issue doesn't occur when you download all files, i.e. it's only an issue with virtual files. |
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
I posted a test build in the linked PR, people could you please test it and report your results here ? |
one my side I'm still reproducing the original issue on the test build |
I'll try the test build ASAP. |
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
Please to report that this problem appears to be fixed in the linked pull request version. I've updated my test script to be a bit more useful. It monitors the file and only updates the display when the file is changed. The millisecond value remains as first saved and doesn't get set to zero. This means that Notepad++ doesn't prompt to re-load it. Result - with caveat. I tried with Excel and initially I thought it was fixed as milliseconds remained for quite a while, but then zeroed. However, I think I can explain this. I was using an Excel document that will have been downloaded locally on other computers. I suspect until all clients are updated, the following scenario occurs: BEGIN
|
Interesting side note - PowerShell ignores milliseconds when comparing timestamps. In the above script, I originally didn't have the test for milliseconds in the if statement and it looked like the bug didn't occur. However, when I also added the millisecond comparison it did. One gets the feeling that this millisecond issue is one of those can of worms things. Bit like MAXPATH in Windows :-) |
"I tried with Excel and initially I thought it was fixed as milliseconds remained for quite a while, but then zeroed. However, I think I can explain this. I was using an Excel document that will have been downloaded locally on other computers. I suspect until all clients are updated, the following scenario occurs:" In my test lab, i've updated only one computer with the window test version and on the Linux backend, i still see milliseconds to be zeroed on files modified by this computer. |
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close #6190 Signed-off-by: Matthieu Gallien <[email protected]>
acoid modifying some metadata of the placeholder when this placeholder has just been uploaded to the server (will avoid truncating the timestamps) Close nextcloud#6190 Signed-off-by: Matthieu Gallien <[email protected]>
Hi. I can definitely report it fixed in 3.10.4. Weird. Regards rob |
I experience the same issue as munrobasher, issue still reproduced daily on updated version of both server & client |
Something has changed though. Previously when one saved an Excel document, the millisecond value was non-zero for a while and then reset to zero without doing anything (or rather waiting for the client to resync). However, I'm just running this PowerShell script:
It monitors a file and if the millisecond changes, it reports the change. I've saved the file and it's staying with a millisecond value. However, if I close and re-open the file, it resets milliseconds to zero. So this is new - re-opening a file resets the milliseconds to zero which it should not do. |
Hi. That obviously would trigger an unwanted snyc I guess. I can confirm that I see that as well. Regards rob |
Repeated several times with Excel. Now the simple fact of opening an Excel document zeros the milliseconds value. But this issue doesn't happen with Notepad++ which before used to report that it thought the file had changed when the milliseconds was reset by the client. Re-opening the same document in Notepad++ and the timestamp/milliseconds value is preserved. I haven't a clue why Excel would behave differently... just about to try with Word. Later... yes, same issue with Word. And LibreOffice Draw... |
Hi. @munrobasher which Excel do you use? Regards rob |
Microsoft 365 current channel currently version 2401 Build 16.0.17231.20194 64-bit. |
Hi. The fix was also in 3.11 so supposedly working in your version. I am interested in your findings with 3.12 regards. Rob |
It's better but there is still a quirk on opening Excel documents - opening clears milliseconds. Need to find some time to dig deeper. |
Hi. |
@munrobasher or admin could you reopen this issue as it is not resolved |
IMHO this is NOT resolved. I'm seeing this issue 9 out 10 times when saving an Excel file using client 3.12.3. I think it started with 3.10.0, but not 100% sure. Not using Group Folders. I cannot reproduce it with Notepad++. The Powershell command from the OP never returns a milliseconds value here. Could be my lack of experience with PowerShell. Edit: I managed to get the milliseconds using this command: Done some more testing:
|
Hi |
Im using macOS Virtual files, and editing .md file with textedit.app and having this issue. Nextcloud desktop client 3.13.3 |
This is also an issue for me which is preventing me from rolling out NextCloud across our office. |
Hi. Must be a regression. I can confirm that this problem was fixed specifically for us in 3.10.3. Back then the problem was only appearing in group folders. Now it does not matter whether it is a group folder or a regular folder. Regards Rob |
@mgallien Please reopen this. As many are reporting here this is still an issue, mainly for Excel causing much confusion and irritation among end-users. |
I have a fix in progress |
"To test this change/fix you can simply download above AppImage file and test it." I'm not a developer, but I believe AppImage is a Linux package. This issue occurs with Excel on Windows. If you want us to test, please publish a Windows beta. And may I suggest to reopen this bug and keep it open until the fix has been out in the field for some time? This has been going on so long and has done so much harm to Nextcloud reputation. |
I completely agree with @willemb2 on this. For me this is a critical issue which is stopping me from using NextCloud and I'd love to see this fixed and confirmed as such. |
Bug description
Some applications monitor the modified timestamp on a file to determine if it's been changed whilst you have the file open. For example, Excel remembers the modified time of a file when you open it. On saving, if the modified time has changed, it infers somebody else has changed it and prompts if you want to overwrite. Notepad++ monitors the modified timestamp and if it changes, you're prompted to re-load the file.
The bug is that Nextcloud client (assumed but could be server) isn't preserving the millisecond value on the server and the Nextcloud client zeroes the millisecond value.
This then causes Excel to believe somebody else has changed the file and Notepad++ to prompt to reload even though the file hasn't changed. Get your answer wrong and you can loose edits.
Steps to reproduce
If you happened to have made edits between steps #1 and #5, they will be lost if you reload.
PowerShell: (Get-ItemProperty $Path).LastWriteTime.Milliseconds
This video demonstrates the issue: Video of issue
Expected behavior
The millisecond value in the modified time should be preserved, written to server and not zeroed by the client.
Which files are affected by this bug
All files but most problematic with Excel files
Operating system
Windows
Which version of the operating system you are running.
Windows 10, Windows 11
Package
Appimage
Nextcloud Server version
27.1.3
Nextcloud Desktop Client version
3.10.1 using virtual files
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 Disabled
Are you using an external user-backend?
Nextcloud Server logs
Too large to upload here. Can be downloaded here: https://maltsystems-my.sharepoint.com/:u:/g/personal/rob_nicholson_maltsystems_co_uk/EbxRPMGNp5tNstw38eKIOpUBwSV77crWyvc9esg598hYcA?e=zOptIZ
Additional info
I've looked at the timestamp on the Nextcloud CentOS v7 server using ls -l --full-time and the milliseconds value when first uploaded to Nextcloud is zero. So not surprised this issue is occurring. The Linux server can handle milliseconds in modified times so it's not a problem on Linux as such. Whether it's the client or server is difficult for me to say.
The text was updated successfully, but these errors were encountered: