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

[Bug]: JS error GLIBC on ubuntu 20.04 #1294

Closed frontera-dot-network closed 7 months ago

frontera-dot-network commented 7 months ago

Operating system

Ubuntu 20.04

Publii version

0.43.1 and 0.44.0

Post editor

None

Bug description

Publii-0.42.1 no problems

upgraded to Publii-0.43.1 or Publii-0.44.0, see the problem on the screenshot attached

the system is:

uname -srvmpio

Linux 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:28:33 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

ubuntu 20.04

issue

Steps to reproduce

install 0.42.1 create a website upgrade to 0.43.1 create a website

Relevant log output

No response

frontera-dot-network commented 7 months ago

$ ls -la /lib/x86_64-linux-gnu/ | grep "libc-" -rwxr-xr-x 1 root root 2029592 Jul 26 08:44 libc-2.31.so lrwxrwxrwx 1 root root 12 Jul 26 08:44 libc.so.6 -> libc-2.31.so

dziudek commented 7 months ago

@frontera-dot-network - are you sure that on Publii v.0.44 do you have the same problem? On Publii 0.43.1 - yes it is possible, but on Publii v.0.44 we have downgraded better-sqlite3 to 8.2.0 which is the last version compatible with older Debian and Ubuntu according to discussion here: https://github.com/WiseLibs/better-sqlite3/issues/990

frontera-dot-network commented 7 months ago

positive

dpkg -i Publii-0.44.0.deb

(Reading database ... 254632 files and directories currently installed.) Preparing to unpack Publii-0.44.0.deb ... Unpacking publii (0.44.0) over (0.42.1) ... Setting up publii (0.44.0) ... update-alternatives is /usr/bin/update-alternatives update-alternatives: warning: forcing reinstallation of alternative /opt/Publii/Publii because link group Publii is broken Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for hicolor-icon-theme (0.17-2) ...

and the getting the said error when starting the app

dziudek commented 7 months ago

Please try to check these ones:

I have downgraded better-sqlite3 to v.8.1.0 which has been used in Publii v.0.42.1

I do hope that it will help, because I have no other ideas why do you get this error.

frontera-dot-network commented 7 months ago

thanks for that, but no luck

but somehow ubuntu 22.04 doesnt suffer the same problem

ls -la /usr/lib/x86_64-linux-gnu/libc.so

-rw-r--r-- 1 root root 283 Sep 25 15:45 /usr/lib/x86_64-linux-gnu/libc.so

apt list --installed | grep ^libc-

libc-bin/jammy-updates,jammy-security,now 2.35-0ubuntu3.4 amd64 [installed,automatic] libc-dev-bin/jammy-updates,jammy-security,now 2.35-0ubuntu3.4 amd64 [installed,automatic]

problem solved though for me having upgraded to 22.04 but not a solution really if meant to support LTS OSs etc

dziudek commented 7 months ago

It seems that the issue is connected with the system where the module is compiled. In v.0.45 we will migrate from better-sqlite3 to WASM sqlite module, so such native issues will be no longer a problem

owil commented 7 months ago

I'm experiencing the same problem (Linux Mint 20.3 Una, base: Ubuntu 20.04 focal). Would it be possible to provide a link to the 0.42.1 files? I cannot find them and now Publii is unusable.

dziudek commented 7 months ago

@owil @frontera-dot-network - could you check if v.0.44.1 still has this issue? I have downgraded better-sqlite3 to v.8.1.0 used in v.0.42.1 of Publii

owil commented 7 months ago

It looks like v0.44.1 still has this issue. I have attached a picture of the error. Screenshot_2023-11-16_13-06-00_Publii-44-1-error

dziudek commented 7 months ago

@owil - ok, so the only solution will be migration to the WASM sqlite library instead of better-sqlite3 - we will try to implement it as soon as possible in v.0.44.2

dziudek commented 7 months ago

@frontera-dot-network @owil - could you check if this version: https://drive.google.com/drive/folders/1le87WhiJCc_tJFdNiZE-KZYI1-KzLLFG?usp=sharing is working on your OS? I have prepared new version of Publii which is not using better-sqlite3 - instead it uses WASM implementation of SQLite, so it does not require native module at all.

I am not guarantee that it will work as I have experimentally built it on mac with M1 processor using linux VM, so maybe it will be required to built it on x86 machine

owil commented 7 months ago

I installed Publii_0.44.1_amd64.deb and ran into an error when trying to start Publii. Screenshot_2023-11-21_14-14-03_Publii-44-1-error2

dziudek commented 7 months ago

@owil - thank you for checking this. Could you redownload the DEB package (it is renamed to just Publii-0.44.1.deb)? I have built it on different machine and for me it is working, but I have a newer linux, so I do not know if it will solve issue with glibc

owil commented 7 months ago

It loads now. The new Publii-0.44.1.deb package fixed it. Thank you!

dziudek commented 7 months ago

@owil - great, thank you for checking. We will release officially v.0.44.2 by the end of November :) If you will observe any issues with DB-related functions - feel free to report it :)