nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Error in FFI method: The value NIL is not of type CL-WEBKIT2:WEB-VIEW when binding CL-WEBKIT2::WEBVIEW

Open jjba23 opened this issue 11 months ago • 5 comments

Describe the bug

Let me first thank you all for this incredible project, and all the work you put into it!

I sporadically get a crash on Nyxt and see this appear in the minibuffer:

Error in FFI method: The value NIL is not of type CL-WEBKIT2:WEB-VIEW when binding CL-WEBKIT2::WEBVIEW

Screen goes blank, modeline disappears (although M-x still works) and the browser becomes pretty unresponsive, and even refuses to close.

Precise recipe to reproduce the issue

mostly when browsing "heavier" websites, and also when browsing pages that are in HTML quirks mode. This is not consistent though, but it's happening often, and I don't know how to properly give you more debug information.

For website-specific issues: Can you reproduce this issue with Epiphany / GNOME Web (https://wiki.gnome.org/Apps/Web)?

Not able to reproduce in Epiphany

Information

  • OS name+version: Guix system (e77a676)
  • Graphics card and driver: AMD Radeon RX 6800 XT
  • Desktop environment / Window manager name+version: Hyprland 0.47.2
  • Installation method (Flatpak, Guix, package manager, build from source): Guix
  • Output of nyxt --system-information:
Nyxt version: 3.11.7
Renderer: GI-GTK
Operating system kernel: Linux 6.13.6
Lisp implementation: SBCL 2.4.10 (Dynamic space size: 3221225472)
Features: (:NYXT-GI-GTK :NYXT-GTK :NYXT-3.11 :NYXT-3 :NYXT-3.11.7
 :CLIPBOARD-CONTENT-METHOD :SWANK :SLYNK :PLUMP-UTF-32 :PARENSCRIPT :NSYMBOLS
 :FSET-EXT-STRINGS :NAMED-READTABLES :CL-FAD :LPARALLEL :21BIT-CHARS
 :CUSTOM-HASH-TABLE-NATIVE :CL-PPCRE-UNICODE :CL-UNICODE :CHUNGA :FLEXI-STREAMS
 :CL-PPCRE :WEBKIT2 :WEBKIT-2.46.6 :WEBKIT-2.46 :WEBKIT-2
 :WEBKIT2-CORS-ALLOWLIST :WEBKIT2-PASTE-PLAINTEXT :WEBKIT2-TRACKING
 :WEBKIT2-MUTE :WEBKIT2-EMOJI :WEBKIT2-MEDIA :WEBKIT2-SANDBOXING :GTK-3-22
 :GTK-3-20 :GTK-3-18 :GTK-3-16 :GTK-3-14 :GTK-3-12 :GTK-3-10 :GTK-3-8 :GTK-3-6
 :GTK-3-4 :GTK :GDK-3-22 :GDK-3-20 :GDK-3-18 :GDK-3-16 :GDK-3-14 :GDK-3-12
 :GDK-3-10 :GDK-3-8 :GDK-3-6 :GDK-3-4 :CAIRO-1-10 :CAIRO-1-12 :GDK-PIXBUF
 :CLOSER-MOP :GLIB-2-30 :GLIB-2-32 :GLIB-2-34 :GLIB-2-36 :GLIB-2-38 :GLIB-2-40
 :GLIB-2-42 :GLIB-2-44 :GLIB-2-46 :GLIB-2-48 :GLIB-2-50 :GLIB-2-52 :GLIB-2-54
 :GLIB-2-56 :GLIB-2-58 :GLIB :BORDEAUX-THREADS :GLOBAL-VARS
 :ASDF-SYSTEM-CONNECTIONS :LPARALLEL.WITH-CLTL2 :LPARALLEL.WITH-CAS
 :LPARALLEL.WITH-STEALING-SCHEDULER :SPLIT-SEQUENCE
 CFFI-FEATURES:FLAT-NAMESPACE CFFI-FEATURES:X86-64 CFFI-FEATURES:UNIX :CFFI
 CFFI-SYS::FLAT-NAMESPACE ALEXANDRIA::SEQUENCE-EMPTYP :FAST-IO-SV :FAST-IO
 :CL-JSON-CLOS :CL-JSON :SBCL-USES-SB-ROTATE-BYTE CHIPZ-SYSTEM:GRAY-STREAMS
 :THREAD-SUPPORT :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
 :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ARENA-ALLOCATOR :X86-64 :GENCGC :64-BIT
 :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB :SB-PACKAGE-LOCKS
 :SB-THREAD :SB-UNICODE :SBCL :UNIX)

ASDF version: 3.3.7
ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY
                      USER-SOURCE-REGISTRY-DIRECTORY
                      DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY
                      SYSTEM-SOURCE-REGISTRY-DIRECTORY
                      DEFAULT-SYSTEM-SOURCE-REGISTRY)
Critical dependencies: (/gnu/store/9qf8mfxsjch4ng00a6ypyrgc7p2pacm5-sbcl-cl-cffi-gtk-3.8.8-3.1700fe6/share/common-lisp/sbcl/cl-cffi-gtk/gtk/cl-cffi-gtk.asd
 /gnu/store/6bsyyvsw0hahldjmcn855c1q982n4g98-cl-gobject-introspection-0.3-4.4908a84/share/common-lisp/source/cl-gobject-introspection/cl-gobject-introspection.asd
 /gnu/store/cq2xvmvip4ymk6b1zvf2awx8xvc2x20d-sbcl-cl-webkit-3.5.10/share/common-lisp/sbcl/cl-webkit/webkit2/cl-webkit2.asd)

Guix version:

Output when started from a shell

jjba23 avatar Mar 14 '25 08:03 jjba23

Now in latest commit from guix repos, it doesn't even go past a blank screen at start. Modeline does render tho.

(WebKitWebProcess:2): Gdk-WARNING **: 14:17:39.324: Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
<WARN> [14:17:39] Warning: Error in FFI method: The value
  1073741824
is not of type
  GDK:GDK-EVENT
when binding NYXT/RENDERER/GTK::EVENT

jjba23 avatar Apr 01 '25 21:04 jjba23

Seems to work on my side.

aadcg avatar Apr 02 '25 07:04 aadcg

I get this same error every time I open Nyxt. Nyxt hasn't worked for me in weeks now(I'm on version 3.12.0-1.4 on Tumbleweed). If I try open the buffer nothing happens. It is unusable for me.

rousty88 avatar Apr 15 '25 07:04 rousty88

I get similar messages to your April 1 post . I built Nyxt 3.12.0 from the source tarball using Sbcl 2.5.4 . I am on Devuan 5 Linux (like Debian 12 without systemd) , libwebkit2gtk 2.48.1 , kernel 6.5.6 .

For comparison , I installed the Nyxt Flatpak . Works fine .

So my problem seems to be a dependency / environment problem . Here are the messages when I run the built-from-source binary -

<WARN> [21:24:45] Warning: Error on GTK thread: The value NIL is not of type STRING when binding CL-WEBKIT2::WORLD

nyxt file://$PWD/manual.html <INFO> [21:29:37] Restoring 1 buffer from history. <WARN> [21:29:37] Warning: Error in FFI method: The value 1073741824 is not of type GDK:GDK-EVENT when binding NYXT/RENDERER/GTK::EVENT

11: (NYXT:ECHO-WARNING "Error in FFI method: ~a"

hydeparkny avatar May 25 '25 01:05 hydeparkny

It is the same for me, using any nyxt version (starting from nyxt 3.11.7 and up to master branch) I will get A GTK error about CL-WEBKIT2::WORLD. It looks like the latest webkit versions intoduced some changes to functions that mess up the cl-webkit binding and because many distributions follow the rolling system (meaning that there is only one version of webkit in the repositories, except for Gentoo maybe), nyxt will work only in flatpak or AppImages with Electron renderer.

Yappaholic avatar May 26 '25 10:05 Yappaholic

You're correct, please try using the AppImages. If I have time I'll make an AppImage variant of the GTK port,

jmercouris avatar Jun 30 '25 04:06 jmercouris