GyulyVGC/sniffnet · error

An error occurred!

Error message

An error occurred!

What it means

error_translation() (src/translations/translations.rs:1090) returns the localized generic banner 'An error occurred!' used by the GUI's waiting page (src/gui/pages/waiting_page.rs:38) whenever sniffer.pcap_error is set. The banner is not an error itself: it is prefixed above the concrete pcap error string, which was captured earlier as CaptureContext::Error(e.to_string()). It tells the user packet capture could not start or continue.

Source

Thrown at src/translations/translations.rs:1090

//                          Για να προσθέσεις μια σύνδεση στα αγαπημένα σου, κλίκαρε στο σύμβολο με το αστέρι δίπλα στη σύνδεση.",
//         Language::FA => "در حال حاضر هیچ چیزی برای نمایش نیست.\n\
//                         برای افزودن یک پیوند به پسندیده های خود، روی نشان ستاره کنار پیوند کلیک کنید.",
//         Language::SE => "Inget att visa för tillfälet.\n\
//                          För att lägga till anslutningar till dina favoriter, klicka på stjärnsymbolen nära anslutningen.",
//         Language::UZ => "Ayni paytda ko'rsatiladigan hech narsa yo'q.\n\
//         Ulanishni sevimlilar ro'yhatiga qo'shish uchun ulanish yaqinidagi yulduzcha belgisini bosing."
//         Language::ID => "Tidak ada yang ditampilkan untuk saatini.\n\
//                          untuk menambah koneksi ke favorit, klik dilogo bintang dekat dengan koneksi.",
//         Language::NL => "Niets om te laten zien op dit moment.\n\
//                          Om een verbinding toe te voegen aan je favorieten, klik op het ster symbool naast de verbinding.",
//         Language::HU => "Jelenleg nincs mutatni való.\n\
//                          A kedvencekhez való hozzáadáshoz nyomj rá a csillag jelre egy adott kapcsolat mellett.",
//     })
// }

pub fn error_translation(language: Language) -> &'static str {
    match language {
        Language::EN => "An error occurred!",
        Language::CS => "Vyskytla se chyba!",
        Language::IT => "Si è verificato un errore!",
        Language::FR => "Une erreur est survenue!",
        Language::ES => "¡Se ha producido un error!",
        Language::PL => "Wystąpił błąd!",
        Language::DE => "Es ist ein Fehler aufgetreten!",
        Language::UK => "Зʼявилась помилка!",
        Language::ZH => "发生了一些错误!",
        Language::ZH_TW => "發生錯誤!",
        Language::RO => "A apărut o eroare!",
        Language::KO => "오류가 발생하였습니다!",
        Language::TR => "Bir hata oluştu!",
        Language::RU => "Произошла ошибка!",
        Language::PT => "Ocorreu um erro!",
        Language::EL => "Κάποιο σφάλμα συνέβη!",
        // Language::FA => format!(
        //     "خطایی رخ داد! \n\n\
        //                         {error}"

View on GitHub (pinned to 48b0575dc0)

Solutions

  1. Read the second paragraph under the banner — it is the raw error string (e.g. 'libpcap error: permissions problem') and identifies which of the three failure classes it is.
  2. If it is a permissions error, restart with elevated privileges or grant the binary CAP_NET_RAW (Linux), run as admin/Npcap user (Windows).
  3. If the error mentions the filter, re-enter or clear the BPF filter text and restart the run.
  4. If the error mentions the output file, pick a writable .pcap path or disable pcap output.
  5. If the adapter disappeared, reopen adapter selection and pick a currently active device.
Defensive patterns

Strategy: fallback

Prevention

When it happens

Trigger: The waiting page renders this text when CaptureContext construction failed: device open failure (permissions, missing adapter — error 7), BPF filter rejection (error 8), or output pcap savefile creation failure (error 9). It shows when capture hasn't started (tot_packets == 0 and pcap_error present) and stays until the user changes capture settings and restarts.

Common situations: Launching Sniffnet without capture privileges (most common); selecting a network adapter that was unplugged or renamed after app start; typing an invalid BPF filter in the filter panel; choosing a pcap output path in a read-only directory; opening a corrupted or non-pcap file as the capture source.

Related errors


AI-assisted analysis of GyulyVGC/sniffnet@48b0575dc0 (2026-08-16). Data as JSON: /api/errors/82b7cf2acee32ce4. Report an issue: GitHub.