Open Bug 1636707 Opened 5 years ago Updated 2 years ago

Web speech functionality disabled if privacy.resistFingerprinting is set to true

Categories

(Core :: Web Speech, defect)

77 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: anti-stress, Unassigned)

Details

Attachments

(1 file)

Attached image mode_lecture.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

Hi,
On my Debian GNU/Linux Testing GNOME-Wayland system
Using either Firefox 76 debian package or Firefox 77b flatpak package (even in Safe mode for the later)
Going for instance at https://bulb.liberation.fr/playlists/slow-life-un-frein-moteur/entretien3/

Actual results:

I don't have any Narrate button in Reader mode
See screenshot attached

Expected results:

Narrate button should show up as seen there :
https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/gallery/images/2017-11-02-21-55-48-ae18f5.png

(Note that, as asked here https://bugzilla.mozilla.org/show_bug.cgi?id=1426626#c2 I have speech-dispatcher 0.9.1-5 installed on my debian system)

Thanks

OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: 68 Branch → 76 Branch
Component: Web Speech → General
Product: Core → Firefox
Component: General → Reader Mode
Product: Firefox → Toolkit

If seems that we hide the narrate button if:

  1. The narrate feature is disabled in about:config (Disabled if narrate.enabled is set to false). This is only set to false on Android, but could have been flipped manually or by the distribution if this is a non-Mozilla build.
  2. The speech synthesis API isn't able to communicate with the underlying speech engine
  3. There are no voices loaded in the underlying speech engine.

antistress, can you confirm that narrate.enabled is set to true in about:config? Do you have any voices loaded into the Debian speech synthesis system?

Hey eeejay, are there other cases that might account for this that I'm missing?

Flags: needinfo?(eitan)

An easy way to see if speech synthesis is working correctly on your machine is to run this from the js console:
speechSynthesis.getVoices()

You might have to do that several times because the voices load lazily.

If that doesn't work you should look up speech dispatcher troubleshooting on linux.

Flags: needinfo?(eitan)

Because this bug's Severity is normal and has not been changed, and this bug's priority is -- (none,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

As per comment #2, there isn't anything reader mode can do to fix speech synthesis setup on the machine, unfortunately.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME

(In reply to Mike Conley (:mconley) (:⚙️) (Extremely busy) from comment #1)

If seems that we hide the narrate button if:

  1. The narrate feature is disabled in about:config (Disabled if narrate.enabled is set to false). This is only set to false on Android, but could have been flipped manually or by the distribution if this is a non-Mozilla build.

narrate.enabled is set to true on my Firefox browsers :

https://i.postimg.cc/KjWGMPMP/narrate.png

(In reply to Eitan Isaacson [:eeejay] from comment #2)

An easy way to see if speech synthesis is working correctly on your machine is to run this from the js console:
speechSynthesis.getVoices()

You might have to do that several times because the voices load lazily.

If that doesn't work you should look up speech dispatcher troubleshooting on linux.

Hum I'm not familiar with the internal console and got : TypeError: "SpeechSynthesis.getVoices is not a function"
see : https://i.postimg.cc/PJKCCvXh/console.png

I see there was an a capital S that shouldn't be there

Ok, the console dis answer to me, but how can I copy/paste the whole answer here ?

(In reply to antistress from comment #6)

(In reply to Eitan Isaacson [:eeejay] from comment #2)

An easy way to see if speech synthesis is working correctly on your machine is to run this from the js console:
speechSynthesis.getVoices()

You might have to do that several times because the voices load lazily.

If that doesn't work you should look up speech dispatcher troubleshooting on linux.

Hum I'm not familiar with the internal console and got : TypeError: "SpeechSynthesis.getVoices is not a function"
see : https://i.postimg.cc/PJKCCvXh/console.png

The initial s needs to be lower case: speechSynthesis.getVoices()

(In reply to Mike Conley (:mconley) (:⚙️) (Extremely busy) from comment #1)

If seems that we hide the narrate button if:
3. There are no voices loaded in the underlying speech engine.

I don't know if it answers your question but my system says Hello when I run in a Terminal : spd-say Hello!

Thanks

(In reply to Eitan Isaacson [:eeejay] from comment #8)

The initial s needs to be lower case: speechSynthesis.getVoices()

ok, but how can I copy/paste the whole answer here ?
Thanks

just copy and paste it. or provide a screenshot if that is more. I am assuming you are seeing actual output? That means that synthesis is working. I think this might be a language matching bug.

Note that each line can be expanded, therefore copy/paste is incomplete :

Content Security Policy: La source « 'unsafe-inline' » présente dans « script-src » ou « style-src » a été ignorée : « nonce-source » ou « hash-source » spécifié.
Cette page utilise la propriété non standard « zoom ». Envisagez d’utiliser calc() dans les valeurs des propriétés pertinentes ou utilisez « transform » avec « transform-origin: 0 0 ». show_bug.cgi
speechSynthesis.getVoices()
[]

length: 0

<prototype>: []
​​
concat: function concat()
​​
constructor: function Array()
​​
copyWithin: function copyWithin()
​​
entries: function entries()
​​
every: function every()
​​
fill: function fill()
​​
filter: function filter()
​​
find: function find()
​​
findIndex: function findIndex()
​​
flat: function flat()
​​
flatMap: function flatMap()
​​
forEach: function forEach()
​​
includes: function includes()
​​
indexOf: function indexOf()
​​
join: function join()
​​
keys: function keys()
​​
lastIndexOf: function lastIndexOf()
​​
length: 0
​​
map: function map()
​​
pop: function pop()
​​
push: function push()
​​
reduce: function reduce()
​​
reduceRight: function reduceRight()
​​
reverse: function reverse()
​​
shift: function shift()
​​
slice: function slice()
​​
some: function some()
​​
sort: function sort()
​​
splice: function splice()
​​
toLocaleString: function toLocaleString()
​​
toString: function toString()
​​
unshift: function unshift()
​​
values: function values()
​​
Symbol(Symbol.iterator): function values()
​​
Symbol(Symbol.unscopables): Object { copyWithin: true, entries: true, fill: true, … }
​​
<prototype>: Object { … }

So your voices list is empty, but speech dispatcher is there and works fine.. seems like that may be a bug in our Linux speech synthesis support, or some quirk in your setup.

I can test with a brand new profile with the Flatpak version : If the bug still occurs, that would mean it's not about my system if I'm not mistaken.
What test do you want me to practice ?

I don't expect this to work with flatpak/snap. Try a firefox tarball downloaded from mozilla.

Ok, I tried firefox-76.0.1 from mozilla website and it works as expected !

Here are related default prefs : https://i.postimg.cc/zBLskgKJ/config.png

Thanks. The problem you were seeing was that flatpak apps are sandboxed and don't have access to the speech dispatcher system library.

Thanks, I've reported Bug 1638150 then.

After some thinking, I did a last test :

With a fresh install of Flatpak beta version with a brand new profile, keying speechSynthesis.getVoices() in the JavaScript console.

I got this (below). Does it mean that speech dispatcher is there ?

speechSynthesis.getVoices()
[]

length: 0

<prototype>: []
​​
concat: function concat()
​​
constructor: function Array()
​​
copyWithin: function copyWithin()
​​
entries: function entries()
​​
every: function every()
​​
fill: function fill()
​​
filter: function filter()
​​
find: function find()
​​
findIndex: function findIndex()
​​
flat: function flat()
​​
flatMap: function flatMap()
​​
forEach: function forEach()
​​
includes: function includes()
​​
indexOf: function indexOf()
​​
join: function join()
​​
keys: function keys()
​​
lastIndexOf: function lastIndexOf()
​​
length: 0
​​
map: function map()
​​
pop: function pop()
​​
push: function push()
​​
reduce: function reduce()
​​
reduceRight: function reduceRight()
​​
reverse: function reverse()
​​
shift: function shift()
​​
slice: function slice()
​​
some: function some()
​​
sort: function sort()
​​
splice: function splice()
​​
toLocaleString: function toLocaleString()
​​
toString: function toString()
​​
unshift: function unshift()
​​
values: function values()
​​
Symbol(Symbol.iterator): function values()
​​
Symbol(Symbol.unscopables): Object { copyWithin: true, entries: true, fill: true, … }
​​
<prototype>: Object { … }

No since the length is 0. Let's move this discussion to the new bug.

Status: RESOLVED → UNCONFIRMED
OS: Linux → Unspecified
Hardware: x86_64 → Unspecified
Resolution: WORKSFORME → ---
Summary: Narrate button is missing in Reader mode → Narrate button is missing in Reader mode if privacy.resistFingerprinting is set to true
Version: 76 Branch → 77 Branch

Hi,
I have to re-open this bug after further investigations.
I've notices 2 cases where Reader mode is missing :
1°) with Flatpak version, see Bug 1638150
2°) with non-flatpak version, when privacy.resistFingerprinting is set to true. That's this bug

The severity field is not set for this bug.
:Gijs, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(gijskruitbosch+bugs)

Arthur, why is web speech disabled by the resist fingerprinting code? Can we make it not do that for about: pages?

Component: Reader Mode → Web Speech
Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(arthur)
Product: Toolkit → Core
Summary: Narrate button is missing in Reader mode if privacy.resistFingerprinting is set to true → Web speech functionality disabled if privacy.resistFingerprinting is set to true

Redirect a needinfo that is pending on an inactive user to the triage owner.
:anatal, since the bug doesn't have a severity set, could you please set the severity or close the bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(arthuredelstein) → needinfo?(anatal)
Severity: -- → S4
Flags: needinfo?(anatal)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: