[GH-ISSUE #4352] [bug]: Desktop app build fails with "No such file or directory" error #1587

Closed
opened 2026-03-16 20:58:03 +03:00 by kerem · 2 comments
Owner

Originally created by @cometw on GitHub (Sep 17, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4352

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I try to run the Hoppscotch desktop app in development mode using pnpm tauri dev, the process fails with the following error:

thread 'main' panicked at src/main.rs:49:14: called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" }

What I expect is for the development build to start successfully, allowing me to work on and test the desktop app locally.

  • Primary Development Environment: NixOS running in Windows WSL
  • Secondary Environment: NixOS dual boot (issue also occurs here)
  • This issue is occurring in the development build.
  • The error suggests that a required file or directory is missing, but it's unclear which one.

It would be helpful if someone could provide guidance on:

  1. What file or directory might be missing that's causing this error?
  2. Are there any additional setup steps required for the desktop app development that might not be clearly documented?

I'm happy to provide any additional information or logs that might be helpful in diagnosing this issue.

Steps to reproduce

Run pnpm tauri dev inside packages/hoppscotch-selfhost-desktop.

Environment

Production

Version

Local

Originally created by @cometw on GitHub (Sep 17, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4352 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I try to run the Hoppscotch desktop app in development mode using `pnpm tauri dev`, the process fails with the following error: ``` thread 'main' panicked at src/main.rs:49:14: called Result::unwrap() on an Err value: Os { code: 2, kind: NotFound, message: "No such file or directory" } ``` What I expect is for the development build to start successfully, allowing me to work on and test the desktop app locally. - Primary Development Environment: NixOS running in Windows WSL - Secondary Environment: NixOS dual boot (issue also occurs here) - This issue is occurring in the development build. - The error suggests that a required file or directory is missing, but it's unclear which one. It would be helpful if someone could provide guidance on: 1. What file or directory might be missing that's causing this error? 2. Are there any additional setup steps required for the desktop app development that might not be clearly documented? I'm happy to provide any additional information or logs that might be helpful in diagnosing this issue. ### Steps to reproduce Run `pnpm tauri dev` inside `packages/hoppscotch-selfhost-desktop`. ### Environment Production ### Version Local
kerem 2026-03-16 20:58:03 +03:00
Author
Owner

@CuriousCorrelation commented on GitHub (Sep 17, 2024):

Any chance you are using home-manager to set up your environment? If so, that's an absolute classic!

The issue stems from deep linking. A deep link is essentially a url that takes you directly to a specific piece of content within an application, rather than just opening the app's home screen. For desktop applications, this involves registering a custom url scheme.

Because this is quite a common application, Tauri’s ecosystem already has a great implementation via tauri-plugin-deep-link.

The error message suggests that the plugin is trying to interact with system-specific files or directories to register the url scheme, which may not be accessible in the same way on NixOS due to its unique file system structure. Don’t get me wrong, I use nix myself and I personally love the isolation and containerization!

So here are a couple of things you should check:

Make sure you see /tmp/io.hoppscotch.desktop-deep-link.sock, see

  1. github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L87)

for reference.

Make sure you get sensible output for echo $XDG_DATA_HOME, see

  1. github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L15)
  2. https://dtantsur.github.io/rust-openstack/dirs/fn.data_dir.html

for reference.

Specifically their example section:

Platform Value Example
Linux $XDG_DATA_HOME or $HOME/.local/share /home/alice/.local/share
macOS $HOME/Library/Application Support /Users/Alice/Library/Application Support
Windows {FOLDERID_LocalAppData} C:\Users\Alice\AppData\Local

If you’re using home-manager you can enable xdg like so xdg.enable = true;

You might also need to install xdg-utils.

Now two things, you need both update-desktop-database and xdg-mime, see

  1. github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L55)
  2. github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L59)

for reference.

For NixOS, installing it would be like so:

environment.systemPackages = with pkgs; [
  desktop-file-utils
];

For home-manager:

{ config, pkgs, ... }:

{
  home.packages = with pkgs; [
	desktop-file-utils
  ];
}

Of course don’t forget to rebuild the system for updates to take effect:

This if you are using flakes

sudo nixos-rebuild switch --flake /etc/nixos#default

For home-manager:

home-manager switch

After trying these solutions, let me know if you're still experiencing issues.

<!-- gh-comment-id:2354878113 --> @CuriousCorrelation commented on GitHub (Sep 17, 2024): Any chance you are using home-manager to set up your environment? If so, that's an absolute classic! The issue stems from deep linking. A deep link is essentially a url that takes you directly to a specific piece of content within an application, rather than just opening the app's home screen. For desktop applications, this involves registering a custom url scheme. Because this is quite a common application, Tauri’s ecosystem already has a great implementation via [tauri-plugin-deep-link](https://github.com/FabianLars/tauri-plugin-deep-link). The error message suggests that the plugin is trying to interact with system-specific files or directories to register the url scheme, which may not be accessible in the same way on NixOS due to its unique file system structure. Don’t get me wrong, I use nix myself and I personally love the isolation and containerization! So here are a couple of things you should check: Make sure you see `/tmp/io.hoppscotch.desktop-deep-link.sock`, see 1. https://github.com/FabianLars/tauri-plugin-deep-link/blob/1aa5c3d01dfadfe6495673bb8767a913198da279/src/linux.rs#L87 for reference. Make sure you get sensible output for `echo $XDG_DATA_HOME`, see 1. https://github.com/FabianLars/tauri-plugin-deep-link/blob/1aa5c3d01dfadfe6495673bb8767a913198da279/src/linux.rs#L15 2. https://dtantsur.github.io/rust-openstack/dirs/fn.data_dir.html for reference. Specifically their example section: |Platform | Value | Example | | ------- | ---------------------------------------- | ---------------------------------------- | | Linux | `$XDG_DATA_HOME` or `$HOME`/.local/share | /home/alice/.local/share | | macOS | `$HOME`/Library/Application Support | /Users/Alice/Library/Application Support | | Windows | `{FOLDERID_LocalAppData}` | C:\Users\Alice\AppData\Local | If you’re using home-manager you can enable xdg like so `xdg.enable = true;` You might also need to install `xdg-utils`. Now two things, you need both update-desktop-database and xdg-mime, see 1. https://github.com/FabianLars/tauri-plugin-deep-link/blob/1aa5c3d01dfadfe6495673bb8767a913198da279/src/linux.rs#L55 2. https://github.com/FabianLars/tauri-plugin-deep-link/blob/1aa5c3d01dfadfe6495673bb8767a913198da279/src/linux.rs#L59 for reference. For NixOS, installing it would be like so: ```nix environment.systemPackages = with pkgs; [ desktop-file-utils ]; ``` For home-manager: ```nix { config, pkgs, ... }: { home.packages = with pkgs; [ desktop-file-utils ]; } ``` Of course don’t forget to rebuild the system for updates to take effect: This if you are using flakes ```sh sudo nixos-rebuild switch --flake /etc/nixos#default ``` For home-manager: ```sh home-manager switch ``` After trying these solutions, let me know if you're still experiencing issues.
Author
Owner

@cometw commented on GitHub (Sep 17, 2024):

Hey @CuriousCorrelation, you're a genius! 😄

I gotta say, I was not expecting such a quick and detailed response, especially given my somewhat unusual NixOS setup. You know your stuff...

Followed your advice (the xdg-utils, desktop-file-utils, and that deep link socket thing), I rebuilt my system and... yep, it works.

The desktop app is up and running.

I'll be honest, I was dreading a long, painful debugging session. You saved me from that headache, and I can't thank you enough.

<!-- gh-comment-id:2355137358 --> @cometw commented on GitHub (Sep 17, 2024): Hey @CuriousCorrelation, you're a genius! 😄 I gotta say, I was not expecting such a quick and detailed response, especially given my somewhat unusual NixOS setup. You know your stuff... Followed your advice (the xdg-utils, desktop-file-utils, and that deep link socket thing), I rebuilt my system and... yep, it works. The desktop app is up and running. I'll be honest, I was dreading a long, painful debugging session. You saved me from that headache, and I can't thank you enough.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1587
No description provided.