Bug 249909 - www/firefox is launching dbus-launcher even if compiled with DBUS=off
Summary: www/firefox is launching dbus-launcher even if compiled with DBUS=off
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2020-09-26 09:57 UTC by jakub_lach
Modified: 2020-10-08 23:06 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jakub_lach 2020-09-26 09:57:19 UTC
Since update to 80(?) Firefox is launching dbus if it's present in the system. As I don't use D-bus, but unfortunately have to have it installed, I consider it a POLA violation (change of behaviour).
Comment 1 jakub_lach 2020-09-26 14:47:05 UTC
FWIW, YouTube videos don't start properly until dbus-launcher is present.

media.cubeb.baclend=oss
Comment 2 Mateusz Piotrowski freebsd_committer 2020-10-03 16:48:05 UTC
Thanks for the report. Would you be able to provide a patch fixing the issue?
Comment 3 jakub_lach 2020-10-03 21:13:37 UTC
I would, if I could. FWIW, I've observed that Firefox is launching not only dbus-launcher but also dbus-deamon when loading video on YouTube. 

What's more is on YouTube only first video plays till end, next one never starts playing after loading (if you start it in a new tab it plays fine). 

Could anybody confirm the problem with playlists/autoplaylists? It's something recent.
Comment 4 jakub_lach 2020-10-04 22:26:23 UTC
JavaScript error: https://cfl.dropboxstatic.com/static/js/alameda_bundle/alameda_bundle_firefox_pl-vflWjthMc.js, line 2: NS_ERROR_NOT_INITIALIZED: 
JavaScript error: , line 0: NotAllowedError: The play method is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
Port.onMessage event fired while context is inactive.
console.warn: LoginRecipes: "getRecipes: falling back to a synchronous message for:" "https://consent.youtube.com"
[Child 932, MediaDecoderStateMachine #1] WARNING: Decoder=823701800 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /usr/obj/usr/ports/www/firefox/work/firefox-81.0.1/dom/media/MediaDecoderStateMachine.cpp, line 3470

<...>

[Child 932, MediaDecoderStateMachine #1] WARNING: Decoder=823701800 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /usr/obj/usr/ports/www/firefox/work/firefox-81.0.1/dom/media/MediaDecoderStateMachine.cpp, line 3470
console.warn: services.settings: Could not determine network status. Message: TypeError: Cc[aContract] is undefined
Comment 5 Christian Weisgerber freebsd_committer 2020-10-05 18:41:16 UTC
(In reply to jakub_lach from comment #3)
I see the same YouTube problem with Firefox-81.0.1,2 on FreeBSD/amd64 12.2-STABLE. It doesn't require playlists.

My "desktop environment" is mwm and a bunch of xterms. I do not launch dbus explicitly myself.
Comment 6 jakub_lach 2020-10-05 21:33:38 UTC
(In reply to Christian Weisgerber from comment #5)

Similar here - dwm/xterm.
Comment 7 Christian Weisgerber freebsd_committer 2020-10-06 18:33:26 UTC
I'm sorry, I think we're mixing up unrelated problems here.

I'm now running dbus in the background, I added...

if [ -x /usr/local/bin/dbus-launch -a -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
        eval $(dbus-launch --sh-syntax --exit-with-x11)
fi

...to my ~/.xsession, and the problem with YouTube persists.
Comment 8 jakub_lach 2020-10-08 18:34:59 UTC
I'm sorry for the confusion, here it look like that:

1. Firefox is launching dbus-* before playing YouTube videos.
2. Nevertheless, autoplay doesn't work (only first video plays).
Comment 9 jakub_lach 2020-10-08 23:06:28 UTC
(In reply to jakub_lach from comment #8)

2. No longer occurs with firefox-81.0.1_1,2  (autoplay works)