-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Error while fetching store files: EPERM #2937
Comments
I'm not a windows expert but how did you start zui? It could be you runned it with admin privileges and that created that file, try to right click on the file to check its ownership and fix it. Also be sure you are not running zui as administrator |
I am running the application as a domain admin so anything being done with that executable would be with that account. It's running with NMMS and set to run as my domain user. That file is a log file that ZUI creates and looks like when it archives it at night to a GZ file it does something to the original file and it fails to be removed. When I try and view the permissions on that file it says there is no owner. Happened again when I tried to look at the logs thru the GUI today. Some images if it helps any: You know maybe that's not the root problem. If you look at the above image, that is yesterday's file, which guess is now a zwavejs_2023-02-01.log.gz file. Looks like it's still trying to find yesterday's log? Note I did notice the logs seem to be in GMT so not sure if there is anything there. Not sure how ZUI parses that folder and why it's erroring vs displaying what's there. When I posted the original issue the .log file was still there just not accessible. |
I have submitted a fix for this, at least it should not throw, the problem is that file seems is still present but when I try to get stats that error is thrown, no clue why BTW, maybe the log rotation delete doesn't completely delete the file and a dead reference remains in memory, no clue as cannot repro this on linux system |
I'm having the same problem, ZWave JS UI running on windows as admin. Everyday at midnight I get the following error, which then repeats itself every hour:
It seems that after ZUI archives the z-ui log file as a gz file, it fails to delete the log file and messes up the permissions on it. I cannot open it (z-ui_2004-09-11.log) from windows explorer, but I can open the log file for the current day (z-ui_2024-09-12.log) just fine. Also, note that it only happens for the z-ui log files, the zwavejs log files don't have this problem. Can this issue be reopened? |
@robertsLando |
@AlCalzone Latest version on NPM is still 4.5.6-1: https://www.npmjs.com/package/@zwave-js/winston-daily-rotate-file |
Not the scoped/forked package. The original one: https://www.npmjs.com/package/winston-daily-rotate-file |
LOL nice to know 😆 Does it fixes the bug related to files not being deleted? I know it used to loose the track of files on every startup so they remain there forever |
I don't know. @Apollon77 does it? |
I think not. I did not found time to look into it. |
For now I have merged my pr to remove the obsolete @zwave-js package, let's see if the bug reported here is fixed then or not |
I'm still seeing the same errors with ZWave JS UI v9.20.0
|
could you tell me the permissions of that file? Is it empty? Corrupted? |
wow cool, I have no idea how this is possible, I have a feel this is something strictly related to windows as the main issue is referencing to windows paths as well... |
Seems there is an open issue on nodejs related to this: nodejs/node#35853 The question anyway could be also why the hell that file has those permissions... |
How is the process executed? With any special user account or permissions? |
@AlCalzone Just as reference, I delete the files using this script: Line 209 in d8c1f7b
In order to fix the issue with log files never deleted |
The process is executed as a child process of HomeSeer which is run with Administrator rights. |
yeah because actually the trick to delete the old files runs only on zui files, it's something I had to add in order to fix another issue related to the daily rotate module that doesn't delete log files under certain conditions and users ended up with tons of log files causing memory issues |
to investigate this issue without having to wait one day for the log file to rotate I made the logs to rotate at a one minute frequency, and added some console logging:
This shows that the transports for logging are created multiple times for ZUI (once for each module), which I think is wrong, they should be created only once like for ZWaveJS, and only re-created if the config changes.
If I force the |
Good find! I can work with @robertsLando on that next week. |
Checklist
Deploy method
PKG executable
Z-Wave JS UI version
8.8.0
ZwaveJS version
10.4.0
Describe the bug
Not sure if it was when archiving but have Z-WaveJS UI running on Windows 2022 with Hyper-V role. There is a log from teh 29th in the log folder as of 2/1 and ther eis also a tar.gz file for that day. I can't access that log file or change ownership. When I go to the Store tab I get:
Error while fetching store files: EPERM: operation not permitted, lstat 'E:\Z-WaveJSUI\store\logs\zwavejs_2023-01-29.log'
I have since deleted that log file but the system is still complaining about it when I open up the Z-WaveJS UI > Store location again fresh in a browser.
To Reproduce
Launch Z-WaveJS UI and click on Store.
Expected behavior
It shows a tree of files/folders.
Additional context
No response
The text was updated successfully, but these errors were encountered: