求救 WSL2 archlinux中eaf浏览器启动失败

init.el中只有eaf相关配置,没有我的个人配置

(add-to-list 'load-path "~/.emacs.d/site-lisp/emacs-application-framework/")
(require 'eaf)

;;(require 'eaf-mermaid)
(require 'eaf-file-browser)
(require 'eaf-netease-cloud-music)
(require 'eaf-markdown-previewer)
(require 'eaf-music-player)
(require 'eaf-video-player)
(require 'eaf-rss-reader)
(require 'eaf-vue-demo)
(require 'eaf-terminal)
(require 'eaf-demo)
(require 'eaf-pdf-viewer)
(require 'eaf-image-viewer)
(require 'eaf-system-monitor)
(require 'eaf-mindmap)
(require 'eaf-file-sender)
(require 'eaf-org-previewer)
(require 'eaf-browser)
(require 'eaf-file-manager)

(setq eaf-enable-debug t)

Emacs 版本

GNU Emacs 29.0.50

操作系统信息 WSL2 Arch

NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux-logo
IMAGE_ID=archlinux
IMAGE_VERSION=2022.02.01

eaf Buffer 中报错信息(开启了gdb调试)

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffd796e640 (LWP 10908)]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yaap'
[New Thread 0x7fffbf637640 (LWP 10909)]
[New Thread 0x7fffbe9fb640 (LWP 10910)]
[New Thread 0x7fffbe06b640 (LWP 10911)]
[New Thread 0x7fffbd6db640 (LWP 10912)]
[Thread 0x7fffbd6db640 (LWP 10912) exited]
[New Thread 0x7fffbd6db640 (LWP 10913)]
[New Thread 0x7fffbcd4b640 (LWP 10914)]
[New Thread 0x7fffa7fff640 (LWP 10915)]
[Thread 0x7fffa7fff640 (LWP 10915) exited]
[New Thread 0x7fffa7fff640 (LWP 10916)]
[Thread 0x7fffa7fff640 (LWP 10916) exited]
[New Thread 0x7fffa7fff640 (LWP 10917)]
[New Thread 0x7fffa766f640 (LWP 10918)]
[Thread 0x7fffa766f640 (LWP 10918) exited]
[New Thread 0x7fffa766f640 (LWP 10919)]
[Thread 0x7fffa766f640 (LWP 10919) exited]
[New Thread 0x7fffa766f640 (LWP 10920)]
[Thread 0x7fffa766f640 (LWP 10920) exited]
[New Thread 0x7fffa766f640 (LWP 10921)]
[Thread 0x7fffa766f640 (LWP 10921) exited]
[New Thread 0x7fffa766f640 (LWP 10922)]
[Thread 0x7fffa766f640 (LWP 10922) exited]
qt.webenginecontext: 

GLImplementation: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 3.3
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name eaf.py 
  *  browser-subprocess-path /usr/lib/qt6/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  disable-web-security  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-gpu-rasterization  
  *  enable-native-gpu-memory-buffers  
  *  enable-threaded-compositing  
  *  ignore-gpu-blocklist  
  *  in-process-gpu  
  *  use-gl desktop 

[New Thread 0x7fffa766f640 (LWP 10923)]
[Thread 0x7fffa766f640 (LWP 10923) exited]
[New Thread 0x7fffa766f640 (LWP 10924)]
[Detaching after fork from child process 10925]
[Detaching after fork from child process 10926]
[Detaching after fork from child process 10927]
[New Thread 0x7fffa680f640 (LWP 10930)]
[New Thread 0x7fffa5e7f640 (LWP 10931)]
[New Thread 0x7fffa54ef640 (LWP 10932)]
[New Thread 0x7fffa4b5f640 (LWP 10933)]
[New Thread 0x7fff8fdd5640 (LWP 10934)]
[New Thread 0x7fff8f445640 (LWP 10935)]
[New Thread 0x7fff8eab5640 (LWP 10936)]
[New Thread 0x7fff8e125640 (LWP 10937)]
[New Thread 0x7fff8d795640 (LWP 10938)]
[New Thread 0x7fff8ce05640 (LWP 10939)]
[New Thread 0x7fff77fff640 (LWP 10940)]
[New Thread 0x7fff7766f640 (LWP 10941)]
[New Thread 0x7fff76cdf640 (LWP 10942)]
[New Thread 0x7fff7634f640 (LWP 10943)]
[New Thread 0x7fff759bf640 (LWP 10944)]
[Thread 0x7fff759bf640 (LWP 10944) exited]
[New Thread 0x7fff759bf640 (LWP 10945)]
[Thread 0x7fff759bf640 (LWP 10945) exited]
[New Thread 0x7fff759bf640 (LWP 10946)]
[Thread 0x7fff759bf640 (LWP 10946) exited]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 153, in new_buffer
    self.create_buffer(buffer_id, url, module_path, arguments)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 172, in create_buffer
    app_buffer = module.AppBuffer(buffer_id, url, arguments)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/app/browser/buffer.py", line 38, in __init__
    BrowserBuffer.__init__(self, buffer_id, url, arguments, False)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/webengine.py", line 815, in __init__
    self.zoom_data = ZoomSizeDb(os.path.join(os.path.dirname(self.config_dir), "browser", "zoom_data.db"))
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/webengine.py", line 1539, in __init__
    self._conn = sqlite3.connect(dbpath)
sqlite3.OperationalError: unable to open database file
[New Thread 0x7fff759bf640 (LWP 10947)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[New Thread 0x7fff7502f640 (LWP 10948)]
[New Thread 0x7fff57fff640 (LWP 10949)]
[Thread 0x7fff759bf640 (LWP 10947) exited]
[New Thread 0x7fff759bf640 (LWP 10956)]
[New Thread 0x7fff5766f640 (LWP 10959)]
[New Thread 0x7fff56cdf640 (LWP 10965)]
[New Thread 0x7fff5634f640 (LWP 10966)]
[Thread 0x7fff5634f640 (LWP 10966) exited]
[New Thread 0x7fff5634f640 (LWP 10967)]
[New Thread 0x7fff558bf640 (LWP 10968)]
[New Thread 0x7fff54f2f640 (LWP 10969)]
[New Thread 0x7fff3bfff640 (LWP 10970)]
[New Thread 0x7fff3b36f640 (LWP 10971)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
[Thread 0x7fff3b36f640 (LWP 10971) exited]
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[New Thread 0x7fff3b36f640 (LWP 10972)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[Thread 0x7fff3b36f640 (LWP 10972) exited]
[New Thread 0x7fff3b36f640 (LWP 10973)]
Traceback (most recent call last):
[Thread 0x7fff3b36f640 (LWP 10973) exited]
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[New Thread 0x7fff3b36f640 (LWP 10974)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[Thread 0x7fff3b36f640 (LWP 10974) exited]
[New Thread 0x7fff3b36f640 (LWP 10975)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[Thread 0x7fff3b36f640 (LWP 10975) exited]
[New Thread 0x7fff3b36f640 (LWP 10976)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[Thread 0x7fff3b36f640 (LWP 10976) exited]
[New Thread 0x7fff3b36f640 (LWP 10977)]
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'e9d5-1cdb-725c-180b-2eff-10d0-0f2e'
[Thread 0x7fff3b36f640 (LWP 10977) exited]
[Thread 0x7fffa54ef640 (LWP 10932) exited]
[Thread 0x7fff8d795640 (LWP 10938) exited]
[Thread 0x7fff8f445640 (LWP 10935) exited]
[Thread 0x7fff8e125640 (LWP 10937) exited]
[Thread 0x7fff8eab5640 (LWP 10936) exited]

eaf-demo可以启动但是显示不正常

日志错误的意思是 Sqlite 的路径无法访问,是不是 WSL2 隔离导致的?

第二个窗口, WSL2是用虚拟机 + 本地RDP来实现的,这种操作估计EAF没法正常获取窗口位置。

不应该啊 ,数据库应该也在虚拟机里呀

大佬debug的输出在哪里呀,我直接加print是没有的

日志写的有位置哈,哈哈哈哈

是不是开了 PGTK

我直接用Sqlite创建数据库都不行诶

刚刚重启了一下WSL又能创建数据库了 我手动在eaf文件夹下面创建了一个browser文件夹还有zoom_data.db 现在变成这样了

Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 153, in new_buffer
    self.create_buffer(buffer_id, url, module_path, arguments)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 172, in create_buffer
    app_buffer = module.AppBuffer(buffer_id, url, arguments)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/app/browser/buffer.py", line 79, in __init__
    self.buffer_widget.init_dark_mode_js(__file__, get_emacs_var("eaf-browser-text-selection-color"))
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/webengine.py", line 741, in init_dark_mode_js
    js_string = open(os.path.join(os.path.dirname(module_path), "node_modules", "darkreader", "darkreader.js")).read()
FileNotFoundError: [Errno 2] No such file or directory: '/home/yaap/.emacs.d/site-lisp/emacs-application-framework/app/browser/node_modules/darkreader/darkreader.js'
Traceback (most recent call last):
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/core/utils.py", line 50, in on_signal_received
    self._func(obj, *args, **kwargs)
  File "/home/yaap/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 237, in update_views
    view = View(self.buffer_dict[buffer_id], view_info)
KeyError: 'd5f2-c761-57d8-bef1-8e77-6e15-98e7'
Fontconfig error: Cannot load default config file: No such file: (null)

手动创建 browser 是不行的,因为你手动创建的目录没有用 ./install-eaf.py 安装依赖打不开。

终于能打开了

是因为python安装脚本没有正常npm install, 我自己npm install了一下就可以了