mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4352] [bug]: Desktop app build fails with "No such file or directory" error #1587
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1587
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
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:What I expect is for the development build to start successfully, allowing me to work on and test the desktop app locally.
It would be helpful if someone could provide guidance on:
I'm happy to provide any additional information or logs that might be helpful in diagnosing this issue.
Steps to reproduce
Run
pnpm tauri devinsidepackages/hoppscotch-selfhost-desktop.Environment
Production
Version
Local
@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, seegithub.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L87)for reference.
Make sure you get sensible output for
echo $XDG_DATA_HOME, seegithub.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L15)for reference.
Specifically their example section:
$XDG_DATA_HOMEor$HOME/.local/share$HOME/Library/Application Support{FOLDERID_LocalAppData}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
github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L55)github.com/FabianLars/tauri-plugin-deep-link@1aa5c3d01d/src/linux.rs (L59)for reference.
For NixOS, installing it would be like so:
For home-manager:
Of course don’t forget to rebuild the system for updates to take effect:
This if you are using flakes
For home-manager:
After trying these solutions, let me know if you're still experiencing issues.
@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.