⚠️ Before submitting, please verify the following: ⚠️
Bug description
After upgrading the Nextcloud Desktop Client to 34.0.0-rc1, Microsoft Excel intermittently fails when saving large macro-enabled .xlsm files located inside a Nextcloud synchronized folder.
The exact same files and workflow worked correctly with the previous Nextcloud Desktop Client version.
The problem is reproducible only while the Nextcloud Desktop Client is running.
Once the failure occurs, the currently running Excel process becomes unable to correctly save the workbook again, even after synchronization is paused or the Nextcloud Desktop Client is completely terminated.
Excel must be completely closed and restarted.
This appears to be a regression introduced in Nextcloud Desktop 34.0.0-rc1.
Environment
Operating system:
Windows 10 Pro 20H2
OS Build: 19042.631
64-bit operating system
Microsoft Excel:
Microsoft Excel for Microsoft 365 MSO
Version 2402
Build 16.0.17328.20124
32-bit
Nextcloud Desktop Client:
34.0.0-rc1
Windows
Update channel displayed in the client: stable
File:
Macro-enabled Microsoft Excel workbook (.xlsm)
Contains VBA macros
Relatively large workbook
Automatic VBA save operations are used
Example path:
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm
Reproduction
- Start Nextcloud Desktop Client 34.0.0-rc1.
- Open a large
.xlsm workbook located inside the Nextcloud synchronized directory.
- Work normally with the workbook.
- Excel performs either an automatic VBA save or a manual save.
- After some save operations, Excel fails to correctly save the workbook.
- Subsequent save attempts start generating additional Excel/VBA errors.
- Pause Nextcloud synchronization.
- Try to save again.
- The Excel session does not recover.
- Completely terminate the Nextcloud Desktop Client.
- Try to save again.
- Excel still does not recover.
- Completely close Microsoft Excel.
- Restart Excel.
- The workbook works normally again until the problem is triggered again.
Control tests
I performed two important control tests.
Test A - Nextcloud completely terminated before opening Excel
Nextcloud Desktop Client was completely terminated before Excel was opened.
The same .xlsm workbook was then opened from the same physical Nextcloud directory and repeatedly saved.
Result:
No errors.
Test B - Same workbook outside the Nextcloud directory
The exact same workbook was copied to a normal local Windows directory outside Nextcloud.
The workbook was repeatedly opened and saved.
Result:
No errors.
Previous Nextcloud version
The same Excel workbook, VBA code, Windows installation and Excel installation worked correctly with the previous Nextcloud Desktop Client version.
The problem started after upgrading to Nextcloud Desktop 34.0.0-rc1.
Error sequence
After the problem is triggered, Excel starts producing several errors.
First Excel reports that VBA project features cannot be saved in a macro-free workbook, even though the workbook being used is an .xlsm file.
Excel then produces VBA Runtime Error 1004:
"No se puede usar esta extensión con el tipo de archivo seleccionado."
("The file extension cannot be used with the selected file type.")
Excel subsequently reports:
"Errors were detected while saving
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm"
Finally Excel reports:
"The document was not saved."
Screenshots of all these errors are available.
Expected behaviour
Nextcloud should monitor and synchronize the file without interfering with Excel's save procedure.
Excel should be allowed to complete its temporary-file/write/rename/replace sequence before Nextcloud processes the resulting file.
Actual behaviour
While Nextcloud Desktop 34.0.0-rc1 is running, an Excel save operation occasionally fails.
After the first failure, Excel appears to lose the correct internal relationship between the .xlsm filename and workbook format.
The Excel process then remains in an invalid state and cannot correctly save the workbook again until Excel itself is restarted.
Stopping Nextcloud after the initial failure does not recover the affected Excel process.
Suspected cause
This looks like a filesystem race condition or file-handle interaction between the Nextcloud Desktop Client and Microsoft Excel's save procedure.
Excel performs several filesystem operations during workbook saving, including temporary file creation, writing, renaming and replacement of the original workbook.
Nextcloud 34.0.0-rc1 appears to react to filesystem modifications considerably faster than the previous client version.
It is possible that the synchronization engine accesses one of the temporary or destination files while Excel is still completing the save/rename/replace sequence.
The initial problem appears to be caused by this interaction.
There may also be a secondary Microsoft Excel bug because, after the initial failed operation, Excel does not correctly recover its internal workbook state.
Why this appears to be a Nextcloud regression
The issue does not occur:
- when Nextcloud is terminated before opening Excel;
- when the same workbook is used outside the Nextcloud directory;
- with the previous Nextcloud Desktop Client version.
It started after installing Nextcloud Desktop 34.0.0-rc1.
Impact
This can potentially result in:
- failed workbook saves;
- lost changes;
- VBA automation failures;
- workbook corruption;
- users believing that a workbook was successfully saved when it was not.
For users working with large Excel/VBA files, this is potentially a data-loss issue.
I can provide screenshots, debug logs and additional reproduction information if required.
Steps to reproduce
After the problem is triggered, Excel starts producing several errors.
First Excel reports that VBA project features cannot be saved in a macro-free workbook, even though the workbook being used is an .xlsm file.
Excel then produces VBA Runtime Error 1004:
"No se puede usar esta extensión con el tipo de archivo seleccionado."
("The file extension cannot be used with the selected file type.")
Excel subsequently reports:
"Errors were detected while saving
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm"
Finally Excel reports:
"The document was not saved."
Screenshots of all these errors are available.1. Right click on the file
2. Click on Share Options
3. The share dialog does not display the option to share by e-mail
Expected behavior
No block archives when saved
Which files are affected by this bug
excel .xlsm
Operating system
Windows
Which version of the operating system you are running.
windows 10
Installation method
Official Windows MSI
Nextcloud Server version
uknnown
Nextcloud Desktop Client version
34.0.0-rc1
Did this occur after an update or on a clean installation?
Major version update (i.e. 4.0.0 → 33.0.0)
Are you using the Nextcloud Server Encryption module?
No
Are you using an external user-backend?
Nextcloud Server logs
Additional info
No response
Bug description
After upgrading the Nextcloud Desktop Client to 34.0.0-rc1, Microsoft Excel intermittently fails when saving large macro-enabled
.xlsmfiles located inside a Nextcloud synchronized folder.The exact same files and workflow worked correctly with the previous Nextcloud Desktop Client version.
The problem is reproducible only while the Nextcloud Desktop Client is running.
Once the failure occurs, the currently running Excel process becomes unable to correctly save the workbook again, even after synchronization is paused or the Nextcloud Desktop Client is completely terminated.
Excel must be completely closed and restarted.
This appears to be a regression introduced in Nextcloud Desktop 34.0.0-rc1.
Environment
Operating system:
Windows 10 Pro 20H2
OS Build: 19042.631
64-bit operating system
Microsoft Excel:
Microsoft Excel for Microsoft 365 MSO
Version 2402
Build 16.0.17328.20124
32-bit
Nextcloud Desktop Client:
34.0.0-rc1
Windows
Update channel displayed in the client: stable
File:
Macro-enabled Microsoft Excel workbook (.xlsm)
Contains VBA macros
Relatively large workbook
Automatic VBA save operations are used
Example path:
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm
Reproduction
.xlsmworkbook located inside the Nextcloud synchronized directory.Control tests
I performed two important control tests.
Test A - Nextcloud completely terminated before opening Excel
Nextcloud Desktop Client was completely terminated before Excel was opened.
The same
.xlsmworkbook was then opened from the same physical Nextcloud directory and repeatedly saved.Result:
No errors.
Test B - Same workbook outside the Nextcloud directory
The exact same workbook was copied to a normal local Windows directory outside Nextcloud.
The workbook was repeatedly opened and saved.
Result:
No errors.
Previous Nextcloud version
The same Excel workbook, VBA code, Windows installation and Excel installation worked correctly with the previous Nextcloud Desktop Client version.
The problem started after upgrading to Nextcloud Desktop 34.0.0-rc1.
Error sequence
After the problem is triggered, Excel starts producing several errors.
First Excel reports that VBA project features cannot be saved in a macro-free workbook, even though the workbook being used is an
.xlsmfile.Excel then produces VBA Runtime Error 1004:
"No se puede usar esta extensión con el tipo de archivo seleccionado."
("The file extension cannot be used with the selected file type.")
Excel subsequently reports:
"Errors were detected while saving
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm"
Finally Excel reports:
"The document was not saved."
Screenshots of all these errors are available.
Expected behaviour
Nextcloud should monitor and synchronize the file without interfering with Excel's save procedure.
Excel should be allowed to complete its temporary-file/write/rename/replace sequence before Nextcloud processes the resulting file.
Actual behaviour
While Nextcloud Desktop 34.0.0-rc1 is running, an Excel save operation occasionally fails.
After the first failure, Excel appears to lose the correct internal relationship between the
.xlsmfilename and workbook format.The Excel process then remains in an invalid state and cannot correctly save the workbook again until Excel itself is restarted.
Stopping Nextcloud after the initial failure does not recover the affected Excel process.
Suspected cause
This looks like a filesystem race condition or file-handle interaction between the Nextcloud Desktop Client and Microsoft Excel's save procedure.
Excel performs several filesystem operations during workbook saving, including temporary file creation, writing, renaming and replacement of the original workbook.
Nextcloud 34.0.0-rc1 appears to react to filesystem modifications considerably faster than the previous client version.
It is possible that the synchronization engine accesses one of the temporary or destination files while Excel is still completing the save/rename/replace sequence.
The initial problem appears to be caused by this interaction.
There may also be a secondary Microsoft Excel bug because, after the initial failed operation, Excel does not correctly recover its internal workbook state.
Why this appears to be a Nextcloud regression
The issue does not occur:
It started after installing Nextcloud Desktop 34.0.0-rc1.
Impact
This can potentially result in:
For users working with large Excel/VBA files, this is potentially a data-loss issue.
I can provide screenshots, debug logs and additional reproduction information if required.
Steps to reproduce
After the problem is triggered, Excel starts producing several errors.
First Excel reports that VBA project features cannot be saved in a macro-free workbook, even though the workbook being used is an
.xlsmfile.Excel then produces VBA Runtime Error 1004:
"No se puede usar esta extensión con el tipo de archivo seleccionado."
("The file extension cannot be used with the selected file type.")
Excel subsequently reports:
"Errors were detected while saving
C:\Nextcloud\Solarenergy\Presupuestos\copia borrador.xlsm"
Finally Excel reports:
"The document was not saved."
Screenshots of all these errors are available.1. Right click on the file
2. Click on Share Options
3. The share dialog does not display the option to share by e-mail
Expected behavior
No block archives when saved
Which files are affected by this bug
excel .xlsm
Operating system
Windows
Which version of the operating system you are running.
windows 10
Installation method
Official Windows MSI
Nextcloud Server version
uknnown
Nextcloud Desktop Client version
34.0.0-rc1
Did this occur after an update or on a clean installation?
Major version update (i.e. 4.0.0 → 33.0.0)
Are you using the Nextcloud Server Encryption module?
No
Are you using an external user-backend?
Nextcloud Server logs
Additional info
No response