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

应用界面在更新内核操作后,不仅内核未更新,且gui出现问题 #1681

Open
5 of 6 tasks
Nuclear-Smile opened this issue Oct 2, 2024 · 6 comments
Open
5 of 6 tasks
Labels
C: Backend T: Bug Something isn't working
Milestone

Comments

@Nuclear-Smile
Copy link

复现步骤 / Step to reproduce

复现方法如下(如果看不到图麻烦移步https://github.com/libnyanpasu/clash-nyanpasu/discussions/1679):
1、点进设置,点击“检查更新”
image

2、点击后出现mihomo内核更新按钮
image

3、点击更新后,出现弹窗说明已经更新内核
image

4、此时关闭小弹窗,发现应用界面卡死,ci's此时点击设置界面的“ipv6”,“局域网连接”与切换tun stack类型

5、通过关闭应用,发现对设置的操作中,局域网连接和ipv6是改变的,tunstack类型未变动,且内核仍然显示是上个版本,此时操作设置无反应,检查更新弹窗内容如图

image

6、通过右下角小图标重启应用回复正常

预期行为 / Expected behaviour

他应该正常更新且不对gui产生影响

实际行为 / Actual Behaviour

实际上它如上所述运行

应用日志 / App logs

我暂时先提供重启之前的日志,如果需要更多信息可以联系我。

{"timestamp":"2024-10-02T12:18:05.505016Z","level":"WARN","fields":{"message":"Failed to gracefully kill instance: Custom { kind: Other, error: "GenerateConsoleCtrlEvent failed: Error { code: HRESULT(0x80070006), message: "句柄无效。" }" }"},"target":"nyanpasu_utils::core::instance","filename":"C:\Users\runneradmin.cargo\git\checkouts\nyanpasu-utils-e9fa09e4a1433c9d\42a2e1a\nyanpasu-utils\src\core\instance.rs","line_number":294,"span":{"name":"kill"},"spans":[{"name":"kill"}]}
{"timestamp":"2024-10-02T12:18:05.536363Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(1), 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-10-02T12:18:05.536387Z","level":"ERROR","fields":{"message":"core terminated with status: TerminatedPayload { code: Some(1), signal: None }\n\n"},"target":"clash_nyanpasu::core::clash::core","filename":"tauri\src\core\clash\core.rs","line_number":206}
{"timestamp":"2024-10-02T12:18:05.605604Z","level":"WARN","fields":{"message":"instance terminated with error: ExitStatus(ExitStatus(1))"},"target":"nyanpasu_utils::core::instance","filename":"C:\Users\runneradmin.cargo\git\checkouts\nyanpasu-utils-e9fa09e4a1433c9d\42a2e1a\nyanpasu-utils\src\core\instance.rs","line_number":306,"span":{"name":"kill"},"spans":[{"name":"kill"}]}
{"timestamp":"2024-10-02T12:18:08.869445Z","level":"WARN","fields":{"message":"NewEvents emitted without explicit RedrawEventsCleared","log.target":"tao::platform_impl::platform::event_loop::runner","log.module_path":"tao::platform_impl::platform::event_loop::runner","log.file":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","log.line":359},"target":"tao::platform_impl::platform::event_loop::runner","filename":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","line_number":359}
{"timestamp":"2024-10-02T12:18:08.874266Z","level":"WARN","fields":{"message":"RedrawEventsCleared emitted without explicit MainEventsCleared","log.target":"tao::platform_impl::platform::event_loop::runner","log.module_path":"tao::platform_impl::platform::event_loop::runner","log.file":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","log.line":345},"target":"tao::platform_impl::platform::event_loop::runner","filename":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","line_number":345}
{"timestamp":"2024-10-02T12:18:21.186779Z","level":"WARN","fields":{"message":"update proxies failed: error sending request for url (http://127.0.0.1:17650/providers/proxies)\n\nCaused%5Cn%5CnCaused) by:\n 0: client error (Connect)\n 1: tcp connect error: 由于目标计算机积极拒绝,无法连接。 (os error 10061)\n 2: 由于目标计算机积极拒绝,无法连接。 (os error 10061)"},"target":"clash_nyanpasu::core::tray::proxies","filename":"tauri\src\core\tray\proxies.rs","line_number":23,"span":{"name":"loop_task"},"spans":[{"name":"loop_task"}]}
{"timestamp":"2024-10-02T12:18:43.887057Z","level":"WARN","fields":{"message":"NewEvents emitted without explicit RedrawEventsCleared","log.target":"tao::platform_impl::platform::event_loop::runner","log.module_path":"tao::platform_impl::platform::event_loop::runner","log.file":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","log.line":359},"target":"tao::platform_impl::platform::event_loop::runner","filename":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","line_number":359}
{"timestamp":"2024-10-02T12:18:43.892152Z","level":"WARN","fields":{"message":"RedrawEventsCleared emitted without explicit MainEventsCleared","log.target":"tao::platform_impl::platform::event_loop::runner","log.module_path":"tao::platform_impl::platform::event_loop::runner","log.file":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","log.line":345},"target":"tao::platform_impl::platform::event_loop::runner","filename":"C:\Users\runneradmin.cargo\registry\src\index.crates.io-6f17d22bba15001f\tao-0.16.10\src\platform_impl\windows\event_loop\runner.rs","line_number":345}
{"timestamp":"2024-10-02T12:18:45.006599Z","level":"WARN","fields":{"message":"update proxies failed: error sending request for url (http://127.0.0.1:17650/providers/proxies)\n\nCaused%5Cn%5CnCaused) by:\n 0: client error (Connect)\n 1: tcp connect error: 由于目标计算机积极拒绝,无法连接。 (os error 10061)\n 2: 由于目标计算机积极拒绝,无法连接。 (os error 10061)"},"target":"clash_nyanpasu::core::tray::proxies","filename":"tauri\src\core\tray\proxies.rs","line_number":23,"span":{"name":"loop_task"},"spans":[{"name":"loop_task"}]}
{"timestamp":"2024-10-02T12:18:47.907718Z","level":"INFO","fields":{"message":"error sending request for url (http://127.0.0.1:17650/configs)","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri\src\core\clash\core.rs","log.line":635},"target":"app","filename":"tauri\src\core\clash\core.rs","line_number":635}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::core::clash::core%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22log.line%22:635%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22line_number%22:635%7D)
{"timestamp":"2024-10-02T12:18:50.204678Z","level":"INFO","fields":{"message":"error sending request for url (http://127.0.0.1:17650/configs)","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri\src\core\clash\core.rs","log.line":635},"target":"app","filename":"tauri\src\core\clash\core.rs","line_number":635}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::core::clash::core%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22log.line%22:635%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22line_number%22:635%7D)
{"timestamp":"2024-10-02T12:18:52.503242Z","level":"INFO","fields":{"message":"error sending request for url (http://127.0.0.1:17650/configs)","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri\src\core\clash\core.rs","log.line":635},"target":"app","filename":"tauri\src\core\clash\core.rs","line_number":635}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::core::clash::core%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22log.line%22:635%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22line_number%22:635%7D)
{"timestamp":"2024-10-02T12:18:54.806670Z","level":"INFO","fields":{"message":"error sending request for url (http://127.0.0.1:17650/configs)","log.target":"app","log.module_path":"clash_nyanpasu::core::clash::core","log.file":"tauri\src\core\clash\core.rs","log.line":635},"target":"app","filename":"tauri\src\core\clash\core.rs","line_number":635}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::core::clash::core%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22log.line%22:635%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Ccore%5C%5Cclash%5C%5Ccore.rs%22,%22line_number%22:635%7D)
{"timestamp":"2024-10-02T12:18:57.105844Z","level":"ERROR","fields":{"message":"error sending request for url (http://127.0.0.1:17650/configs)","log.target":"app","log.module_path":"clash_nyanpasu::ipc","log.file":"tauri\src\ipc.rs","log.line":252},"target":"app","filename":"tauri\src\ipc.rs","line_number":252}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::ipc%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Cipc.rs%22,%22log.line%22:252%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Cipc.rs%22,%22line_number%22:252%7D)
{"timestamp":"2024-10-02T12:18:57.784476Z","level":"ERROR","fields":{"message":"update proxies buff failed: error sending request for url (http://127.0.0.1:17650/providers/proxies)","log.target":"app::clash::proxies","log.module_path":"clash_nyanpasu::feat","log.file":"tauri\src\feat.rs","log.line":437},"target":"app::clash::proxies","filename":"tauri\src\feat.rs","line_number":437}%22,%22log.target%22:%22app::clash::proxies%22,%22log.module_path%22:%22clash_nyanpasu::feat%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Cfeat.rs%22,%22log.line%22:437%7D,%22target%22:%22app::clash::proxies%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Cfeat.rs%22,%22line_number%22:437%7D)
{"timestamp":"2024-10-02T12:18:58.467047Z","level":"ERROR","fields":{"message":"update proxies buff failed: error sending request for url (http://127.0.0.1:17650/providers/proxies)","log.target":"app::clash::proxies","log.module_path":"clash_nyanpasu::feat","log.file":"tauri\src\feat.rs","log.line":437},"target":"app::clash::proxies","filename":"tauri\src\feat.rs","line_number":437}%22,%22log.target%22:%22app::clash::proxies%22,%22log.module_path%22:%22clash_nyanpasu::feat%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Cfeat.rs%22,%22log.line%22:437%7D,%22target%22:%22app::clash::proxies%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Cfeat.rs%22,%22line_number%22:437%7D)
{"timestamp":"2024-10-02T12:19:03.586036Z","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}%22,%22log.target%22:%22app%22,%22log.module_path%22:%22clash_nyanpasu::ipc%22,%22log.file%22:%22tauri%5C%5Csrc%5C%5Cipc.rs%22,%22log.line%22:230%7D,%22target%22:%22app%22,%22filename%22:%22tauri%5C%5Csrc%5C%5Cipc.rs%22,%22line_number%22:230%7D)
{"timestamp":"2024-10-02T12:19:08.834470Z","level":"WARN","fields":{"message":"update proxies failed: error sending request for url (http://127.0.0.1:17650/providers/proxies)\n\nCaused%5Cn%5CnCaused) by:\n 0: client error (Connect)\n 1: tcp connect error: 由于目标计算机积极拒绝,无法连接。 (os error 10061)\n 2: 由于目标计算机积极拒绝,无法连接。 (os error 10061)"},"target":"clash_nyanpasu::core::tray::proxies","filename":"tauri\src\core\tray\proxies.rs","line_number":23,"span":{"name":"loop_task"},"spans":[{"name":"loop_task"}]}

有用的应该就这些,因为当我发现出问题的时候,观察应用首页概览地流量也归零了

备注 / Addition details

这看上去不像是一个致命的bug,但是我很疑惑为什么会出现这样的情况这可能后续导致我无法更新clash内核

环境信息 / Environment information

----------- System -----------
OS: Windows 11 Pro 22631
Arch: x86_64
----------- Device -----------
CPU: AMD Ryzen 7 7800X3D 8-Core Processor @ 4.20GHz x 16
Memory: 31.15 GiB
----------- Core -----------
mihomo: Mihomo Meta v1.18.8 windows amd64 with go1.23.0 Mon Sep 2 08:37:40 UTC 2024 Use tags: with_gvisor
mihomo-alpha: Mihomo Meta alpha-7c8f451 windows amd64 with go1.23.1 Mon Sep 9 08:11:44 UTC 2024 Use tags: with_gvisor
clash: Clash n2023-09-05-gdcc8d87 windows amd64 with go1.21.0 Tue Sep 5 14:32:57 UTC 2023
clash-rs: clash-rs 0.3.1
----------- Build Info -----------
App Name: clash-nyanpasu
App Version: 0.1.0
Pkg Version: 1.6.1
Commit Hash: 14b0407
Commit Author: Jonson Petard
Commit Date: 2024-09-10T03:59:13.000Z
Build Date: 2024-09-10T04:55:14.413Z
Build Profile: Release
Build Platform: x86_64-pc-windows-msvc
Rustc Version: rustc 1.83.0-nightly (c2f74c3f9 2024-09-09)
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
@Nuclear-Smile Nuclear-Smile added S: Untriaged T: Bug Something isn't working labels Oct 2, 2024
@greenhat616
Copy link
Collaborator

greenhat616 commented Oct 2, 2024

仅看日记的话,错误是内核被停止后无法重启,导致 API 不可用——因此流量图显都清空了。
可以提交一份 TRACE 级别的日记吗?

state 切换延迟似乎是之前组件实现的一个 bug。

@keiko233 有空的时候能否确认一下?有可能是 const x = Component() {} 导致的 state 问题。

@Nuclear-Smile
Copy link
Author

仅看日记的话,错误是内核被停止后无法重启,导致 API 不可用——因此流量图显都清空了。 可以提交一份 TRACE 级别的日记吗?

state 切换延迟似乎是之前组件实现的一个 bug。

@keiko233 有空的时候能否确认一下?有可能是 const x = Component() {} 导致的 state 问题。

烦请稍等,我重现一遍

@Nuclear-Smile
Copy link
Author

@AquaSimulacra
Copy link

AquaSimulacra commented Oct 4, 2024

我也出现了类似的问题,内核无法更新
PixPin_2024-10-03_20-14-47

@greenhat616
Copy link
Collaborator

greenhat616 commented Oct 4, 2024

图片
图片
观察了一下日记,应该是更新当前使用的内核时无法正确杀死内核后更新内核,有可能是和服务模式相关的问题。此外,更新器错误返回了 Done 状态。
目前有个 workaround:切换到其他内核后再更新之前内核,可以正确更新

@greenhat616 greenhat616 added this to the 1.6.2 milestone Oct 4, 2024
@greenhat616 greenhat616 removed the C: UI label Oct 4, 2024
@greenhat616
Copy link
Collaborator

76923ac

请尝试稍晚构建的开发版,如果没问题的话将会移植到 1.6.2

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

No branches or pull requests

3 participants