[GH-ISSUE #4962] [bug]: Error running hoppscotch-desktop on Ubuntu 24.04 Cannot find unused port #1879

Open
opened 2026-03-16 22:13:23 +03:00 by kerem · 17 comments
Owner

Originally created by @kernusr on GitHub (Apr 7, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4962

Originally assigned to: @CuriousCorrelation on GitHub.

Is there an existing issue for this?

  • I have searched existing issues and this bug hasn't been reported yet

Current behavior

When i run hoppscotch-desktop installing from *.deb package on Ubuntu 24.04 i have error

 INFO hoppscotch_desktop: Starting Hoppscotch Desktop...
 INFO hoppscotch_desktop_lib: Starting Hoppscotch Desktop v25.3.0

thread 'main' panicked at src/lib.rs:64:55:

Steps to reproduce

  1. Download and install *.deb package from https://hoppscotch.com/download
  2. Run it from desktop shortcut (not running)
  3. Run it from terminal (/usr/bin/hoppscotch-desktop) and get an error

Logs and Screenshots

Trace when run hoppscotch-desktop with ENV parameters "RUST_BACKTRACE=full"

 INFO hoppscotch_desktop: Starting Hoppscotch Desktop...
 INFO hoppscotch_desktop_lib: Starting Hoppscotch Desktop v25.3.0

thread 'main' panicked at src/lib.rs:64:55:
Cannot find unused port
stack backtrace:
   0:     0x5e6d87b1f922 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hcf2f3ed4d0972a5a
   1:     0x5e6d87b4fe53 - core::fmt::write::h42e9526820ba3273
   2:     0x5e6d87b1b013 - std::io::Write::write_fmt::h4ac55be9ec7ac8ed
   3:     0x5e6d87b1f772 - std::sys::backtrace::BacktraceLock::print::hb29412fc70ee8fe5
   4:     0x5e6d87b209d2 - std::panicking::default_hook::{{closure}}::h473aaea968588483
   5:     0x5e6d87b207d5 - std::panicking::default_hook::hfda26a2ca18f638f
   6:     0x5e6d87b213f2 - std::panicking::rust_panic_with_hook::h658b5d5e64320bf6
   7:     0x5e6d87b2117a - std::panicking::begin_panic_handler::{{closure}}::h8e24b1080d899eb9
   8:     0x5e6d87b1fe29 - std::sys::backtrace::__rust_end_short_backtrace::hde22e239e728e558
   9:     0x5e6d87b20e0d - __rustc[bf0aed985e81a8c7]::rust_begin_unwind
  10:     0x5e6d87b4d840 - core::panicking::panic_fmt::h1a4249e888b23b61
  11:     0x5e6d87b4d81b - core::option::expect_failed::ha19e388e5c426940
  12:     0x5e6d86adc671 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h376aa3c5911eab2a
  13:     0x5e6d86b05f38 - tauri::app::setup::h13f59b6543eabb32
  14:     0x5e6d870d95c3 - tauri::app::App<R>::run::{{closure}}::h8f2e874a3c73e1e8
  15:     0x5e6d86d0aa91 - tauri_runtime_wry::handle_event_loop::h5e735007ff58b1e0
  16:     0x5e6d870de513 - <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run::{{closure}}::h222e00754255ef2b
  17:     0x5e6d870cc343 - tao::platform_impl::platform::event_loop::EventLoop<T>::run_return::h3082658d3dd7b4a7
  18:     0x5e6d86d46a9c - tao::platform_impl::platform::event_loop::EventLoop<T>::run::h058d98678b1ddd8c
  19:     0x5e6d86d6cb23 - <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run::hbbe18485e10f25ac
  20:     0x5e6d86b3d95f - hoppscotch_desktop_lib::run::h7cbb6a89a449dccc
  21:     0x5e6d86aafeda - hoppscotch_desktop::main::hbb0fd507bc40c663
  22:     0x5e6d86ab0343 - std::sys::backtrace::__rust_begin_short_backtrace::ha69277360cc310a1
  23:     0x5e6d86aa6bc9 - std::rt::lang_start::{{closure}}::h842e4069dc9616ad
  24:     0x5e6d87b12170 - std::rt::lang_start_internal::hc81a42ac6c70b754
  25:     0x5e6d86ab0065 - main
  26:     0x74083862a1ca - __libc_start_call_main
                               at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
  27:     0x74083862a28b - __libc_start_main_impl
                               at ./csu/../csu/libc-start.c:360:3
  28:     0x5e6d86a9d7e5 - _start
  29:                0x0 - <unknown>


Output of ` sudo netstat -tulnp | grep LISTEN`:

tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      1050/systemd-resolv 
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1748/cupsd          
tcp        0      0 127.0.0.1:63342         0.0.0.0:*               LISTEN      22039/phpstorm      
tcp        0      0 0.0.0.0:902             0.0.0.0:*               LISTEN      3439/vmware-authdla 
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN      1050/systemd-resolv 
tcp        0      0 127.0.0.1:43703         0.0.0.0:*               LISTEN      30453/full-line-inf

Environment

Release

Hoppscotch Version

Local

Interceptor

Native - Desktop App

Browsers Affected

No response

Operating System

Linux

Additional Information

  • tested on 25.3.0 and 25.2.3
Originally created by @kernusr on GitHub (Apr 7, 2025). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4962 Originally assigned to: @CuriousCorrelation on GitHub. ### Is there an existing issue for this? - [x] I have searched existing issues and this bug hasn't been reported yet ### Current behavior When i run hoppscotch-desktop installing from *.deb package on Ubuntu 24.04 i have error ``` INFO hoppscotch_desktop: Starting Hoppscotch Desktop... INFO hoppscotch_desktop_lib: Starting Hoppscotch Desktop v25.3.0 thread 'main' panicked at src/lib.rs:64:55: ``` ### Steps to reproduce 1. Download and install *.deb package from https://hoppscotch.com/download 2. Run it from desktop shortcut (not running) 3. Run it from terminal (/usr/bin/hoppscotch-desktop) and get an error ### Logs and Screenshots ```shell Trace when run hoppscotch-desktop with ENV parameters "RUST_BACKTRACE=full" INFO hoppscotch_desktop: Starting Hoppscotch Desktop... INFO hoppscotch_desktop_lib: Starting Hoppscotch Desktop v25.3.0 thread 'main' panicked at src/lib.rs:64:55: Cannot find unused port stack backtrace: 0: 0x5e6d87b1f922 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::hcf2f3ed4d0972a5a 1: 0x5e6d87b4fe53 - core::fmt::write::h42e9526820ba3273 2: 0x5e6d87b1b013 - std::io::Write::write_fmt::h4ac55be9ec7ac8ed 3: 0x5e6d87b1f772 - std::sys::backtrace::BacktraceLock::print::hb29412fc70ee8fe5 4: 0x5e6d87b209d2 - std::panicking::default_hook::{{closure}}::h473aaea968588483 5: 0x5e6d87b207d5 - std::panicking::default_hook::hfda26a2ca18f638f 6: 0x5e6d87b213f2 - std::panicking::rust_panic_with_hook::h658b5d5e64320bf6 7: 0x5e6d87b2117a - std::panicking::begin_panic_handler::{{closure}}::h8e24b1080d899eb9 8: 0x5e6d87b1fe29 - std::sys::backtrace::__rust_end_short_backtrace::hde22e239e728e558 9: 0x5e6d87b20e0d - __rustc[bf0aed985e81a8c7]::rust_begin_unwind 10: 0x5e6d87b4d840 - core::panicking::panic_fmt::h1a4249e888b23b61 11: 0x5e6d87b4d81b - core::option::expect_failed::ha19e388e5c426940 12: 0x5e6d86adc671 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h376aa3c5911eab2a 13: 0x5e6d86b05f38 - tauri::app::setup::h13f59b6543eabb32 14: 0x5e6d870d95c3 - tauri::app::App<R>::run::{{closure}}::h8f2e874a3c73e1e8 15: 0x5e6d86d0aa91 - tauri_runtime_wry::handle_event_loop::h5e735007ff58b1e0 16: 0x5e6d870de513 - <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run::{{closure}}::h222e00754255ef2b 17: 0x5e6d870cc343 - tao::platform_impl::platform::event_loop::EventLoop<T>::run_return::h3082658d3dd7b4a7 18: 0x5e6d86d46a9c - tao::platform_impl::platform::event_loop::EventLoop<T>::run::h058d98678b1ddd8c 19: 0x5e6d86d6cb23 - <tauri_runtime_wry::Wry<T> as tauri_runtime::Runtime<T>>::run::hbbe18485e10f25ac 20: 0x5e6d86b3d95f - hoppscotch_desktop_lib::run::h7cbb6a89a449dccc 21: 0x5e6d86aafeda - hoppscotch_desktop::main::hbb0fd507bc40c663 22: 0x5e6d86ab0343 - std::sys::backtrace::__rust_begin_short_backtrace::ha69277360cc310a1 23: 0x5e6d86aa6bc9 - std::rt::lang_start::{{closure}}::h842e4069dc9616ad 24: 0x5e6d87b12170 - std::rt::lang_start_internal::hc81a42ac6c70b754 25: 0x5e6d86ab0065 - main 26: 0x74083862a1ca - __libc_start_call_main at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 27: 0x74083862a28b - __libc_start_main_impl at ./csu/../csu/libc-start.c:360:3 28: 0x5e6d86a9d7e5 - _start 29: 0x0 - <unknown> Output of ` sudo netstat -tulnp | grep LISTEN`: tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1050/systemd-resolv tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1748/cupsd tcp 0 0 127.0.0.1:63342 0.0.0.0:* LISTEN 22039/phpstorm tcp 0 0 0.0.0.0:902 0.0.0.0:* LISTEN 3439/vmware-authdla tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 1050/systemd-resolv tcp 0 0 127.0.0.1:43703 0.0.0.0:* LISTEN 30453/full-line-inf ``` ### Environment Release ### Hoppscotch Version Local ### Interceptor Native - Desktop App ### Browsers Affected _No response_ ### Operating System Linux ### Additional Information - tested on 25.3.0 and 25.2.3
Author
Owner

@kernusr commented on GitHub (Apr 7, 2025):

I am download and run AppImage package from https://hoppscotch.com/download and get the same error

Image

<!-- gh-comment-id:2783367797 --> @kernusr commented on GitHub (Apr 7, 2025): I am download and run AppImage package from https://hoppscotch.com/download and get the same error ![Image](https://github.com/user-attachments/assets/3cc87aea-1e71-413a-9fb4-050f71537970)
Author
Owner

@CuriousCorrelation commented on GitHub (Apr 7, 2025):

Hey @kernusr, thanks for reporting this issue with such details.

I wasn’t able to reproduce this in some of our testing environments so I did some digging, and I believe this might be related to the local environment preventing port binding rather than a general compatibility bug. The error happens when the app tries to find an available network port using portpicker::pick_unused_port() right here. You can also see how the underlying library handles this here.

It’s rather rare for this function to fail, the likely scenario being the port allocation algorithm simply failing to find available ports. It tries random ports in the 15000-25000 range first (which are likely to be free), then asks the OS for available ports as a reliable fallback, but in your environment, the error suggests that it can't find any ports that satisfy the requirements which in turn suggests there might be network configuration, security software, or system policies in your environment that are preventing the standard port allocation strategy from working properly.

<!-- gh-comment-id:2783458157 --> @CuriousCorrelation commented on GitHub (Apr 7, 2025): Hey @kernusr, thanks for reporting this issue with such details. I wasn’t able to reproduce this in some of our testing environments so I did some digging, and I believe this might be related to the local environment preventing port binding rather than a general compatibility bug. The error happens when the app tries to find an available network port using `portpicker::pick_unused_port()` [right here](https://github.com/hoppscotch/hoppscotch/blob/fb2b677fafdca8f90a926ca76a41edf43bda29a6/packages/hoppscotch-desktop/src-tauri/src/lib.rs#L64). You can also see how the underlying [library handles this here](https://github.com/Dentosal/portpicker-rs/blob/master/src/lib.rs#L52). It’s rather rare for this function to fail, the likely scenario being the port allocation algorithm simply failing to find available ports. It tries random ports in the 15000-25000 range first (which are likely to be free), then asks the OS for available ports as a reliable fallback, but in your environment, the error suggests that it can't find any ports that satisfy the requirements which in turn suggests there might be network configuration, security software, or system policies in your environment that are preventing the standard port allocation strategy from working properly.
Author
Owner

@kernusr commented on GitHub (Apr 7, 2025):

It seems I found a solution!
For my VPN to work properly, I need to disable work with IP V6
Configuration via the graphical interface constantly stops working after rebooting the computer
On the Internet, I found a solution that to disable IP V6, you need to edit the parameters of the grub:

in /etc/default/grub make change from

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"
GRUB_CMDLINE_LINUX="ipv6.disable=1"

After I deleted these parameters from the grub, the hoppscotch-desktop worked fine

@CuriousCorrelation thanks for the link to the code section that helped me figure out where to look

<!-- gh-comment-id:2784659347 --> @kernusr commented on GitHub (Apr 7, 2025): It seems I found a solution! For my VPN to work properly, I need to disable work with IP V6 Configuration via the graphical interface constantly stops working after rebooting the computer On the Internet, I found a solution that to disable IP V6, you need to edit the parameters of the grub: in `/etc/default/grub` make change from ``` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" ``` to ``` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1" GRUB_CMDLINE_LINUX="ipv6.disable=1" ``` After I deleted these parameters from the grub, the hoppscotch-desktop worked fine @CuriousCorrelation thanks for the link to the code section that helped me figure out where to look
Author
Owner

@wapmorgan commented on GitHub (Jun 3, 2025):

After I deleted these parameters from the grub, the hoppscotch-desktop worked fine

Don't forget to update grub after change to /etc/default/grub via

sudo update-grub

command

<!-- gh-comment-id:2935325620 --> @wapmorgan commented on GitHub (Jun 3, 2025): > After I deleted these parameters from the grub, the hoppscotch-desktop worked fine Don't forget to update grub after change to `/etc/default/grub` via ```shell sudo update-grub ``` command
Author
Owner

@wapmorgan commented on GitHub (Jun 18, 2025):

It seems I found a solution!

this does not work for me:

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.11.0-26-generic root=UUID=d8154e3b-71eb-4ee5-a519-3ae641f94a41 ro ipv6.disable=1 quiet splash ipv6.disable=1 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M vt.handoff=7

$ RUST_BACKTRACE=full hoppscotch-desktop
2025-06-18T11:31:04.237962Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components
2025-06-18T11:31:04.237969Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform
2025-06-18T11:31:04.237977Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully
2025-06-18T11:31:04.237980Z  INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete

thread 'main' panicked at src/lib.rs:26:62:
Cannot find unused port
stack backtrace:
   0:     0x562f7ba58db2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2bc1773b63b16421
   1:     0x562f7ba87373 - core::fmt::write::h8002143aa1074e9d
...
<!-- gh-comment-id:2983818999 --> @wapmorgan commented on GitHub (Jun 18, 2025): > It seems I found a solution! this does not work for me: ```bash $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-6.11.0-26-generic root=UUID=d8154e3b-71eb-4ee5-a519-3ae641f94a41 ro ipv6.disable=1 quiet splash ipv6.disable=1 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M vt.handoff=7 $ RUST_BACKTRACE=full hoppscotch-desktop 2025-06-18T11:31:04.237962Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components 2025-06-18T11:31:04.237969Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform 2025-06-18T11:31:04.237977Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully 2025-06-18T11:31:04.237980Z INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete thread 'main' panicked at src/lib.rs:26:62: Cannot find unused port stack backtrace: 0: 0x562f7ba58db2 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2bc1773b63b16421 1: 0x562f7ba87373 - core::fmt::write::h8002143aa1074e9d ... ```
Author
Owner

@wapmorgan commented on GitHub (Jun 18, 2025):

After I deleted these parameters from the grub, the hoppscotch-desktop worked fine

so, your propose is to delete arguments that disables ipv6?
https://github.com/Dentosal/portpicker-rs/blob/master/src/lib.rs#L23
In the library it looks like it checks ipv6 port too (used && and instead of || or)

<!-- gh-comment-id:2983821650 --> @wapmorgan commented on GitHub (Jun 18, 2025): > After I deleted these parameters from the grub, the hoppscotch-desktop worked fine so, your propose is to delete arguments that disables ipv6? https://github.com/Dentosal/portpicker-rs/blob/master/src/lib.rs#L23 In the library it looks like it checks ipv6 port too (used `&&` **and** instead of `||` **or**)
Author
Owner

@kernusr commented on GitHub (Jun 24, 2025):

I encountered the fact that Outline VPN desctop client on my Ubuntu (https://github.com/Jigsaw-Code/outline-apps) does not pass traffic to resources accessible via IP6
The first thing that came to mind was to disable IP6

By google, I found a solution in the form of a recommendation to "change the grub config"

The problem with Outline VPN was solved and I forgot about this setting for some time

Then I got a problem with hoppscotch. After looking at the source code, I realized that the problem lies in checking IP6 and remembered my manipulations. Simply by deleting the key that I myself wrote there, I restored the functionality of hoppscotch

<!-- gh-comment-id:3001884470 --> @kernusr commented on GitHub (Jun 24, 2025): I encountered the fact that Outline VPN desctop client on my Ubuntu (https://github.com/Jigsaw-Code/outline-apps) does not pass traffic to resources accessible via IP6 The first thing that came to mind was to disable IP6 By google, I found a solution in the form of a recommendation to "change the grub config" The problem with Outline VPN was solved and I forgot about this setting for some time Then I got a problem with hoppscotch. After looking at the source code, I realized that the problem lies in checking IP6 and remembered my manipulations. Simply by deleting the key that I myself wrote there, I restored the functionality of hoppscotch
Author
Owner

@kernusr commented on GitHub (Jun 24, 2025):

Pay attention to the output of sudo netstat -tulnp | grep LISTEN
It shows that no one is trying to listen to IP6. This should lead you to think that this is the problem. Something is preventing applications from listening to IP6. And for normal operation of hoppscotch, access to listening to IP6 is absolutely necessary

<!-- gh-comment-id:3001892993 --> @kernusr commented on GitHub (Jun 24, 2025): Pay attention to the output of ` sudo netstat -tulnp | grep LISTEN` It shows that no one is trying to listen to IP6. This should lead you to think that this is the problem. Something is preventing applications from listening to IP6. And for normal operation of hoppscotch, access to listening to IP6 is absolutely necessary
Author
Owner

@wapmorgan commented on GitHub (Jun 27, 2025):

for normal operation of hoppscotch, access to listening to IP6 is absolutely necessary

The question is "why is this required"? Hoppscotch won't work with ipv4-only?

<!-- gh-comment-id:3014355338 --> @wapmorgan commented on GitHub (Jun 27, 2025): > for normal operation of hoppscotch, access to listening to IP6 is absolutely necessary The question is "why is this required"? Hoppscotch won't work with ipv4-only?
Author
Owner

@andersonpem commented on GitHub (Jun 30, 2025):

Kernel config:
BOOT_IMAGE=/boot/vmlinuz-6.14.11-zabbly+ root=UUID=40ed96e8-b73d-42fa-a533-695991e19b65 ro quiet splash ipv6.disable=1 loglevel=3 udev.log_level=3 vt.handoff=7

Tried the deb:
`2025-06-30T10:38:48.682102Z DEBUG main ThreadId(01) tauri_plugin_appload: Initializing desktop-specific components.
2025-06-30T10:38:48.682113Z INFO main ThreadId(01) tauri_plugin_appload: appload plugin setup complete.
2025-06-30T10:38:48.682131Z INFO main ThreadId(01) tauri_plugin_relay: Setting up relay plugin
2025-06-30T10:38:48.682133Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components
2025-06-30T10:38:48.682136Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform
2025-06-30T10:38:48.682138Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully
2025-06-30T10:38:48.682153Z INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete

thread 'main' panicked at src/lib.rs:24:62:
Cannot find unused port
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
andy@lrgi-pt-pf-4j9srf ~/Downloads> `

Tried the AppImage:
`2025-06-30T10:39:40.953330Z DEBUG ThreadId(19) tauri_plugin_appload::cache::store: File fits in memory; adding to hot cache. key="hoppscotch:assets/join-team-L3q4xvQk.js.map" size=9806
2025-06-30T10:39:40.953412Z INFO main ThreadId(01) tauri_plugin_appload::cache::manager: Bundle caching completed successfully name=hoppscotch
2025-06-30T10:39:40.953417Z INFO main ThreadId(01) tauri_plugin_appload::vendor::config: Vendored bundle initialized successfully name=hoppscotch
2025-06-30T10:39:40.956549Z DEBUG main ThreadId(01) tauri_plugin_appload: Initializing desktop-specific components.
2025-06-30T10:39:40.956560Z INFO main ThreadId(01) tauri_plugin_appload: appload plugin setup complete.
2025-06-30T10:39:40.956570Z INFO main ThreadId(01) tauri_plugin_relay: Setting up relay plugin
2025-06-30T10:39:40.956572Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components
2025-06-30T10:39:40.956576Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform
2025-06-30T10:39:40.956579Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully
2025-06-30T10:39:40.956581Z INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete

thread 'main' panicked at src/lib.rs:24:62:
Cannot find unused port
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
`

Issue should be reopen.

<!-- gh-comment-id:3018659246 --> @andersonpem commented on GitHub (Jun 30, 2025): Kernel config: `BOOT_IMAGE=/boot/vmlinuz-6.14.11-zabbly+ root=UUID=40ed96e8-b73d-42fa-a533-695991e19b65 ro quiet splash ipv6.disable=1 loglevel=3 udev.log_level=3 vt.handoff=7` Tried the deb: `2025-06-30T10:38:48.682102Z DEBUG main ThreadId(01) tauri_plugin_appload: Initializing desktop-specific components. 2025-06-30T10:38:48.682113Z INFO main ThreadId(01) tauri_plugin_appload: appload plugin setup complete. 2025-06-30T10:38:48.682131Z INFO main ThreadId(01) tauri_plugin_relay: Setting up relay plugin 2025-06-30T10:38:48.682133Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components 2025-06-30T10:38:48.682136Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform 2025-06-30T10:38:48.682138Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully 2025-06-30T10:38:48.682153Z INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete thread 'main' panicked at src/lib.rs:24:62: Cannot find unused port note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace andy@lrgi-pt-pf-4j9srf ~/Downloads> ` Tried the AppImage: `2025-06-30T10:39:40.953330Z DEBUG ThreadId(19) tauri_plugin_appload::cache::store: File fits in memory; adding to hot cache. key="hoppscotch:assets/join-team-L3q4xvQk.js.map" size=9806 2025-06-30T10:39:40.953412Z INFO main ThreadId(01) tauri_plugin_appload::cache::manager: Bundle caching completed successfully name=hoppscotch 2025-06-30T10:39:40.953417Z INFO main ThreadId(01) tauri_plugin_appload::vendor::config: Vendored bundle initialized successfully name=hoppscotch 2025-06-30T10:39:40.956549Z DEBUG main ThreadId(01) tauri_plugin_appload: Initializing desktop-specific components. 2025-06-30T10:39:40.956560Z INFO main ThreadId(01) tauri_plugin_appload: appload plugin setup complete. 2025-06-30T10:39:40.956570Z INFO main ThreadId(01) tauri_plugin_relay: Setting up relay plugin 2025-06-30T10:39:40.956572Z DEBUG main ThreadId(01) tauri_plugin_relay: Initializing desktop-specific components 2025-06-30T10:39:40.956576Z DEBUG main ThreadId(01) tauri_plugin_relay::desktop: Initializing Relay for desktop platform 2025-06-30T10:39:40.956579Z DEBUG main ThreadId(01) tauri_plugin_relay: Desktop components initialized successfully 2025-06-30T10:39:40.956581Z INFO main ThreadId(01) tauri_plugin_relay: relay plugin setup complete thread 'main' panicked at src/lib.rs:24:62: Cannot find unused port note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ` Issue should be reopen.
Author
Owner

@kernusr commented on GitHub (Jul 2, 2025):

As I understand it, the portpicker (github.com/Dentosal/portpicker-rs@912f913ac3/src/lib.rs (L23)) is to blame for not checking "is it possible to use IP6" before starting this check. If IP6 is disabled in the system, the portpicker will fall into an error, and Hoppscotch will interpret it incorrectly.

<!-- gh-comment-id:3027056602 --> @kernusr commented on GitHub (Jul 2, 2025): As I understand it, the portpicker (https://github.com/Dentosal/portpicker-rs/blob/912f913ac325278a564d8828d550070db1d79373/src/lib.rs#L23) is to blame for not checking "is it possible to use IP6" before starting this check. If IP6 is disabled in the system, the portpicker will fall into an error, and Hoppscotch will interpret it incorrectly.
Author
Owner

@jamesgeorge007 commented on GitHub (Aug 8, 2025):

Hi, this is addressed in the latest release. Please let us know if the issue persists.

<!-- gh-comment-id:3168717419 --> @jamesgeorge007 commented on GitHub (Aug 8, 2025): Hi, this is addressed in the latest release. Please let us know if the issue persists.
Author
Owner

@wapmorgan commented on GitHub (Aug 11, 2025):

firstly, thanks!
secondly, it looks like does not work as proposed.

+++-==============-============-============-=================================
ii  hoppscotch     25.7.1       amd64        Desktop App for hoppscotch.io

........ a lot of tries to select port
....
....
Port 24993 is not free in ::
Port 24994 is not free in ::
Port 24995 is not free in ::
Port 24996 is not free in ::
Port 24997 is not free in ::
Port 24998 is not free in ::
Port 24999 is not free in ::
Port 25000 is not free in ::

thread 'main' (1439705) panicked at src/lib.rs:49:18:
Cannot find unused port: NoAvailablePort
stack backtrace:
0: 0x5e32fde4c102 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h506bfd77433b396f
1: 0x5e32fde7ae6f - core::fmt::write::h4a6a9ea68bc75fd8
2: 0x5e32fde47aa3 - std::io::Write::write_fmt::h9acc11fbd35443ef
3: 0x5e32fde4bf52 - std::sys::backtrace::BacktraceLock::print::h51f3578794a48701
4: 0x5e32fde4e6f4 - std::panicking::default_hook::{{closure}}::he6a800a8a62eb719
5: 0x5e32fde4e515 - std::panicking::default_hook::h39176202a655369b
6: 0x5e32fde4f165 - std::panicking::panic_with_hook::ha962217a6a680489
7: 0x5e32fde4eefa - std::panicking::begin_panic_handler::{{closure}}::hac242c5af0e52533
8: 0x5e32fde4c609 - std::sys::backtrace::__rust_end_short_backtrace::he3c9ccaeb3b1c742
9: 0x5e32fde4eb8d - __rustc[afa1a629380cfd82]::rust_begin_unwind
10: 0x5e32fde787f0 - core::panicking::panic_fmt::ha3653a5c1f2e3b76

<!-- gh-comment-id:3174666199 --> @wapmorgan commented on GitHub (Aug 11, 2025): firstly, thanks! secondly, it looks like does not work as proposed. ``` +++-==============-============-============-================================= ii hoppscotch 25.7.1 amd64 Desktop App for hoppscotch.io ``` > ........ a lot of tries to select port > .... > .... > Port 24993 is not free in :: > Port 24994 is not free in :: > Port 24995 is not free in :: > Port 24996 is not free in :: > Port 24997 is not free in :: > Port 24998 is not free in :: > Port 24999 is not free in :: > Port 25000 is not free in :: > > thread 'main' (1439705) panicked at src/lib.rs:49:18: > Cannot find unused port: NoAvailablePort > stack backtrace: > 0: 0x5e32fde4c102 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h506bfd77433b396f > 1: 0x5e32fde7ae6f - core::fmt::write::h4a6a9ea68bc75fd8 > 2: 0x5e32fde47aa3 - std::io::Write::write_fmt::h9acc11fbd35443ef > 3: 0x5e32fde4bf52 - std::sys::backtrace::BacktraceLock::print::h51f3578794a48701 > 4: 0x5e32fde4e6f4 - std::panicking::default_hook::{{closure}}::he6a800a8a62eb719 > 5: 0x5e32fde4e515 - std::panicking::default_hook::h39176202a655369b > 6: 0x5e32fde4f165 - std::panicking::panic_with_hook::ha962217a6a680489 > 7: 0x5e32fde4eefa - std::panicking::begin_panic_handler::{{closure}}::hac242c5af0e52533 > 8: 0x5e32fde4c609 - std::sys::backtrace::__rust_end_short_backtrace::he3c9ccaeb3b1c742 > 9: 0x5e32fde4eb8d - __rustc[afa1a629380cfd82]::rust_begin_unwind > 10: 0x5e32fde787f0 - core::panicking::panic_fmt::ha3653a5c1f2e3b76
Author
Owner

@CuriousCorrelation commented on GitHub (Aug 11, 2025):

Hey @wapmorgan, thanks for testing v25.7.1!

Yes unfortunately it looks like the PR didn't solve this universally. This was an exploratory fix that worked on some systems but apparently not all. Although it does give us a lot more flexibility, so for an even more robust fix, I'll look into forcing IPv4-only binding, or perhaps falling back to letting the OS pick a port directly, or even better - completely sidestep the whole dual-stack issue. I am also looking into dropping the port requirement altogether and perhaps using deep-linking instead.

I am reopening this issue to track a follow-up solution.

<!-- gh-comment-id:3174939410 --> @CuriousCorrelation commented on GitHub (Aug 11, 2025): Hey @wapmorgan, thanks for testing v25.7.1! Yes unfortunately it looks like the PR didn't solve this universally. This was an exploratory fix that worked on some systems but apparently not all. Although it does give us a lot more flexibility, so for an even more robust fix, I'll look into forcing IPv4-only binding, or perhaps falling back to letting the OS pick a port directly, or even better - completely sidestep the whole dual-stack issue. I am also looking into dropping the port requirement altogether and perhaps using deep-linking instead. I am reopening this issue to track a follow-up solution.
Author
Owner

@dmitryuk commented on GitHub (Aug 21, 2025):

Same issue, thanks

<!-- gh-comment-id:3209005984 --> @dmitryuk commented on GitHub (Aug 21, 2025): Same issue, thanks
Author
Owner

@wapmorgan commented on GitHub (Sep 29, 2025):

2025.9.0 still affecting:

Port 24996 is not free in ::
Port 24997 is not free in ::
Port 24998 is not free in ::
Port 24999 is not free in ::
Port 25000 is not free in ::
2025-09-29T10:35:42.044873Z ERROR                 main ThreadId(01) hoppscotch_desktop_lib: Failed to setup server error=Failed to initialize server port

thread 'main' (1181630) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tauri-2.8.5/src/app.rs:1301:11:
Failed to setup app: error encountered during setup hook: Failed to initialize server port
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
<!-- gh-comment-id:3346222900 --> @wapmorgan commented on GitHub (Sep 29, 2025): 2025.9.0 still affecting: ``` Port 24996 is not free in :: Port 24997 is not free in :: Port 24998 is not free in :: Port 24999 is not free in :: Port 25000 is not free in :: 2025-09-29T10:35:42.044873Z ERROR main ThreadId(01) hoppscotch_desktop_lib: Failed to setup server error=Failed to initialize server port thread 'main' (1181630) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tauri-2.8.5/src/app.rs:1301:11: Failed to setup app: error encountered during setup hook: Failed to initialize server port note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ```
Author
Owner

@wapmorgan commented on GitHub (Nov 11, 2025):

Is it too complicated issue?
25.10.0 still affecting

<!-- gh-comment-id:3517558864 --> @wapmorgan commented on GitHub (Nov 11, 2025): Is it too complicated issue? 25.10.0 still affecting
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#1879
No description provided.