Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ArchLinux下无法运行 #93

Closed
zxp19821005 opened this issue Nov 30, 2023 · 6 comments
Closed

ArchLinux下无法运行 #93

zxp19821005 opened this issue Nov 30, 2023 · 6 comments
Labels
BUG 有些东西不工作

Comments

@zxp19821005
Copy link

是网页端还是客户端

客户端

当前系统环境

EndeavourOS 6.1.63-1-lts

当前 Node.js 及 npm 版本

v18.18.2/v10.2.4

当前版本

v2.0.0-beta.2

具体信息

我计划将该软件包移植到ArchLinux的AUR,但是下载了deb包 后解压直接运行,报错:

$ ./splayer 
Checking for beta autoupdate feature for deb/rpm distributions
Found package-type: deb
[133345:1130/103630.437152:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: 无此接口“org.freedesktop.portal.FileChooser”
[133345:1130/103630.437195:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
(node:133345) UnhandledPromiseRejectionWarning: TypeError: electron.app.setUserTasks is not a function
    at createSystemInfo (/home/zxp-endeavouros/.cache/paru/clone/splayer-bin/src/opt/SPlayer/resources/app.asar/out/main/index.js:58:16)
    at /home/zxp-endeavouros/.cache/paru/clone/splayer-bin/src/opt/SPlayer/resources/app.asar/out/main/index.js:2724:3
(Use `splayer --trace-warnings ...` to show where the warning was created)
(node:133345) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[133345:1130/103630.474544:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.UnknownMethod: 在路径 org.freedesktop.portal.Settings 的对象上没有“/org/freedesktop/portal/desktop”接口
(node:133345) electron: Failed to load URL: http://127.0.0.1:7899/ with error: ERR_CONNECTION_REFUSED

然后又下载了AppImage的包,运行报错:

$ ./SPlayer-2.0.0-beta.2.AppImage 
[134213:1130/103817.377324:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: 无此接口“org.freedesktop.portal.FileChooser”
[134213:1130/103817.377365:ERROR:select_file_dialog_linux_portal.cc(274)] Failed to read portal version property
(node:134213) UnhandledPromiseRejectionWarning: TypeError: electron.app.setUserTasks is not a function
    at createSystemInfo (/tmp/.mount_SPlayemAclST/resources/app.asar/out/main/index.js:58:16)
    at /tmp/.mount_SPlayemAclST/resources/app.asar/out/main/index.js:2724:3
(Use `splayer --trace-warnings ...` to show where the warning was created)
(node:134213) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[134213:1130/103817.696125:ERROR:object_proxy.cc(590)] Failed to call method: org.freedesktop.portal.Settings.Read: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.UnknownMethod: 在路径 org.freedesktop.portal.Settings 的对象上没有“/org/freedesktop/portal/desktop”接口
(node:134213) electron: Failed to load URL: http://127.0.0.1:7899/ with error: ERR_CONNECTION_REFUSED

似乎是客户端没有启动服务?

@zxp19821005 zxp19821005 added the BUG 有些东西不工作 label Nov 30, 2023
imsyy added a commit that referenced this issue Nov 30, 2023
@imsyy
Copy link
Owner

imsyy commented Dec 1, 2023

抱歉,我对于 Linux 也不太懂 🤣,不过可以试下 v2.0.0-beta.3 版本,目前可在 Ubuntu 22.04 中正常运行

@wunewww
Copy link

wunewww commented Dec 21, 2023

@zxp19821005 你的XDG Desktop Portal的后端有问题,可能没有FileChooser接口,参考Archwiki - XDG Desktop Portal#List of backends and interfaces,换个后端、换个桌面环境或者做个fallback

@zxp19821005
Copy link
Author

zxp19821005 commented Dec 22, 2023

@wunewww 感谢!
目前虽然运行报错:
image
但是点击“确认”之后可以正常使用。
另,按照ArchLinux的Electron相关打包准则,我使用系统自带的electron27运行如下命令:

env ELECTRON_IS_DEV=0 NODE_ENV=production path="./:$PATH" electron27 app.asar
env ELECTRON_IS_DEV=0 NODE_ENV=debug path="./:$PATH" electron27 app.asar

时报错:“网络连接错误,请检查您当前的网络状态”
但是访问http://127.0.0.1:11451/完全正常,不知道这个何解?

@zxp19821005
Copy link
Author

$ env ELECTRON_IS_DEV=0 NODE_ENV=debug path="./:$PATH" electron27 app.asar
11:39:35.025 › 主进程初始化
{ port: '11451', host: '127.0.0.1' }
server running @ http://127.0.0.1:11451
[173516:1222/113935.134618:ERROR:object_proxy.cc(577)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: 无此接口“org.freedesktop.portal.FileChooser”
[173516:1222/113935.134805:ERROR:select_file_dialog_linux_portal.cc(280)] Failed to read portal version property

@wunewww
Copy link

wunewww commented Dec 22, 2023

目前虽然运行报错:
image
但是点击“确认”之后可以正常使用。

你是用哪个提交构建的啊,setUserTasks是windows下electron才会有的函数,我看了我本地构建出的index.js 应该不会有这个问题的。

$ env ELECTRON_IS_DEV=0 NODE_ENV=debug path="./:$PATH" electron27 app.asar
11:39:35.025 › 主进程初始化
{ port: '11451', host: '127.0.0.1' }
server running @ http://127.0.0.1:11451
[173516:1222/113935.134618:ERROR:object_proxy.cc(577)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: 无此接口“org.freedesktop.portal.FileChooser”
[173516:1222/113935.134805:ERROR:select_file_dialog_linux_portal.cc(280)] Failed to read portal version property

从报错内容上看,应该还是之前说的portal的问题,你看看能不能想办法做一个fallback。一般来说应该是可以自动fallback, @zxp19821005 试试这个can't open file chooser in flatpak apps

我是linux mint,没法对你arch打包起到什么帮助了。我建议你上arch的论坛去问问,

@imsyy
Copy link
Owner

imsyy commented Dec 22, 2023

@zxp19821005 setUserTasks 方法已于 883b6d1 提交中去除,拉取下最新分支

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BUG 有些东西不工作
Projects
None yet
Development

No branches or pull requests

3 participants