Skip to content

[thunderbird-companion][BUG] Native host.py is installed without a shebang, bridge never connects #561

Description

@browser-bug

Submission checklist

  • I have searched existing issues and confirmed this is not a duplicate.
  • I am using the latest available version of Noctalia and of the plugin.
  • This is a bug in a community plugin, not in Noctalia itself (those belong in the noctalia repo).

Plugin

thunderbird-companion

Plugin version

0.1.0

Bug description

The "Set up bridge" action copies native-host/host.py verbatim into $XDG_DATA_HOME/noctalia-thunderbird-companion/host.py but the bundled host.py has no #!/usr/bin/env python3 shebang.

On Linux, Thunderbird launches the native-messaging host with a direct exec, so a Python file without a shebang fails with ENOEXEC. Consequently the host never starts and the bridge reports offline indefinitely even though the ThunderBird extension is correctly installed and its permissions are approved. The bridge only starts working if the user manually prepends the shebang (like I did to confirm this).

Steps to reproduce

  1. Install the thunderbird-companion plugin and select Set up bridge. Confirmed this writes the manifest under ~/.mozilla/native-messaging-hosts/ and the host under ~/.local/share/noctalia-thunderbird-companion/.
  2. Open Thunderbird, install thunderbird-companion.xpi from the Add-ons manager, approve all permissions.
  3. Check the plugin panel: it stays offline;

Expected behavior

After installing the add-on and approving permissions, the bridge connects automatically, the native host writes connection.json (heartbeat) and snapshot.json, and the panel shows unread mail. The installable/executable host produced by the bundled setup should run as-is.

Actual behavior

The host cannot be executed. Running the installed host.py directly returns ENOEXEC and the output is interpreted as shell:

$ ./host.py
host.py: line 11: Native-messaging bridge between Thunderbird and Noctalia.: No such file or directory
host.py: line 13: from: command not found

Logs / error output


Noctalia version

v5.0.0 (5.0.0_beta.10-1-dirty)

Compositor

Niri

Environment information

- Distro: Arch Linux (Thunderbird installed natively via /usr/bin/thunderbird, not Flatpak/Snap)
- Thunderbird version: 128 or newer (native, non-sandboxed)
- python3 present and on PATH

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions