Firefox on macOS casually indicates active screen sharing (MacOS 14)
Categories
(Core :: WebRTC, defect)
Tracking
()
People
(Reporter: emanueleant03, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/118.0
Steps to reproduce:
Just normally using Firefox without any tab or page trying to share my screen.
Actual results:
The macOS native purple icon of screen sharing appears on the top bar and says that firefox is sharing the screen. I don't know if any website has access to this automatically started sharing.
Expected results:
No screen sharing should have been started by Firefox.
Reporter | ||
Comment 1•8 months ago
|
||
macOS version 14.0
Comment 2•8 months ago
|
||
Does this happen regularly or did it just happen once?
Reporter | ||
Comment 3•8 months ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #2)
Does this happen regularly or did it just happen once?
It happens regularly, like once or twice a day
Comment 4•8 months ago
|
||
The next time this happens, right-click on the screen sharing icon. This displays a dialog with the name of the controlling machine (and giving you an option to disconnect it). Do you recognize the name? It may just be an ip address.
With the right-click dialog displayed, capture an image of it and its immediate surroundings (Cmd-Shift-5), then attach that image here (Attach New File above).
Comment 5•8 months ago
•
|
||
As far as I know, Firefox never uses the system screen sharing icon. If I'm right, this bug probably has nothing to do with Firefox.
Edit: But maybe you have a Firefox extension that supports screen sharing.
Reporter | ||
Comment 6•8 months ago
|
||
Reporter | ||
Comment 7•8 months ago
|
||
Reporter | ||
Comment 8•8 months ago
|
||
I managed to reproduce it by closing firefox (without quitting the app), but the dialog doesn't give any more info.
Comment 9•8 months ago
|
||
Thanks for the screenshots. They go beyond my knowledge of Firefox's current capabilities. So I probably won't be much help here.
One more thing you can do, though: Visit about:addons and then choose Extensions. What extensions do you see there? Don't include those listed under Recommended Extensions.
Reporter | ||
Comment 10•8 months ago
|
||
Reporter | ||
Comment 11•8 months ago
|
||
I attached a screenshot of the addons, hope it helps you
Comment 12•8 months ago
|
||
(In reply to Emanuele Antonio Faraone from comment #11)
I attached a screenshot of the addons, hope it helps you
Thanks for the screenshot, but I'm afraid it doesn't help me. I don't see anything there related to screen sharing or screen capture.
I've done as much as I can here. Someone else will need to step in who knows about Firefox screen sharing or screen capturing.
Comment 13•8 months ago
|
||
I think the only place we use screen sharing is for WebRTC, so maybe I should have put this there instead. jib, any ideas for figuring out what is going on? Thanks.
Comment 14•8 months ago
|
||
One more set of questions for Emanuele:
What version of macOS are you currently using? Is it macOS 14? If so, I assume you upgraded recently, and that you were using Firefox (and your current configuration of it) before the upgrade. If all my assumptions are true, did you see this bug before the upgrade to macOS 14? If not, this may turn out to be an Apple bug.
Comment 15•8 months ago
|
||
For what it's worth, I found a website that demos WebRTC screen sharing:
https://www.webrtc-experiment.com/screen-sharing
Interestingly, it's only on macOS 14 that the system screen sharing icon appears when you choose to share your entire screen (in this demo). It doesn't appear on macOS 13.
Not sure what this means, but it's worth mentioning.
Also notable: The screen sharing icon (on macOS 14) takes about 15 seconds to disappear when you stop sharing your screen (in the demo), when you close the tab containing the demo, or when you quit Firefox. Sounds like a bug. I don't know if it's Mozilla's or Apple's. I also don't know if it's related to this bug.
Comment 16•8 months ago
|
||
Another interesting tidbit:
If you share your entire screen in the WebRTC screen sharing demo from comment #15, you see two screensharing icons on macOS 14 -- the system one and (to its left) what's presumably a Mozilla-generated one. I don't know why Emanuele sees only one.
Comment 17•8 months ago
|
||
Just closing Firefox's (single) window doesn't trigger Emanuele's bug for me. (FF 118, macOS 14)
Reporter | ||
Comment 18•8 months ago
|
||
(In reply to Steven Michaud [:smichaud] (Retired) from comment #16)
Created attachment 9356241 [details]
WebRTC Screensharing icons on macOS 14Another interesting tidbit:
If you share your entire screen in the WebRTC screen sharing demo from comment #15, you see two screensharing icons on macOS 14 -- the system one and (to its left) what's presumably a Mozilla-generated one. I don't know why Emanuele sees only one.
I just tried the sharing demo and I have two screen sharing icons too, when the bug happens I only have the system one. Also, closing firefox's window doesn't always trigger the bug, but it happened twice in this situation for me. Happy to help if you need anything else.
Comment 19•8 months ago
|
||
I searched on screen shar
at https://searchfox.org/. Most of the hits were clearly related to WebRTC. But others seemed to involve a "video engine" under dom/media/systemservices
. I've no idea whether or not that has something to do with WebRTC, or even whether the code is currently active.
Comment 20•8 months ago
|
||
Another question occurs to me, Emanuele:
Do you have Firefox Sync (about:preferences#sync) turned on, and are you running Firefox on more than one computer on your local network (possibly including a cell phone)? Even if you don't have it on, do you have a Firefox Sync account?
I don't have it turned on, and don't use it. But I do have an account, and do run Firefox on multiple machines on my local network. On macOS 13 and (I think) 12, I have sometimes seen "extra" Firefox icons on my Dock, which I think were spawned by Firefox Sync. I very seldom run macOS 14. But I'm going to start running Firefox on it more often. I'm hoping it's only a matter of time before I also see your bug. I'm hoping that, on macOS 14, the "extra" Dock icon will morph into the system screen sharing icon (on the system menubar).
And yet another, rather obvious question: Do you have screen sharing turned on in System Settings ? :-)
Comment 21•8 months ago
|
||
I just found out that turning screen sharing off (in System Settings) doesn't stop the WebRTC screen sharing demo from working (on macOS 14, in FF 118). I still see both icons -- the Mozilla one and the system one.
Comment 22•8 months ago
|
||
(Following up comment #20)
I'm now seeing the "extra" Firefox icons, in the Dock, on two different machines. One is using macOS 13 and the other macOS 14. Firefox is running on both of them. I also needed to log in with my Apple ID on both machines (where I have local accounts that share the same name and password). So I was wrong on two counts: 1) Those "extra" Dock icons have nothing to do with Firefox Sync. 2) They don't morph into the system screen sharing icon on macOS 14.
Comment 23•8 months ago
|
||
I'm not yet on macOS 14 so I cannot check myself, but a few thoughts:
Does this reproduce if you set the pref media.getusermedia.screensharing.enabled=false
on about:config
? (don't forget to turn it back on if you want to do screensharing later on)
If yes, it is definitely something else than the getDisplayMedia screen/window capture backend making this icon appear.
Could it appear if we take a snapshot of our windows with CGWindowListCreateImage
, for instance? I can't tell if those rust APIs are used.
Comment 24•8 months ago
|
||
(In reply to Steven Michaud [:smichaud] (Retired) from comment #15)
Also notable: The screen sharing icon (on macOS 14) takes about 15 seconds to disappear when you stop sharing your screen (in the demo), when you close the tab containing the demo, or when you quit Firefox. Sounds like a bug. I don't know if it's Mozilla's or Apple's. I also don't know if it's related to this bug.
I'd guess it's intentional by Apple so that the user knows even if the app captured just a single frame.
Comment 25•8 months ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #24)
(In reply to Steven Michaud [:smichaud] (Retired) from comment #15)
Also notable: The screen sharing icon (on macOS 14) takes about 15 seconds to disappear when you stop sharing your screen (in the demo), when you close the tab containing the demo, or when you quit Firefox. Sounds like a bug. I don't know if it's Mozilla's or Apple's. I also don't know if it's related to this bug.
I'd guess it's intentional by Apple so that the user knows even if the app captured just a single frame.
You're probably right about this. But other elements of Apple's standard screen capture GUI seem to be absent when Emanuele's bug happens. When I use "normal" screen capture (via macOS's own GUI), the screen sharing icon appears immediately on the "captured" machine. And (also immediately) a small window pops up from the icon telling you that "Screen is being controlled", together with an ip address (on my local network). Then when you disconnect (from the "capturer"), another small window immediately pops up (on the "captured" machine) telling you "Viewer has been disconnected" (together with its ip address). Both popup windows disappear in a couple of seconds. But the screen capture icon stays visible for about 15 seconds after disconnection.
Emanuele, do you see any of these popup windows when the bug happens?
Also please do try setting media.getusermedia.screensharing.enabled=false
in about:config
, as Andreas suggested. If this stops the bug from happening, Mozilla may share at least some of the blame for it (and may also be able to do something about it). If it doesn't, it's much more likely the bug is entirely Apple's fault. And it will be much more difficult to find out if Mozilla can do anything about it.
Comment 26•8 months ago
|
||
(Following up comment #25)
The popup windows also don't appear (on macOS 14) when I use the WebRTC screen sharing demo from comment #15.
Comment 27•8 months ago
|
||
Emanuele, yet another question I forgot to ask earlier: Are you using an Apple Silicon Mac? Or is it an Intel Mac?
With a bug as weird as this one, that might make a difference. So far I've only been testing (on macOS 14) on an Intel Mac.
Reporter | ||
Comment 28•8 months ago
|
||
I am using an apple silicon one ( MacBook Air M2 ), also Firefox was installed before upgrading to macOS 14.
Comment 29•8 months ago
|
||
I just discovered something interesting: I built Firefox from current trunk code on macOS 14 (Apple Silicon), and I didn't see the system screen sharing icon when I ran the WebRTC demo from comment #15 -- only the Mozilla screen sharing icon. But I saw both when I ran the demo in today's mozilla-central nightly (build id 20231004094640
).
I don't know what's going on. I'll try again with tomorrow's mozilla-central nightly.
Comment 30•8 months ago
|
||
Even more interesting: I ran ./mach package
to package my local build into a .dmg
file. And when I extracted the Nightly app from that and ran it, this time I did see both screen sharing icons.
And yet still more interesting: When I ran today's mozilla-central nightly from Terminal (/Applications/Firefox\ Nightly.app/Contents/MacOS/firefox
), I saw just the Mozilla screen-sharing icon.
This is starting to look more and more like an Apple bug.
Emanuele, we really do need to hear from you whether or not the media.getusermedia.screensharing.enabled=false
setting makes your bug go away.
Comment 31•8 months ago
•
|
||
I see both screen-sharing icons when I use the open
command to run Firefox or Firefox Nightly from Terminal (open /Applications/Firefox.app
or open /Applications/Firefox\ Nightly.app
), or when I run either app by double-clicking on its icon. I only see the Mozilla icon when I run the Firefox or Firefox Nightly binary from the command line (/Applications/Firefox.app/Contents/MacOS/firefox
or /Applications/Firefox\ Nightly.app/Contents/MacOS/firefox
).
So both screen sharing icons appear when Firefox is opened using the macOS GUI, and only the Mozilla icon appears when the Firefox binary is run from the command line.
Comment 32•8 months ago
|
||
As best I can tell, the /System/Library/CoreServices/ControlCenter.app
application is what displays the buggy screen sharing icon. When it's displayed (by the WebRTC screen sharing demo from comment #15), and you right-click on it, you see the message "Firefox is capturing your screen". Use the following command to grep through your entire hard drive, and you'll see that its executable and one of its resources contain the string "is capturing your screen".
sudo find / -type f -exec grep -s -H "is capturing your screen" \{\} \;
I need my HookCase to debug this further. But I must wait until I've added support for macOS 14 (in a week or two).
Comment 33•8 months ago
|
||
This doesn't need to be a sec bug. Likely due to changes Apple has made in 14 related to screen sharing indication. Opening this up so others can find it and report on it.
Updated•8 months ago
|
Comment 34•8 months ago
|
||
Can you please post your about:support text from this device? Thanks.
Reporter | ||
Comment 35•8 months ago
|
||
Updated•8 months ago
|
Comment 36•7 months ago
|
||
So far I haven't run into this after the upgrade last week. Lets keep an eye on it.
Comment 37•7 months ago
|
||
No additional reports and we have not seen this in testing.
Updated•7 months ago
|
Comment 38•7 months ago
•
|
||
I'm on macOS 14 and cannot repro.
To clarify how screen capture works, macOS 14 introduced a new OS-level icon in the top bar next to Firefox's own indicator. I see it when sharing my screen. However, that OS indicator should never appear alone (except during screen-sharing preview, and except for the 15 seconds extra it hangs around after Firefox's indicator disappears upon capture ending).
The OS-level indicator should NOT appear otherwise, or if the "Screen Recording" OS-level permission for Firefox is off (the fact that macOS allows "limited" capture without permission for apps to self-capture or capture a dummy desktop should not confuse this).
To the OP problem, to rule out some malicious extension, I'd recommend trying with a clean Firefox profile or restart in safe mode.
Comment 39•15 days ago
|
||
A needinfo is requested from the reporter, however, the reporter is inactive on Bugzilla. Given that the bug is still UNCONFIRMED
, closing the bug as incomplete.
For more information, please visit BugBot documentation.
Description
•