提交前确认
使用平台
Linux
问题严重程度
核心功能受影响(在下一个常规发布中必须修复)
问题描述
Linux 打包版中,首次初始化后点击自动获取数据库密钥或图片密钥时,主进程 IPC handler 报错,keyService 为 undefined,导致 Linux 自动获取密钥流程不可用。
复现步骤
- 使用
upstream/main 构建 Linux 产物。
- 安装
release/linux-unpacked:
cd release/linux-unpacked
sudo ./install.sh
- 清空 WeFlow 用户数据目录后重新启动:
trash-put ~/.config/weflow
weflow
- 进入初始化流程,点击自动获取微信密钥或图片密钥。
- 控制台出现
keyService 为 undefined 的错误。
预期行为
Linux 下自动获取数据库密钥、图片密钥时,KeyServiceLinux 应该已完成初始化,并正常执行对应方法。
实际行为
控制台报错:
APPIMAGE env is not defined, current application is not an AppImage
Error occurred in handler for 'key:autoGetDbKey': TypeError: Cannot read properties of undefined (reading 'autoGetDbKey')
at /opt/weflow/resources/app.asar/dist-electron/main.js:799:51565
at Session.<anonymous> (node:electron/js2c/browser_init:2:116478)
at Session.emit (node:events:508:28)
Error occurred in handler for 'key:autoGetImageKey': TypeError: Cannot read properties of undefined (reading 'autoGetImageKey')
at /opt/weflow/resources/app.asar/dist-electron/main.js:799:51703
at Session.<anonymous> (node:electron/js2c/browser_init:2:116478)
at Session.emit (node:events:508:28)
其中 APPIMAGE env is not defined 是非 AppImage 安装方式下的 updater 提示,不是本 issue 的修复目标;真正阻断功能的是后续 keyService 为 undefined。
另外在打包产物中也观察到过 Linux key service 加载阶段错误:
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received undefined
at createRequire (...)
at /opt/weflow/resources/app.asar/dist-electron/keyServiceLinux-*.js
操作系统版本
Ubuntu 24.04.4 LTS / WSL2
应用版本
4.3.0 / upstream main ca6c479
系统架构
x64
补充信息
本地验证过一个最小修复:
electron/main.ts 中 Linux 分支同步初始化 KeyServiceLinux。
electron/services/keyServiceLinux.ts 中使用 createRequire(__filename),避免打包后的 CommonJS 产物里 import.meta.url 被转换成无效值。
修复版重新完整构建并安装后,Linux 初始化和图片解密流程验证通过。
提交前确认
使用平台
Linux
问题严重程度
核心功能受影响(在下一个常规发布中必须修复)
问题描述
Linux 打包版中,首次初始化后点击自动获取数据库密钥或图片密钥时,主进程 IPC handler 报错,
keyService为undefined,导致 Linux 自动获取密钥流程不可用。复现步骤
upstream/main构建 Linux 产物。release/linux-unpacked:cd release/linux-unpacked sudo ./install.shtrash-put ~/.config/weflow weflowkeyService为undefined的错误。预期行为
Linux 下自动获取数据库密钥、图片密钥时,
KeyServiceLinux应该已完成初始化,并正常执行对应方法。实际行为
控制台报错:
其中
APPIMAGE env is not defined是非 AppImage 安装方式下的 updater 提示,不是本 issue 的修复目标;真正阻断功能的是后续keyService为undefined。另外在打包产物中也观察到过 Linux key service 加载阶段错误:
操作系统版本
Ubuntu 24.04.4 LTS / WSL2
应用版本
4.3.0 / upstream main ca6c479
系统架构
x64
补充信息
本地验证过一个最小修复:
electron/main.ts中 Linux 分支同步初始化KeyServiceLinux。electron/services/keyServiceLinux.ts中使用createRequire(__filename),避免打包后的 CommonJS 产物里import.meta.url被转换成无效值。修复版重新完整构建并安装后,Linux 初始化和图片解密流程验证通过。