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

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: #164

Open
mb0x88 opened this issue Apr 23, 2023 · 26 comments
Labels
bug Something isn't working Linux Something related to Linux operating system

Comments

@mb0x88
Copy link

mb0x88 commented Apr 23, 2023

Describe the bug
Opening sniffnet I get an error

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libX11.so.6: cannot open shared object file: No such file or directory); opening library failed (libX11.so: cannot open shared object file: No such file or directory)" })', /github/home/.cache/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:719:9 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Open terminal and type sniffnet

Expected behavior
I expected sniffnet to start running

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS:ParrotOS 6.0.0-12parrot1-amd64
  • Browser N/A

Additional context
I installed with brew and installed all dependencies

@GyulyVGC GyulyVGC added the missing dependency Problem related to an external required dependency label Apr 24, 2023
@GyulyVGC
Copy link
Owner

Try installing libx11-xcb-dev and let me know if you solve the problem

@mb0x88
Copy link
Author

mb0x88 commented Apr 25, 2023

no i get the same error after installing it

@3asyAiden
Copy link

I'm facing the same issue, and the same after installing libx11-xcb-dev.

@GyulyVGC
Copy link
Owner

GyulyVGC commented May 7, 2023

I'm facing the same issue, and the same after installing libx11-xcb-dev.

On which OS? @NULLAiden

@GyulyVGC
Copy link
Owner

GyulyVGC commented May 7, 2023

As last resort, I can suggest you try to install libx11-xcb1.
Please let me know if the problem persists.

@GyulyVGC GyulyVGC added the Linux Something related to Linux operating system label May 24, 2023
@Albonycal
Copy link

I am facing the same issue.
OS: Archlinux
Using hyprland twm (Wayland)

@GyulyVGC
Copy link
Owner

I am facing the same issue.
OS: Archlinux
Using hyprland twm (Wayland)

Did you install the app via pacman?

@Albonycal
Copy link

Yeah from the arch repos

@yermulnik
Copy link

yermulnik commented May 31, 2023

Should I file standalone ticket for the alike error?

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: LibraryOpenError(OpenError { kind: Library, detail: "opening library failed (libXcursor.so.1: cannot open shared object file: No such file or directory); opening library failed (libXcursor.so: cannot open shared object file: No such file or directory)" })', /github/home/.cache/Homebrew/cargo_cache/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:719:9

(affected both of mine Ubuntu Bionic and Ubuntu Jammy)

UPD: on both systems

> dpkg -L libxcursor1
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
/usr/share
/usr/share/doc
/usr/share/doc/libxcursor1
/usr/share/doc/libxcursor1/changelog.Debian.gz
/usr/share/doc/libxcursor1/copyright
/usr/lib/x86_64-linux-gnu/libXcursor.so.1

UPD2: on both installed via Homebrew

@GyulyVGC
Copy link
Owner

GyulyVGC commented Jun 1, 2023

After Googling for some possible solution, I've found out that it could be related to the GUI.
Before asking you to install other dependencies, can you guys try if this version of sniffnet solves the issue?

sniffnet_1.2.0_amd64.deb.zip

It's built using an alternative graphical renderer (glow instead of wgpu).

@yermulnik
Copy link

@GyulyVGC
On my local Ubuntu Bionic:

> /usr/bin/sniffnet
/usr/bin/sniffnet: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

On remote Ubuntu Jammy via SSH works fine.

Which version of OpenSSL does libssl.so.3 belong in? Bionic looks to have 1.1.1.

@GyulyVGC
Copy link
Owner

GyulyVGC commented Jun 1, 2023

@yermulnik I'm happy it now works on your Ubuntu Jammy at least.

Have a look at #199 where earlier we discussed about a problem which could be related to yours.
We hope to solve it with the next release.

@yermulnik
Copy link

yermulnik commented Jun 1, 2023

@GyulyVGC Despite packaging complexity for Linux distros because there are some in the wild, it shouldn't be a big deal to package binaries for most of the LTSes of common platforms — there are quite a few of them actually — though (to continue about "despite..." that I started with) I do have Homebrew installed along with openssl@3 and respectively with libssl.so.3, hence, probably, packaging the updated binary for Homebrew would fix the issue for me on Bionic as well 👍🏻 Works for me... though having packages for package managers of most common Linux distros (inc LTS) may give this project a pretty good kick to broader popularity 🤞🏻

@GyulyVGC
Copy link
Owner

GyulyVGC commented Jun 2, 2023

Thanks very much for the suggestions, they will be kept into account 👍

@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 6, 2023

@yermulnik The package distribution on such repositories is planned for the future. But, the libssl issue is now fixed in #246 PR and it's waiting to be merged.

@mb0x88 @NULLAiden @Albonycal @yermulnik Are you trying to run the app with elevated privileges?

@yermulnik
Copy link

the libssl issue is now fixed in #246 PR and it's waiting to be merged.

Thank you

Are you trying to run the app with elevated privileges?

Both

@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 6, 2023

Both

Well, this would partially explain it... However, I've done a test on Debian that uses Wayland as well as ParrotOS that uses X11, and in both cases, I was able to run the app without issue from the non-root user.

@Albonycal
Copy link

No I am not
image

@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 6, 2023

@Albonycal Have you got an Nvidia GPU? In that case, there is a known issue with WGPU on Wayland: gfx-rs/wgpu#2519

@Albonycal
Copy link

it's running on the AMD iGPU

@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 7, 2023

it's running on the AMD iGPU

I have to test this on my own... Are you using a specific Arch-based distro or you have customized your own version of Arch Linux?

@Albonycal
Copy link

I do have an nvidia GPU in this laptop, but wayland using using AMD igpu. And it's just plain arch

@GyulyVGC GyulyVGC added bug Something isn't working and removed missing dependency Problem related to an external required dependency labels Jun 14, 2023
@hadrabap
Copy link

hadrabap commented Dec 2, 2023

Something very similar on Oracle Linux 8.9 (like RHEL) in X11 mode (Wayland is disabled):

[opc@sws debug]$ RUST_BACKTRACE=full ./sniffnet 

  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.2.2  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: XOpenDisplayFailed', /home/opc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:757:9
stack backtrace:
   0:     0x55e9c03d07f1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h4f45cce4ac3a7147
   1:     0x55e9c03fc30f - core::fmt::write::hf35fbf0210213ba3
   2:     0x55e9c03ccc41 - std::io::Write::write_fmt::hc43f7f971f145b79
   3:     0x55e9c03d0605 - std::sys_common::backtrace::print::ha0f323e15780a6b8
   4:     0x55e9c03d1e17 - std::panicking::default_hook::{{closure}}::h4add5cc43dd6fa0f
   5:     0x55e9c03d1c04 - std::panicking::default_hook::h80cedca9aaa58c55
   6:     0x55e9be4d7da3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hb69409f47b09e95c
                               at /builddir/build/BUILD/rustc-1.71.1-src/library/alloc/src/boxed.rs:1999:9
   7:     0x55e9be5aeaab - sniffnet::main::{{closure}}::h3bf89ef785e5c42c
                               at /mnt/hdd/home/opc/Projects/sniffnet/src/main.rs:71:9
   8:     0x55e9c03d242d - std::panicking::rust_panic_with_hook::hd32f9ad92bb7ff1a
   9:     0x55e9c03d21c7 - std::panicking::begin_panic_handler::{{closure}}::h3ef0db8183a8442a
  10:     0x55e9c03d0c26 - std::sys_common::backtrace::__rust_end_short_backtrace::h42fd7a1ff33a6f0c
  11:     0x55e9c03d1f12 - rust_begin_unwind
  12:     0x55e9be2a7193 - core::panicking::panic_fmt::hc0d699c1db7ef649
  13:     0x55e9be2c418a - winit::platform_impl::platform::EventLoop<T>::new::h526d36138ead5d6d
                               at /home/opc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/linux/mod.rs:757:9
  14:     0x55e9be3f503f - winit::event_loop::EventLoopBuilder<T>::build::he808b9c0849049e9
                               at /home/opc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/event_loop.rs:121:25
  15:     0x55e9be412253 - iced_winit::application::run::h8db4b3bb35c01a49
                               at /home/opc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.10.0/src/application.rs:131:22
  16:     0x55e9be4e9b32 - iced::application::Application::run::h4dfb513ffbced4c0
                               at /home/opc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced-0.10.0/src/application.rs:208:12
  17:     0x55e9be525caf - sniffnet::main::hd0b9ca4fdf603be2
                               at /mnt/hdd/home/opc/Projects/sniffnet/src/main.rs:106:5
  18:     0x55e9be562622 - core::ops::function::FnOnce::call_once::h33073343c3b955a4
                               at /builddir/build/BUILD/rustc-1.71.1-src/library/core/src/ops/function.rs:250:5
  19:     0x55e9be33aaad - std::sys_common::backtrace::__rust_begin_short_backtrace::h375f17d541dc19fa
                               at /builddir/build/BUILD/rustc-1.71.1-src/library/std/src/sys_common/backtrace.rs:135:18
  20:     0x55e9be339826 - std::rt::lang_start::{{closure}}::h9a46345297334b62
                               at /builddir/build/BUILD/rustc-1.71.1-src/library/std/src/rt.rs:166:18
  21:     0x55e9c03c7505 - std::rt::lang_start_internal::hece7c93e36bed4be
  22:     0x55e9be3397fa - std::rt::lang_start::hc6b9ae2035b4acaf
                               at /builddir/build/BUILD/rustc-1.71.1-src/library/std/src/rt.rs:165:17
  23:     0x55e9be525d7e - main
  24:     0x7fe6eade8e45 - __libc_start_main
  25:     0x55e9be2a7a2e - _start
  26:                0x0 - <unknown>
    [opc@sws debug]$ 

@DawnMagnet
Copy link

I'm also using v1.2.2 Wayland at ArchLinux, and I'm facing a different problem


  /---------------------------------------------------------\
 |     _____           _    __    __                  _      |
 |    / ____|         (_)  / _|  / _|                | |     |
 |   | (___    _ __    _  | |_  | |_   _ __     ___  | |_    |
 |    \___ \  | '_ \  | | |  _| |  _| | '_ \   / _ \ | __|   |
 |    ____) | | | | | | | | |   | |   | | | | |  __/ | |_    |
 |   |_____/  |_| |_| |_| |_|   |_|   |_| |_|  \___|  \__|   |
 |                                                           |
 |                   ___________                             |
 |                  /___________\                            |
 |                 | ___________ |                           |
 |                 | |         | |                           |
 |                 | | v1.2.2  | |                           |
 |                 | |_________| |________________________   |
 |                 \_____________/   by Giuliano Bellini  )  |
 |                 / ''''''''''' \                       /   |
 |                / ::::::::::::: \                  =D-'    |
 |               (_________________)                         |
  \_________________________________________________________/
interface 'wl_surface' has no event 2

@DawnMagnet
Copy link

DawnMagnet

It seems similar with alacritty/alacritty#7083

@GyulyVGC
Copy link
Owner

GyulyVGC commented Apr 9, 2024

@DawnMagnet please see #463.

Yesterday I published v1.3.0, which should have fixed your problem on Arch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Linux Something related to Linux operating system
Projects
None yet
Development

No branches or pull requests

8 participants