Open s1gtrap opened 6 months ago
It looks like a runtime issue of some kind. The version of Node.js used is bundled with the executable (using Pkg, as the message indicates), so the system version doesn't matter.
I don't use or maintain/support the AUR packages, but the bridge was working on Ubuntu and Fedora last time I tested it and nothing has changed for a while. I can only recommend building from source if the AUR package isn't working. You can build an unpackaged version (build script flags are documented in the README) which uses the system Node.js and will give some more insight into what's going wrong if there's still an issue.
Side note: unless you're using Firefox in a container, you probably don't want to use the daemon since Firefox is able to detect and launch the bridge directly.
Hey! Really appreciate the quick response!
I had tried building it myself prior, and despite successfully building fx_cast_bridge
, I had no luck getting it to work with Firefox.
I did as instructed:
$ nvm install 16
$ npm install
$ npm run build
which leaves me with
$ ls dist/bridge/
config.json fx_cast_bridge.json fx_cast_bridge.sh src
running the generated executable gets me the following:
dist/bridge/fx_cast_bridge.sh
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
which I assume is intended?
But still fails with "Bridge not found", so I figured I had to install it, which I figured I could do with debtap
:
$ npm run package
$ ls dist/bridge/
fx_cast_bridge-0.3.0-x64.deb
$ debtap dist/bridge/fx_cast_bridge-0.3.0-x64.deb
$ ls dist/bridge/
fx-cast-bridge-0.3.0-1-x86_64.pkg.tar.zst fx_cast_bridge-0.3.0-x64.deb
$ sudo pacman -U dist/bridge/fx-cast-bridge-0.3.0-1-x86_64.pkg.tar.zst
$ ls /opt/fx_cast
dns_sd_bindings.node fx_cast_bridge
which seems to install it correctly, but the extension still fails with "Bridge not found"..
Even if I run it after install:
/opt/fx_cast/fx_cast_bridge
*** WARNING *** The program 'fx_cast_bridge' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'fx_cast_bridge' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
In either case it doesn't help to toggle the "Enable backup daemon" option, though I'm not sure if those are related.
So yea I'm still not sure of what else to do, hope that helps.
The bridge does at least appear to be functioning in some way. You can safely ignore the Avahi warning.
It looks like there's something wrong with the native messaging manifest file (either it doesn't exist, it's in the wrong place, or it's broken in some way).
Check these paths:
~/.mozilla/native-messaging-hosts/fx_cast_bridge.json
/usr/(lib|lib64)/mozilla/native-messaging-hosts/fx_cast_bridge.json
If you used the install-manifest script when following the build instructions, it would have copied a manifest to the user directory that pointed to the location of the launch script. That would then override any system-level manifests.
If you can't get native messaging to work, try the daemon again, but you can't just run the executable, you need to pass the -d flag (the wiki page you've already seen has more info) or it'll be in native messaging mode. The backup daemon connection option then needs to be enabled.
Edit: I'd definitely recommend the debtap method you used over running it unpackaged just because it's less fragile. The unpackaged version is really just for development and it'll break if files are moved around or Node.js changes.
Also, it's possible the issue is on the Firefox side, so logs could be helpful here: https://github.com/hensm/fx_cast/blob/master/CONTRIBUTING.md#bug-reports
I figured out the root cause, for some reason makepkg
isn't honoring options=('!strip')
and is stripping the fx_cast_bridge binary, forcefully replacing the binary from the dist directory fixes the issue and allows the bridge to function properly.
This is a bug with makepkg not fx_cast.
I figured out the root cause, for some reason
makepkg
isn't honoringoptions=('!strip')
and is stripping the fx_cast_bridge binary, forcefully replacing the binary from the dist directory fixes the issue and allows the bridge to function properly.This is a bug with makepkg not fx_cast.
Is there a tracking issue for this? I definitely lost track of what I was doing somewhere along the line, and would definitely prefer not to work around bugs in necessary build tools..
Any news here?
I cannot get the tool working under Arch with AUR fx_cast-bin
, too, nor with AUR fx_cast
.
Thanks for the detailed report so far! Would love to understand and fix it...
OS version: Arch Linux (6.8.1-arch1-1) Browser version: 124.0.1 Extension version: Both 0.3.0 and 0.3.1 Bridge version: 0.3.0
Description I'm getting the dreaded "Bridge not found" error after installing from AUR as directed, and I'm fairly certain it's because the bridge daemon isn't running (despite following all of the steps). Seemingly it's because the installed binary is invalid, but I simply have no idea how this is resolved..
Steps to reproduce
fx_cast-bin
(yay -S fx_cast-bin
)sudo systemctl enable avahi-daemon && sudo systemctl start avahi-daemon
)nss-mdns
and editing/etc/nsswitch.conf
/etc/systemd/system/fx_cast.service
as described in https://github.com/hensm/fx_cast/wiki/daemonExpected behaviour Bridge should be running and be reachable by Firefox.
Logs
After adding and enabling/starting the systemd daemon:
which got me examining the files actually installed:
which is really strange to me, as
It's not because of the runtime environment either, as
For the record I also tried
fx_cast
but that one fails to install:and I couldn't figure out how to edit the broken .install file as my changes never made effect.