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.35k stars 420 forks source link

[Bug]: After upgrading from Publii 0.43.1 to 0.44, and from Simple 2.8.0 to 2.8.3, previewing hangs at 80% #1296

Closed michaellenaghan closed 1 year ago

michaellenaghan commented 1 year ago

Operating system

macOS Sonoma 14.1.1

Publii version

0.44.0

Post editor

None

Bug description

After upgrading from Publii 0.43.1 to 0.44, and from Simple 2.8.0 to 2.8.3, previewing hangs at 80%.

That happened on two sites.

(After upgrading Publii, and before upgrading Simple, I was able to run preview successfully. So the problem seems to be Simple 2.8.3?)

Looking through the logs I noticed the error I've included below.

The code seems to be accessing the input/themes/simple/assets/dynamic directory — but there is no such directory.

(There's also no such directory in the themes directory that the Simple theme was copied from.)

I'll keep poking around to see if I can find any other clues...

Steps to reproduce

No response

Relevant log output

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, scandir '/Users/.../Documents/Publii/sites/.../input/themes/simple/assets/dynamic'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'scandir',
  path: '/Users/.../Documents/Publii/sites/.../input/themes/simple/assets/dynamic'
}

Node.js v18.16.1
bobmitro commented 1 year ago

The Simple theme, available for download from our download section, includes the dynamic folder. I'm not sure why you didn't notice this issue. However, please download the Simple theme again, unzip it, and copy the missing folder to the correct location in your project.

PS: Maybe your antivirus program is deleting the folder, treating new Google fonts as potentially dangerous. I'm not certain, but it might be worth checking.

michaellenaghan commented 1 year ago

Manually copying simple/assets/dynamic from the Publii package into themes/simple/assets — and, more importantly, into <site>/input/themes/simple/assets — fixed the problem.

So the problem may be rooted in the fact that simple/assets/dynamic wasn't copied from the Publii package in the first place?

michaellenaghan commented 1 year ago

Sorry, just saw your answer.

The Simple theme is included with Publii; I don't think I've ever downloaded it, I've just always selected it from the themes drop-down?

michaellenaghan commented 1 year ago

I just confirmed that /Users/<user>/Documents/Publii/themes/simple matches /Applications/Publii.app/Contents/Resources/app.asar.unpacked/default-files/default-themes/simple — at least, it does now that I copied the missing folder over. So I think Publii is indeed updating the theme when I update the app, without me having to re-download the theme?

bobmitro commented 1 year ago

So I think Publii is indeed updating the theme when I update the app, without me having to re-download the theme? Yes, I confirm.

I've tested it now and haven't noticed a similar problem. This may be a random occurrence.

michaellenaghan commented 1 year ago

OK, I'll close this. If anyone else reports a similar problem at least we'll know where to start looking!