Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Bug] 1.5.2(dev) Linux 下服务模式无法正常安装 #1443

Closed
5 of 6 tasks
kands-code opened this issue Aug 28, 2024 · 4 comments
Closed
5 of 6 tasks

[Bug] 1.5.2(dev) Linux 下服务模式无法正常安装 #1443

kands-code opened this issue Aug 28, 2024 · 4 comments
Labels
P: Linux T: Bug Something isn't working
Milestone

Comments

@kands-code
Copy link

复现步骤 / Step to reproduce

  1. 安装软件(deb/rpm)
  2. 点击 设置 -> System Service -> INSTALL

预期行为 / Expected behaviour

service 应该被正常安装

实际行为 / Actual Behaviour

由于服务的安装需要 root 权限,而不知什么原因,在点击 INSTALL 的时候并不会弹出密码请求,导致超时,服务安装自动失败

应用日志 / App logs

{"timestamp":"2024-08-27T23:20:02.099170Z","level":"ERROR","fields":{"message":"error sending request for url (https://api.ip.sb/geoip)","log.target":"app","log.module_path":"clash_nyanpasu::ipc","log.file":"tauri/src/ipc.rs","log.line":230},"target":"app","filename":"tauri/src/ipc.rs","line_number":230}
{"timestamp":"2024-08-27T23:20:17.196439Z","level":"ERROR","fields":{"message":"error sending request for url (https://api.ip.sb/geoip)","log.target":"app","log.module_path":"clash_nyanpasu::ipc","log.file":"tauri/src/ipc.rs","log.line":230},"target":"app","filename":"tauri/src/ipc.rs","line_number":230}
{"timestamp":"2024-08-27T23:22:00.446708Z","level":"ERROR","fields":{"message":"error sending request for url (https://api.ip.sb/geoip)","log.target":"app","log.module_path":"clash_nyanpasu::ipc","log.file":"tauri/src/ipc.rs","log.line":230},"target":"app","filename":"tauri/src/ipc.rs","line_number":230}
{"timestamp":"2024-08-27T23:26:03.575573Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":564},"target":"app","filename":"tauri/src/ipc.rs","line_number":564}
{"timestamp":"2024-08-27T23:26:08.571698Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":564},"target":"app","filename":"tauri/src/ipc.rs","line_number":564}
{"timestamp":"2024-08-27T23:27:58.682267Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":564},"target":"app","filename":"tauri/src/ipc.rs","line_number":564}
{"timestamp":"2024-08-27T23:35:21.542160Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":574},"target":"app","filename":"tauri/src/ipc.rs","line_number":574}
{"timestamp":"2024-08-27T23:35:26.338283Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":574},"target":"app","filename":"tauri/src/ipc.rs","line_number":574}
{"timestamp":"2024-08-27T23:35:28.172471Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri/src/core/clash/core.rs","log.line":191},"target":"app","filename":"tauri/src/core/clash/core.rs","line_number":191}
{"timestamp":"2024-08-27T23:35:28.172559Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri/src/core/clash/core.rs","line_number":206}
{"timestamp":"2024-08-27T23:35:35.324911Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":574},"target":"app","filename":"tauri/src/ipc.rs","line_number":574}
{"timestamp":"2024-08-27T23:35:35.330754Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri/src/core/clash/core.rs","log.line":191},"target":"app","filename":"tauri/src/core/clash/core.rs","line_number":191}
{"timestamp":"2024-08-27T23:35:35.330835Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri/src/core/clash/core.rs","line_number":206}
{"timestamp":"2024-08-27T23:35:40.614706Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri/src/core/clash/core.rs","log.line":191},"target":"app","filename":"tauri/src/core/clash/core.rs","line_number":191}
{"timestamp":"2024-08-27T23:35:40.614795Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri/src/core/clash/core.rs","line_number":206}
{"timestamp":"2024-08-27T23:35:49.464811Z","level":"WARN","fields":{"message":"Tried to initialize the wayland data control protocol clipboard, but failed. Falling back to the X11 clipboard protocol. The error was: Unknown error while interacting with the clipboard: A required Wayland protocol (zwlr_data_control_manager_v1 version 1) is not supported by the compositor","log.target":"arboard::platform::linux","log.module_path":"arboard::platform::linux","log.file":"/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arboard-3.4.0/src/platform/linux/mod.rs","log.line":88},"target":"arboard::platform::linux","filename":"/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/arboard-3.4.0/src/platform/linux/mod.rs","line_number":88}
{"timestamp":"2024-08-27T23:36:05.741279Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":574},"target":"app","filename":"tauri/src/ipc.rs","line_number":574}
{"timestamp":"2024-08-27T23:36:05.747486Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri/src/core/clash/core.rs","log.line":191},"target":"app","filename":"tauri/src/core/clash/core.rs","line_number":191}
{"timestamp":"2024-08-27T23:36:05.747570Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri/src/core/clash/core.rs","line_number":206}
{"timestamp":"2024-08-27T23:36:40.782231Z","level":"ERROR","fields":{"message":"failed to install service, exit code: 1, signal: 0","log.target":"app","log.module_path":"clash_nyanpasu::ipc::service","log.file":"tauri/src/ipc.rs","log.line":574},"target":"app","filename":"tauri/src/ipc.rs","line_number":574}
{"timestamp":"2024-08-27T23:36:40.789243Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri/src/core/clash/core.rs","log.line":191},"target":"app","filename":"tauri/src/core/clash/core.rs","line_number":191}
{"timestamp":"2024-08-27T23:36:40.789349Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(0), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri/src/core/clash/core.rs","line_number":206}
{"timestamp":"2024-08-27T23:52:25.819012Z","level":"DEBUG","fields":{"message":"check config in `clash`","log.target":"app","log.module_path":"clash_nyanpasu::utils::resolve","log.file":"tauri/src/utils/resolve.rs","log.line":425},"target":"app","filename":"tauri/src/utils/resolve.rs","line_number":425}

备注 / Addition details

目前可以通过手动安装来安装服务

sudo /usr/bin/nyanpasu-service install --user 【用户名】 --nyanpasu-data-dir 【用户家目录】/.local/share/clash-nyanpasu --nyanpasu-config-dir 【用户家目录】/.config/clash-nyanpasu --nyanpasu-app-dir /usr/bin

但是安装后无法通过面板启动,仍需要手动启动

sudo /usr/bin/nyanpasu-service start

环境信息 / Environment information

----------- System -----------
OS: Linux Arch Linux 6.10.6-zen1-1-zen
Arch: x86_64
----------- Device -----------
CPU: AMD Ryzen 5 4600U with Radeon Graphics @ 2.42GHz x 12
Memory: 13.52 GiB
----------- Core -----------
mihomo: Mihomo Meta v1.18.7 linux amd64 with go1.22.5 Sun Jul 28 05:47:02 UTC 2024 Use tags: with_gvisor
clash-rs: clash-rs 0.3.0
clash: Clash n2023-09-05-gdcc8d87 linux amd64 with go1.21.0 Tue Sep 5 14:21:14 UTC 2023
mihomo-alpha: Mihomo Meta alpha-8483178 linux amd64 with go1.23.0 Tue Aug 27 12:35:03 UTC 2024 Use tags: with_gvisor
----------- Build Info -----------
App Name: clash-nyanpasu
App Version: 0.1.0
Pkg Version: 1.5.2-alpha+5099400
Commit Hash: 5099400
Commit Author: Petard Jonson
Commit Date: 2024-08-27T16:53:39.000Z
Build Date: 2024-08-27T16:57:28.198Z
Build Profile: Nightly
Build Platform: x86_64-unknown-linux-gnu
Rustc Version: rustc 1.82.0-nightly (515395af0 2024-08-26)
Llvm Version: 19.1

自查步骤 / Verify steps

  • 如果您有足够的时间和能力,并愿意为此提交 PR ,请勾上此复选框 / Pull request is welcome. Check this if you want to start a pull request
  • 您已知悉如果没有提供正确的系统信息,以及日记,您的 Issue 会直接被关闭 / You have known that if you don't provide correct system information and logs, your issue will be closed directly
  • 您已仔细查看并知情 Q&AFAQ 中的内容 / You have read and understood the contents of Q&A and FAQ.
  • 您已搜索过 Issue Tracker,没有找到类似内容 / I have searched on Issue Tracker, No duplicate or related open issue has been found
  • 您确保这个 Issue 只提及一个问题。如果您有多个问题报告,烦请发起多个 Issue / Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs
  • 您确保已使用最新 Pre-release 版本测试,并且该问题在最新 Pre-release 版本中并未解决 / This bug have not solved in latest Pre-release version
@kands-code kands-code added S: Untriaged T: Bug Something isn't working labels Aug 28, 2024
@kands-code
Copy link
Author

我自己使用的是 deb 包安装,PKGBUILD 是我自己改的:

pkgname=clash-nyanpasu-bin
_pkgname=clash-nyanpasu
pkgver=1.5.2
_channel='-alpha'
_hash='+5099400'
pkgrel=1
pkgdesc='A Clash GUI based on tauri. Clash Nyanpasu~(∠・ω< )⌒☆​'
arch=('x86_64')
url='https://nyanpasu.elaina.moe/'
license=('GPL-3.0-only')
makedepends=('libarchive')
depends=('webkit2gtk' 'gtk3' 'libayatana-appindicator')
conflicts=('clash-nyanpasu-git' 'clash-nyanpasu-appimage' 'clash-nyanpasu')
provides=('clash-nyanpasu')
options=(!strip !zipman)
source=("https://github.com/LibNyanpasu/clash-nyanpasu/releases/download/pre-release/${_pkgname}_${pkgver}${_channel}${_hash}_amd64.deb")
sha256sums=('0c487aeee1142641c961a04cb8edf6dca26e52034ff0bedde91851e8b71f5d4a')
package() {
  # only extract
  bsdtar -xf data.tar.gz -C "${pkgdir}/"  
}

应该是没有问题的

@greenhat616
Copy link
Collaborator

Linux 这里 GUI 提权我不熟,有什么办法能确保 Gui 的 sudo 必定弹框吗?

@greenhat616 greenhat616 added this to the 1.6.0 milestone Aug 28, 2024
@zty012
Copy link

zty012 commented Sep 20, 2024

Linux 这里 GUI 提权我不熟,有什么办法能确保 Gui 的 sudo 必定弹框吗?

pkexec

@greenhat616
Copy link
Collaborator

Linux 这里 GUI 提权我不熟,有什么办法能确保 Gui 的 sudo 必定弹框吗?

pkexec

目前已经使用 pkexec 处理这个问题啦,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: Linux T: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants