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

mihomo-party: init at 1.4.5 #345189

Merged
merged 1 commit into from
Oct 11, 2024
Merged

mihomo-party: init at 1.4.5 #345189

merged 1 commit into from
Oct 11, 2024

Conversation

aucub
Copy link
Contributor

@aucub aucub commented Sep 28, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@aucub aucub changed the title mihomo-party: init at 1.3.4 mihomo-party: init at 1.3.6 Sep 29, 2024
@aucub aucub changed the title mihomo-party: init at 1.3.6 mihomo-party: init at 1.4.0 Sep 30, 2024
pkgs/by-name/mi/mihomo-party/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/mi/mihomo-party/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/mi/mihomo-party/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/mi/mihomo-party/package.nix Outdated Show resolved Hide resolved
@h7x4
Copy link
Member

h7x4 commented Oct 1, 2024

I'm having some troubles testing the binary. Maybe it just doesn't support my GPU? First error just seems to be that I have misconfigured my file picker.

[973551:1001/085449.536140:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[973551:1001/085449.536170:ERROR:select_file_dialog_linux_portal.cc(287)] Failed to read portal version property
ac: Unknown GPU, using 0 for raster_config
Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)
(node:973551) UnhandledPromiseRejectionWarning: Error: No such file or directory (os error 2)
    at disableSysProxy (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:1311:14)
    at triggerSysProxy (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:1255:13)
    at App.<anonymous> (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:4221:3)
    at App.emit (node:events:519:28)
    at /nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:4237:20
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `mihomo-party --trace-warnings ...` to show where the warning was created)
(node:973551) 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: 3)
[973551:1001/085507.076378:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
     Sub-Store -- v2.14.385
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

[sub-store] INFO: Start migrating...
[sub-store] INFO: Migration complete!
[sub-store] INFO: [BACKEND] :::38324
[973551:1001/085507.078404:ERROR:network_service_instance_impl.cc(608)] Network service crashed, restarting service.
ac: Unknown GPU, using 0 for raster_config
Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)

@aucub
Copy link
Contributor Author

aucub commented Oct 1, 2024

I'm having some troubles testing the binary. Maybe it just doesn't support my GPU? First error just seems to be that I have misconfigured my file picker.

[973551:1001/085449.536140:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[973551:1001/085449.536170:ERROR:select_file_dialog_linux_portal.cc(287)] Failed to read portal version property
ac: Unknown GPU, using 0 for raster_config
Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)
(node:973551) UnhandledPromiseRejectionWarning: Error: No such file or directory (os error 2)
    at disableSysProxy (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:1311:14)
    at triggerSysProxy (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:1255:13)
    at App.<anonymous> (/nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:4221:3)
    at App.emit (node:events:519:28)
    at /nix/store/m8gfw2004sz4b4az2rmzry91pw9kdqij-mihomo-party-1.4.0/mihomo-party/resources/app.asar/out/main/index.js:4237:20
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `mihomo-party --trace-warnings ...` to show where the warning was created)
(node:973551) 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: 3)
[973551:1001/085507.076378:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=139

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
     Sub-Store -- v2.14.385
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

[sub-store] INFO: Start migrating...
[sub-store] INFO: Migration complete!
[sub-store] INFO: [BACKEND] :::38324
[973551:1001/085507.078404:ERROR:network_service_instance_impl.cc(608)] Network service crashed, restarting service.
ac: Unknown GPU, using 0 for raster_config
Cannot find target for triple amdgcn-- Unable to find target for this triple (no targets are registered)

These issues do not occur on my device (Vega 6/GNOME 46), so it may be worth reporting upstream. I also found some related issues:

@aucub aucub changed the title mihomo-party: init at 1.4.0 mihomo-party: init at 1.4.1 Oct 2, 2024
@h7x4
Copy link
Member

h7x4 commented Oct 2, 2024

I tried running the application on a different machine, with X11 and a different graphics card. It failed with another error, 应用初始化失败: Error: no such file or directory (os error 2).

[nix-shell:~/.cache/nixpkgs-review/pr-345189]$ ./results/mihomo-party/bin/mihomo-party
(node:105663) UnhandledPromiseRejectionWarning: Error: No such file or directory (os error 2)
    at disableSysProxy (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:1312:14)
    at triggerSysProxy (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:1256:13)
    at App.<anonymous> (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:4226:3)
    at App.emit (node:events:519:28)
    at /nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:4242:20
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `mihomo-party --trace-warnings ...` to show where the warning was created)
(node:105663) 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: 3)

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
     Sub-Store -- v2.14.385
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

[sub-store] INFO: [BACKEND] :::38324

strace seems to suggest it's looking for some flatpak related stuff through a relative path:

[nix-shell:~/.cache/nixpkgs-review/pr-345189/results/mihomo-party/bin]$ strace -e trace=file ./mihomo-party
...
access("/.flatpak-info", F_OK)          = -1 ENOENT (No such file or directory)

@aucub
Copy link
Contributor Author

aucub commented Oct 2, 2024

I tried running the application on a different machine, with X11 and a different graphics card. It failed with another error, 应用初始化失败: Error: no such file or directory (os error 2).

[nix-shell:~/.cache/nixpkgs-review/pr-345189]$ ./results/mihomo-party/bin/mihomo-party
(node:105663) UnhandledPromiseRejectionWarning: Error: No such file or directory (os error 2)
    at disableSysProxy (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:1312:14)
    at triggerSysProxy (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:1256:13)
    at App.<anonymous> (/nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:4226:3)
    at App.emit (node:events:519:28)
    at /nix/store/c4hmw1sfl533dn117asncqaqk09kfpyw-mihomo-party-1.4.1/mihomo-party/resources/app.asar/out/main/index.js:4242:20
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `mihomo-party --trace-warnings ...` to show where the warning was created)
(node:105663) 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: 3)

┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅
     Sub-Store -- v2.14.385
┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅

[sub-store] INFO: [BACKEND] :::38324

strace seems to suggest it's looking for some flatpak related stuff through a relative path:

[nix-shell:~/.cache/nixpkgs-review/pr-345189/results/mihomo-party/bin]$ strace -e trace=file ./mihomo-party
...
access("/.flatpak-info", F_OK)          = -1 ENOENT (No such file or directory)

If you can provide your device's system information, that would be helpful. The application may have limited support for desktop environments other than KDE or Gnome.

First Issue:

In the disableSysProxy function, the library @mihomo-party/sysproxy (https://www.npmjs.com/package/@mihomo-party/sysproxy) is used. This library relies on sysproxy-rs (https://github.com/mihomo-party-org/sysproxy-rs/blob/main/src/linux.rs) for its implementation. Based on an analysis of sysproxy-rs, when running on non-KDE desktop environments, the application uses the Gnome-specific settings. Obviously, this could lead to errors on desktop environments other than KDE or Gnome. It seems that error handling has been implemented in the parent function triggerSysProxy in the code.

Second Issue:

The absence of the .flatpak-info file is expected behavior and occurs even when the application is functioning correctly. The application searches for these files to check if it is running in an AppImage or Flatpak package. Therefore, this cannot be classified as an error.

Based on the current information, it is unclear whether these two issues are related to the application's failure to start. The first issue appears to be unrelated to the second. I suggest reporting the startup issue upstream for further investigation.

@aucub
Copy link
Contributor Author

aucub commented Oct 2, 2024

@h7x4
I installed Hyprland on my device to test the application, and encountered the same issue: 应用初始化失败: Error: no such file or directory (os error 2). After commenting out triggerAutoProxy and triggerManualProxy in the code, the application started successfully.

You can replace the link with this release to retest, or try launching the application using nix-alien.

@aucub aucub changed the title mihomo-party: init at 1.4.1 mihomo-party: init at 1.4.2 Oct 5, 2024
@aucub aucub requested a review from h7x4 October 5, 2024 13:20
@aucub aucub changed the title mihomo-party: init at 1.4.2 mihomo-party: init at 1.4.3 Oct 7, 2024
@aucub aucub changed the title mihomo-party: init at 1.4.3 mihomo-party: init at 1.4.5 Oct 11, 2024
@h7x4
Copy link
Member

h7x4 commented Oct 11, 2024

Sorry for the wait. I've retested it, works well 👍

@h7x4 h7x4 merged commit d2729ae into NixOS:master Oct 11, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants