GyulyVGC / sniffnet

Comfortably monitor your Internet traffic 🕵️‍♂️
https://sniffnet.net
Apache License 2.0
18.63k stars 558 forks source link

Create event loop panicked (`winit`) #566

Open ngmisl opened 4 months ago

ngmisl commented 4 months ago

Is there an existing issue for this?

What's the problem?

latest release on crates and brew:

thread 'main' panicked at /home/linuxbrew/.cache/Homebrew/cargo_cache/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: NotSupported(NotSupportedError)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

How did you install the app?

installed from crates.io

Operating System

Linux

Additional context

No response

GyulyVGC commented 4 months ago

Hey @ngmisl, this seems to be an upstream issue. The program is crashing at this line of the iced_winit dependency. And this is the method that's causing the crash.

It's pretty weird that you're the first one to face this problem. Can you please provide me with additional information about your OS and environment?

GyulyVGC commented 4 months ago

You also may find useful the following issue: https://github.com/rust-windowing/winit/issues/3603

ngmisl commented 4 months ago

Hi,

I use linux

GyulyVGC commented 4 months ago

I'd need some more info:

jiliohuang commented 3 months ago

I also encountered the same problem。 OS:ubuntu 22.04.4

sniffnet version: 1.3.1

Installation method:cargo install sniffnet --locked

start sniffnet error,

message:

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:

Create event loop: Os(OsError { line: 786, file: "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/mod.rs", error: Misc("neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set.") })

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

After configuring environment variables env setup: export WAYLAND_DISPLAY=wayland-0 export WAYLAND_SOCKET=/run/user/1000/wayland-0 export DISPLAY=:0

error message: thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10: Create event loop: Os(OsError { line: 80, file: "/root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(InvalidFd)) }) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Robert-Du0001 commented 3 months ago

I've also encountered the same problem.

lcdss commented 2 months ago

Same here on Arch Linux with Gnome (Wayland):

thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/iced_winit-0.12.2/src/application.rs:119:10:
Create event loop: Os(OsError { line: 80, file: "/build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoCompositor)) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace