omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

omarchy-install-chromium-ytdlp / omarchy-install-chromium-copy-url don't register native messaging hosts for Brave Origin

Open ProjektZeitsand opened this issue 2 months ago • 2 comments

What happened

The Alt+Shift+D (download video) and Alt+Shift+L (copy URL) shortcuts installed by Omarchy's Chromium extensions silently do nothing in Brave Origin (brave-origin). Confirmed: works in Chromium; fails in Brave Origin. (Google Chrome, Edge, and Brave stable/beta/nightly weren't tested directly, but they have the native-messaging-host file present, so they're expected to work the same way Chromium does — only Brave Origin is confirmed missing it.)

Both extensions are loaded via --load-extension and communicate entirely through native messaging hosts:

  • omarchy-default-chromium-extensions/yt-dlp/background.js → chrome.runtime.sendNativeMessage('com.omarchy.ytdlp', ...)
  • omarchy-default-chromium-extensions/copy-url/background-4.js → chrome.runtime.sendNativeMessage('com.omarchy.copy_url', ...)

Both extensions swallow chrome.runtime.lastError, so when the native host manifest is missing, the call fails with no visible error — the shortcut appears to do nothing.

Root cause

/usr/share/omarchy/bin/omarchy-install-chromium-ytdlp and /usr/share/omarchy/bin/omarchy-install-chromium-copy-url each hardcode the same browser_dirs array of profile directories to write the native-messaging-host JSON into:

$HOME/.config/chromium
$HOME/.config/google-chrome
$HOME/.config/google-chrome-beta
$HOME/.config/google-chrome-unstable
$HOME/.config/BraveSoftware/Brave-Browser
$HOME/.config/BraveSoftware/Brave-Browser-Beta
$HOME/.config/BraveSoftware/Brave-Browser-Nightly
$HOME/.config/microsoft-edge
$HOME/.config/microsoft-edge-dev

$HOME/.config/BraveSoftware/Brave-Origin is missing from both lists, even though the extension-loading migration (migrations/1780517689.sh) already targets brave-origin (via brave-origin-flags.conf) for --load-extension. So the extension and its keyboard shortcut get registered in Brave Origin, but the native messaging host it depends on never does.

Expected

Either add $HOME/.config/BraveSoftware/Brave-Origin to both browser_dirs arrays, or (better) derive the list from the same set of flag-conf names the extension-loading migration already targets, so the two stay in sync.

Steps to reproduce

  1. Install/use Brave Origin on Omarchy.
  2. Confirm the yt-dlp and copy-url extensions are loaded (brave-origin://extensions) and their shortcuts are bound (brave-origin://extensions/shortcuts).
  3. Press Alt+Shift+D on a video page, or Alt+Shift+L on any page.
  4. Nothing happens — no download, no clipboard toast, no error.
  5. Compare ~/.config/BraveSoftware/Brave-Origin/NativeMessagingHosts/ (missing com.omarchy.ytdlp.json / com.omarchy.copy_url.json) against ~/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/ (has both).

System

  • Omarchy version: 4.0.3-1
  • This is a plain string omission in a bash array, not distro/environment-specific — reproducible on any Omarchy install with Brave Origin installed.

ProjektZeitsand avatar Sep 12 '26 23:09 ProjektZeitsand

Related: #11582 reports the same three bundled extensions (copy-url, yt-dlp, whatsapp-slim) failing on Google Chrome 153, but via a different root cause — there, --load-extension itself is ignored so the extension never loads at all. Here, the extension loads and its shortcut registers fine; only the native-messaging-host manifest is missing for the Brave Origin profile directory specifically. Separate bugs, same family of extensions.

ProjektZeitsand avatar Sep 12 '26 23:09 ProjektZeitsand

Automated duplication check: this issue looks similar to #10978, which covers the same brave Origin native hosts missing. I keep that one open and close this one to keep the discussion in one place.

If you feel this is the wrong decision, please open the issue again with a note on the difference.

bjarneo avatar Sep 21 '26 09:09 bjarneo