Solved Luakit browser won't start -- any solution?

Hi,

After some software updates my www/luakit browser refuses to start. AFAIK Luakit itself wasn't updated.

Starting Luakit from terminal gives the following output:

Code:
$ luakit
[    0.024773] I [core/luah]: Loading rc: /usr/local/etc/xdg/luakit/rc.lua
[    0.077072] W [glib]: GLib: g_regex_new: assertion '(compile_options & ~G_REGEX_COMPILE_MASK) == 0' failed
[    0.077097] W [glib]: GLib: g_regex_replace_eval: assertion 'regex != NULL' failed
[    0.077154] E [core/common/lualib]: Lua error: attempt to concatenate a nil value
                 Traceback:
                 (1) [C]                                           in function traceback
                 (2) /usr/local/share/luakit/lib/modes.lua:36      in function new_mode
                 (3) /usr/local/share/luakit/lib/modes.lua:139     in main chunk
                 (4) [C]                                           in function require
                 (5) /usr/local/share/luakit/lib/log_chrome.lua:14 in main chunk
                 (6) [C]                                           in function require
                 (7) /usr/local/etc/xdg/luakit/rc.lua:50           in main chunk
[    0.077168] W [core/luah]: loading rc '/usr/local/etc/xdg/luakit/rc.lua' failed, falling back...
[    0.016750] W [core/luah]: couldn't load any rc file
[    0.016819] F [core/luakit]: couldn't find rc file

The config /usr/local/etc/xdg/luakit/rc.lua exists. Maybe some update changed it, that I don't know and don't know how to verify.

Does any of you have a clue so I can get this browser running again?

TIA,
 
Thanks for looking with me!

Have to look at the file for possible errors. I never touched it.

Reinstalled www/luakit which should re-install the default rc.lua file. No change in (non-)behaviour.
 
Last edited:
The issue is alike the one reported on Github on an Arch Linux system, as reported in the text error file:


It is suggested it has something to do with an update of devel/glib20 and affiliated files libpcre2. There are quite a lot of those files /usr/local/lib/libpcre2-*:


Hope to find some clues there. Also curious (notably curious) why this happens on my system and not eg. at Alain De Vos 's box.
 
Issue is stemming from the glib library at you said. It would help to share and compare the glib version from both of you (meine and Alain De Vos).
What is in your line in file /usr/local/etc/xdg/luakit/rc.lua:50 ? If you Alain do have that line can you test that line in your setup?
 
Code:
$ pkg info glib
glib-2.74.0,2
Name           : glib
Version        : 2.74.0,2
Installed on   : Wed Oct  5 21:34:53 2022 CEST
Origin         : devel/glib20
Architecture   : FreeBSD:13:amd64

/usr/local/etc/xdg/luakit/rc.lua, line 50: (leading numbers are line numbers)

Code:
49  -- Add luakit;//log/ chrome page
50  local log_chrome = require "log_chrome"

The above seems to point at /usr/local/share/luakit/lib/log_chrome.lua. From the top of this file this is the "Luakit log viewer. This module supplies the <luakit://log/> chrome page, which displays the most recent log messages". Line 14 of that file says
Code:
local modes = require "modes"
.
 
The Github project Issue # 1005, the problem with glib (glib-2.74.0,2 in our case), has been resolved in www/luakit-devel:

Commited changes:

www/luakit-devel (installed from package) runs as expected with glib-2.74.0,2 on a test system.

With the commited changes applied to www/luakit port source this also works fine with glib-2.74.0,2.

Somebody using www/luakit should file a bug report, and eventually provide a patch.
 
www/luakit-devel (installed from package) runs as expected with glib-2.74.0,2 on a test system.

Reaction on the reported bug revealed that the issue is already resolved in www/luakit-devel.

n00b-question: how do I run www/luakit-devel ? (can't find any operator in the man page)

I installed the package with pkg install luakit-devel. This removed de regular version of luakit, but there is only possibility of starting 'luakit' and doing so gives the same error as above.
 
n00b-question: how do I run www/luakit-devel ? (can't find any operator in the man page)

I installed the package with pkg install luakit-devel. This removed de regular version of luakit, but there is only possibility of starting 'luakit' ...
That's supposed to be so. The binary of www/luakit and www/luakit-devel have the same name:
Code:
% pkg info -l luakit | grep bin/
    /usr/local/bin/luakit

% pkg info -l luakit-devel | grep bin/
    /usr/local/bin/luakit

starting 'luakit' and doing so gives the same error as above.
www/luakit-devel works fine here (with glib-2.74.0,2).

package version luakit-devel-2.3.26,1
port version ...... luakit-devel-2.3.1.6,1
Rich (BB code):
$ pkg info -d luakit-devel
luakit-devel-2.3.26,1:
    pango-1.50.9
    gtk3-3.24.34
    fontconfig-2.14.0,1
    webkit2-gtk3-2.34.6_3
    freetype2-2.12.1_2
    lua51-5.1.5_9
    gdk-pixbuf2-2.42.9
    cairo-1.17.4_2,3
    lua51-luafilesystem-1.8.0
    libsoup-2.74.2_1
    glib-2.74.0,2
    gettext-runtime-0.21
    desktop-file-utils-0.26_1
    dbus-glib-0.112
    sqlite3-3.39.3,1
    atk-2.38.0
 
Strange,

I installed the same www/luakit-devel and get the same output on pkg info -d luakit-devel, but (and) the same error messages as in my first post in this tread.

Searching...
 
I searched on,
  • checked all if all dependencies listed with pkg info -d luakit-devel are actually there;
  • checked all if all required shared libs form pkg info luakit-devel are on my box.

All files with the right version are on my system. Still www/luakit-devel gives the same error as in my initial post.

When checking I noticed that there are several versions of the same libraries on my system, e.g.
# find / | grep libgdk-3
/usr/local/lib/libgdk-3.so
/usr/local/lib/libgdk-3.so.0.2404.30
/usr/local/lib/libgdk-3.so.0


where luakit-devel only needs libgdk-3.so.0

Q1: Could having more versions aboard cause trouble?

Further I noticed that the search results gave some *.py files. All Python-stuff on my box is py39-*.

Q2: Could the installed version of Python have anything to do with not starting?
 
Problem was caused by a glib change. The latest luakit-devel in ports solved this.
Just update your portstree and luakit-devel.
 
The current port/package 2.3,1 www/luakit has been fixed [EDIT] not been fixed, please see post # 25 [/EDIT], with www/luakit-devel, both are working fine on 13.1-RELEASE.

When checking I noticed that there are several versions of the same libraries on my system, e.g.
Code:
 # find / | grep libgdk-3
/usr/local/lib/libgdk-3.so
/usr/local/lib/libgdk-3.so.0.2404.30
/usr/local/lib/libgdk-3.so.0


where luakit-devel only needs libgdk-3.so.0

Q1: Could having more versions aboard cause trouble?

The real library is libgdk-3.so.0.2404.30, the other two are symlinks to it:
Code:
% ll /usr/local/lib/libgtk-3*
lrwxr-xr-x  1 root  wheel       21 Aug 18 04:30 /usr/local/lib/libgtk-3.so@ -> libgtk-3.so.0.2404.30
lrwxr-xr-x  1 root  wheel       21 Aug 18 04:30 /usr/local/lib/libgtk-3.so.0@ -> libgtk-3.so.0.2404.30
-rwxr-xr-x  1 root  wheel  8677200 Aug 18 04:30 /usr/local/lib/libgtk-3.so.0.2404.30*

Further I noticed that the search results gave some *.py files. All Python-stuff on my box is py39-*.
The default of python3 has been switched to 3.9 some time ago.

Q2: Could the installed version of Python have anything to do with not starting?
I don't think so. That's what I have on my system:
Code:
 % pkg info -g 'py*'
py39-brotli-1.0.9
py39-cairo-1.21.0,1
py39-certifi-2022.9.24
py39-evdev-1.6.0
py39-gobject3-3.42.2
py39-libpeas-1.26.0
py39-mutagen-1.45.1
py39-pycryptodomex-3.15.0
py39-pyudev-0.22.0
py39-setuptools-63.1.0
py39-six-1.16.0
py39-sqlite3-3.9.14_7
py39-websockets-10.3
pygobject3-common-3.42.2
python38-3.8.14
python39-3.9.14

I assume you are running a supported FreeBSD version (12.3-RELEASE, 13.1-RELEASE[-STABLE], you could, if you are willing, delete all installed packages and install all again:
Code:
# pkg prime-list > primelist
# pkg del -a
# pkg install `cat primelist`

If that is not possible, try running % truss -o luakit.log luakit and check the log file.
 
Last edited:
Me too, FreeBSD 13.1-RELEASE-p2 amd6:

Code:
NomadBSD> sudo truss -o luakit.log luakit
[1.884495] I [core/luah]: Loading rc: /usr/local/etc/xdg/luakit/rc.lua
[3.227360] W [glib]: GLib: g_regex_new: assertion '(compile_options & ~G_REGEX_COMPILE_MASK) == 0' failed
[3.227631] W [glib]: GLib: g_regex_replace_eval: assertion 'regex != NULL' failed
[3.227934] E [core/common/lualib]: Lua error: attempt to concatenate a nil value
    Traceback:
    (1) [C]                                           in function traceback
    (2) /usr/local/share/luakit/lib/modes.lua:36      in function new_mode
    (3) /usr/local/share/luakit/lib/modes.lua:139     in main chunk
    (4) [C]                                           in function require
    (5) /usr/local/share/luakit/lib/log_chrome.lua:14 in main chunk
    (6) [C]                                           in function require
    (7) /usr/local/etc/xdg/luakit/rc.lua:50           in main chunk
[3.228192] W [core/luah]: loading rc '/usr/local/etc/xdg/luakit/rc.lua' failed, falling back...
[0.318140] W [core/luah]: couldn't load any rc file
[0.318642] F [core/luakit]: couldn't find rc file
 
Me too, FreeBSD 13.1-RELEASE-p2 amd6:
OK, but why does the shell prompt print NomadBSD?
NomadBSD> sudo truss -o luakit.log luakit
If your system is NomadBSD, I don't know which package repository they use, but both versions of luakit packages/ports from the official FreeBSD repositories work fine on "FreeBSD" 13.1-RELEASE. I can't reproduce the error.

Note uname and pkg info commands.

www/luakit: [EDIT] please see post #25 [/EDIT]
luakit.png

www/luakit-devel:
luakit-devel.png

truss(1) wasn't helpful, it prints basically the same when executing luakit from terminal.

I can't tell what's causing the error on your system, but I would de-install and install all packages again to eliminate any possible dependency inconsistency.
 
Last edited:
The current port/package 2.3,1 www/luakit has been fixed, with www/luakit-devel, both are working fine on 13.1-RELEASE.

[...]

I assume you are running a supported FreeBSD version (12.3-RELEASE, 13.1-RELEASE[-STABLE], you could, if you are willing, delete all installed packages and install all again

My box runs FreeBSD 13.1-RELEASE-p2 GENERIC amd64.

The symlinks T-Daemon provided are right here. Of the Python things I have some are newer and some are missing, but that would depend on other packages so comparing is a bit difficult. The truss gets the initial error lines.

Have to try deleting and installing all packages. Anyhow, this issue learned me a lot of new things ;-)

I'll be back with a report after re-installing all.
 
Report:

deleted and reinstalled all packages as T-Daemon suggested, but the result and error message stays the same. In hindsight I could have reinstalled the basics like x11/xorg and www/luakit first, and then one by one other software and checking if luakit still runs. Would be rather time consuming...

Checked all dependencies and versions --> OK
Checked all libraries and versions --> OK

This excercise let me think of another possible cause:

Q: are libraries also deleted when you delete the package they belongs to?

Checking if my /usr/local/etc/xdg/luakit/rc.lua differs from one on a well running box is a to-do. Now checking the rc-file from the Luakit Github site.

[update 20221106]

I checked on differences between the two mentioned rc.lua files from the installation and the GitHub site. There are only two differences, both in the comments, lines marked with '--' so they can't cause the problem.

As suggested above the final option I see is to make a basic installation, XOrg and LuaKit first and then see what the rest does. Will be some work though...

To be continued in this theatre...
 
Last edited:
I checked in a fresh installed, clean VM, www/luakit-devel is working as expected, www/luakit is not.

I have to apologize. When testing on my host system, I had www/luakit build from ports to make sure it's the latest available version, but I overlooked that the port has been patched by me and I forgot to revert to original state. I should have copied the port in a separate directory and tested from there instead from the official ports tree clone. Sorry for the incorrect statement.

The fetched www/luakit package from the remote (latest) FreeBSD package repository wasn't fixed, it terminates with the known error.

Nevertheless, www/luakit-devel package works in a fresh installed VM.
 
Back
Top