GyulyVGC / sniffnet

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

[BUG] can't open sniffnet on Arch Linux #525

Closed xiaomx32 closed 2 months ago

xiaomx32 commented 2 months ago

Is there an existing issue for this?

What's the problem?

Describe the bug

Opening sniffnet I get an error:

thread 'main' panicked at /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.3/src/backend/wgpu_core.rs:724:18: Error in Surface::configure: Validation Error Caused by: Parent device is lost 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

Desktop

Additional context

I installed with pacman and installed all dependencies

GyulyVGC commented 2 months ago

Hi, you can try fixing this problem by using an alternative graphical renderer.

To do so, set the environment variable ICED_BACKEND=tiny-skia and let me know.

xiaomx32 commented 2 months ago

Hi, you can try fixing this problem by using an alternative graphical renderer.

To do so, set the environment variable ICED_BACKEND=tiny-skia and let me know.

Sorry, I don't know what tiny skia is. Where should I set this environment variable?

xiaomx32 commented 2 months ago

Hi, you can try fixing this problem by using an alternative graphical renderer. To do so, set the environment variable ICED_BACKEND=tiny-skia and let me know.

Sorry, I don't know what tiny skia is. Where should I set this environment variable?

I set this environment variable in the terminal and the app is run successfully! Can you tell me what caused this?

GyulyVGC commented 2 months ago

tiny-skia is another graphical renderer supported by the GUI library used by Sniffnet.

Setting this environment variable is done just like any other environment variable.

If you don't know how to set them, check out https://wiki.archlinux.org/title/Environment_variables#Globally. Note that you should set this variable in the configuration files, otherwise you'll have to reset it every time you want to run Sniffnet.

This problem was caused by your graphical drivers not properly supporting wgpu, which is the default renderer used by the application.

xiaomx32 commented 2 months ago

You're right, just now I compiled the official example of wgpu and reported the same error. Thank you for your answer.

GyulyVGC commented 2 months ago

No problem, I'm happy you solved the issue.

The wgpu renderer is slightly more efficient, so in case you are able to make it work, you can switch back setting the variable to ICED_BACKEND=wgpu.

I suggest you to check out https://github.com/iced-rs/iced/issues/1618 for possible solutions.

If they don't work, just stick to tiny-skia 😁