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 419 forks source link

[Bug]: [Windows 11] Crash upon launching - "A Javascript error occured in the main process" #1434

Closed CaseyLabs closed 8 months ago

CaseyLabs commented 8 months ago

Operating system

Windows 11 - Version 23H2 (OS Build 22631.3296)

Publii version

0.45.2 (build 16609)

Post editor

None

Bug description

A JavaScript error occurred in the main process

Uncaught Exception:
Error: UNKNOWN: unknown error, read
at Object.readSync (node:fs:751:3)
at tryReadSync (node:fs:451:20)
at Object.readFileSync (node:fs:489:19)
at t.readFileSync (node:electron/js2c/node_init:2:9771)
at App.checkThemes
(C:\Users\$env:username\AppData\Local\Programs\Publii\resources\app.asar\back-end\app.js:168:55)
at new App
(C:\Users\$env:username\AppData\Local\Programs\Publii\resources\app.asar\back-end\app.js:76:14)
at App .< anonymous>
(C:\Users\$env:username\AppData\Local\Programs\Publii\resources\app.asar\main.js:40:19)
at App.emit (node:events:517:28)

OK

I am unable to load Publii because of this error. Any suggestions? Thanks!

Steps to reproduce

No response

Relevant log output

No response

dziudek commented 8 months ago

Hi,

This error suggest that there is some issue with the default simple theme. Please check if file /sites/your-site-name/input/themes/Simple/config.json exists

If yes - please check if it is not corrupted.

Other possible reasons - problem with permissions or file is blocked by different process

Did you tried to uninstall Publii and remove the website files?

CaseyLabs commented 8 months ago

Confirmed: your solution worked, and it looks like this was user error (I had installed OneDrive on this machine, which synced an outdated Documents\Publii folder, and those files were causing the error message).

Thanks for the assistance, I appreciate it!