Skip to content
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

File Permission error after installing 64bit setup for all users on Windows Server 2022 #58

Closed
Er4twXz opened this issue Dec 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@Er4twXz
Copy link

Er4twXz commented Dec 4, 2024

Obviously the program is trying to write into C:\Program Files

C:\Users\adm>"C:\Program Files\mdview\mdview.exe"

C:\Users\adm>
[ 'C:\Program Files\mdview\mdview.exe' ]
{
filePath: 'C:\Program Files\mdview\resources\app.asar\README.md',
internalTarget: undefined,
isTest: false,
storageDir: 'C:\Program Files\mdview\.data\storage'
}
(node:11040) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, mkdir 'C:\Program Files\mdview.data\storage'
at mkdirSync (node:fs:1380:26)
at t.mkdirSync (node:electron/js2c/node_init:2:12926)
at StorageBase._initStorageDir (C:\Program Files\mdview\resources\app.asar\app\lib\main\storage.js:51:12)
at new StorageBase (C:\Program Files\mdview\resources\app.asar\app\lib\main\storage.js:28:21)
at new ApplicationSettings (C:\Program Files\mdview\resources\app.asar\app\lib\main\storage.js:66:1)
at Object.loadApplicationSettings (C:\Program Files\mdview\resources\app.asar\app\lib\main\storage.js:344:33)
at C:\Program Files\mdview\resources\app.asar\app\main.js:428:36
(Use mdview --trace-warnings ... to show where the warning was created)
(node:11040) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

after creating the .data folder and giving full control on the folder .data and resources the program is working

@github-actions github-actions bot added the needs reaction Owner didn't react to this issue yet label Dec 4, 2024
@c3er
Copy link
Owner

c3er commented Dec 4, 2024

Thank you for filing this issue!

Do you mean with "64bit setup" the MSI package? Because with this, I could reproduce this issue. The EXE package works fine by storing the user data under "C:\Users<user>\AppData\Roaming\mdview" as it should when installed via a setup package.

This will be fixed with the next release.

@c3er c3er added bug Something isn't working and removed needs reaction Owner didn't react to this issue yet labels Dec 4, 2024
@Er4twXz
Copy link
Author

Er4twXz commented Dec 4, 2024 via email

@xCaradhras
Copy link

xCaradhras commented Dec 17, 2024

Oh, I just installed the MSI package and obviously got hit by the same issue. There are (dead?) processes in the task manager, but no window is coming up. Also no warning or error on command line.

EDITH: Maybe you should remove the MSI from the release page or add a warning...?

@c3er
Copy link
Owner

c3er commented Dec 17, 2024

Maybe you should remove the MSI from the release page or add a warning...?

I try to fix this bug this week. Do you still think, a warning for these packages is necessary?

@xCaradhras
Copy link

Well, the software obviously doesnt work at all with the MSI 😁 so it is a class A bug because core functionality is not available
(or whatever scale you might prefer) Still, it's your call in the end :)

c3er added a commit that referenced this issue Dec 18, 2024
This fixes issue #58

If the application doesn't run from a usual installation path, it is
assumed that it is a portable instance. No extra steps during the
installation process needed!

Following environment variables are used:
- ProgramFiles: usual global path for 64 bits applications
- LOCALAPPDATA: usual user local path for applications
@c3er
Copy link
Owner

c3er commented Dec 18, 2024

I released version 3.2.0 which should now also run properly after installing it globally via the MSI package.

@c3er c3er closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants