GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

Memory Integrity make Publii's installation throwing an error: Failed to get 'documents' path (Windows 11Pro + Publii 0.43.1, 0.42.1 and 0.41.1) #1288

Open JOduMonT opened 8 months ago

JOduMonT commented 8 months ago

Operating system

Publii version

Bug description

I don't remember which version has been working on my Windows 11 Pro but now when I try to install

I have this error:

A JavaScript error occurred in the main process Uncaught Exception: Error: Failed to get 'documents' path at new App at App.< anonymous> at App.emit (node:events:513:28) at App.emit (node:domain:489:12) image

What I tried

dziudek commented 8 months ago

Hi,

It seems to be a bug with permissions on your system. I have checked and we are properly calling getPath function after ready event of the app. 'documents' is a standard param for the getPath function so it must be something with permissions on your OS

JOduMonT commented 7 months ago

That's highly possible, but I'm sure if I knew what you are talking about, I would have already fixed it. How did you check the getPath ? Is that test is related to my Windows or to Publii ?

dziudek commented 7 months ago

In my opinion it is related to your Windows. There can be 2 possible reasons:

getPath function throws error if the specific path (in this case documents) is not available.

Also I have read somewhere that some users can use One Drive sync with their documents folder - are you using this feature? Maybe it is a problem caused by One Drive sync and marking the folder resource as busy?

JOduMonT commented 7 months ago

so; it work when I disable Memory integrity image https://support.microsoft.com/en-us/windows/core-isolation-e30ed737-17d8-42f3-a2a9-87521df09b78

dziudek commented 7 months ago

@JOduMonT - that's interesting - on my Windows laptop used for tests I have this settings enabled and Publii works fine. I suppose that it can be related to some additional settings which are enabled with this option, but to be honest - I have no idea which one :/

JOduMonT commented 7 months ago

@dziudek

@JOduMonT - that's interesting - on my Windows laptop used for tests I have this settings enabled and Publii works fine. I suppose that it can be related to some additional settings which are enabled with this option, but to be honest - I have no idea which one :/

yes; I disabled it for the installation then by curiosity renebled it and then now Publii works even with that option enabled it make me think it's more related to a dependancy then Publii itself. image

JOduMonT commented 7 months ago

today I hit that issue again; and it was not during the installation; I would say it's a user behavior issue ;) I'm curious if someone could try my mis behavior to see if it's related or not to it.

Basically

  1. Close Publii
  2. Goto ./Publii directory
  3. Delete everything inside
  4. Reopen Publii

== then in my case; only backups, languages and plugins are recreated then I have the error 🤔 which make me think that it miss the super user privileges to create the reset; which was probably only allow during the 1st installation of the app.