Skip to content

fix: Voice and video call buttons missing on Windows due to Linux User-Agent #15

Description

@jeanroukas
Image

Description

Hi! According to the README, voice and video calls should be supported. However, the call buttons (phone and camera icons) are missing from the top navigation bar inside the chat window when running the app on Windows.

Cause

In src-tauri/src/window.rs, the hardcoded User-Agent string is strictly forcing a Linux signature:

pub const CHROME_UA: &str =
    "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";

When running on Windows, WhatsApp Web detects a glaring mismatch between the underlying Windows WebView2 environment and this Linux User-Agent. As a security/anti-bot measure, Meta automatically hides the VoIP call features.

Verification
I cloned the repository, changed CHROME_UA to a standard Windows Chrome string, and compiled it locally using cargo tauri dev. With the Windows User-Agent, the voice and video call buttons instantly appeared.

Image

Suggested Solution

We should adjust CHROME_UA dynamically depending on the target OS using a conditional compilation flag (#[cfg(target_os = ...)]):

#[cfg(windows)]
pub const CHROME_UA: &str =
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";

#[cfg(not(windows))]
pub const CHROME_UA: &str =
    "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36";

Thank you for your time and for this great lightweight app!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions