Closed Bug 1726524 Opened 5 months ago Closed 3 months ago

Screen reader (narrate) in reader view doesn't work if privacy.resistFingerprinting is enabled

Categories

(Toolkit :: Reader Mode, defect, P1)

Firefox 91
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: anishreddy20.ar, Assigned: Gijs)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Go to https://jelvix.com/blog/software-development-plan
Click on reader view
Click on narrator

Actual results:

Narrator options pop up with controls
clicking play makes the box flicker for a bit
nothing happens

Expected results:

Feature should allow user to narrate the rendered webpage in reader view using Text to Speech

The Bugbug bot thinks this bug should belong to the 'Toolkit::Reader Mode' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Reader Mode
Product: Firefox → Toolkit

This appears to work for me. Testing in 92 beta, on Windows 10. To work out why it is breaking for you and not for me, I'm going to have to ask some more questions:

Do you see the word/paragraph highlighting happen when clicking the narrate button?

Does it work in reader mode on other pages, or is it broken everywhere?

Are there any errors in the developer tools console when narration fails?

What exact version of Windows are you seeing this issue on?

If you create a separate profile for testing using the profile manager, does the same issue reproduce, or no?

Flags: needinfo?(anishreddy20.ar)

(In reply to :Gijs (he/him) from comment #2)

This appears to work for me. Testing in 92 beta, on Windows 10. To work out why it is breaking for you and not for me, I'm going to have to ask some more questions:

Do you see the word/paragraph highlighting happen when clicking the narrate button?
Nope this doesn't happen.
Does it work in reader mode on other pages, or is it broken everywhere?
Tried on other pages, getting same issue.
Are there any errors in the developer tools console when narration fails?
Console remains blank
What exact version of Windows are you seeing this issue on?
Windows 10 Pro 21H1
If you create a separate profile for testing using the profile manager, does the same issue reproduce, or no?
With a fresh profile, the issue is gone, but I dont want to create a new and go through setting everything up again. Going to try in safe mode.

Flags: needinfo?(anishreddy20.ar)

Thank you for your response. Have you had a chance to try in safe mode? Note that it is now referred to as "Troubleshoot mode" in our menus.

Flags: needinfo?(anishreddy20.ar)

Hi, yes, in safe mode it has the same issue. I'm positive it has something to with my profile.

Flags: needinfo?(anishreddy20.ar)

Are there any errors in your Browser Console (Ctrl + Shift + J) when you try to use Narrate?

Flags: needinfo?(anishreddy20.ar)

Console remains blank. No errors

Flags: needinfo?(anishreddy20.ar)

Same issue as the original reporter, but my Browser Console actually shows an error.

Do you see the word/paragraph highlighting happen when clicking the narrate button?
No.

Does it work in reader mode on other pages, or is it broken everywhere?
It is broken everywhere.

Are there any errors in the developer tools console when narration fails?
Yes, here is the shown message:
Narrate failed: speech synthesis failed. 2 NarrateControls.jsm:254
_onButtonClick resource://gre/modules/narrate/NarrateControls.jsm:254

What exact version of Windows are you seeing this issue on?
Windows 10 Home 21H1

If you create a separate profile for testing using the profile manager, does the same issue reproduce, or no?
No, it doesn't reproduce(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #6)

Are there any errors in your Browser Console (Ctrl + Shift + J) when you try to use Narrate?

Hey eeejay, looks like we've got a speech synthesis issue here... these users aren't able to get any narration to occur. Safe mode doesn't seem to fix it, but a new profile does. Any ideas about what might be happening here?

Flags: needinfo?(eitan)
Severity: -- → S3
Priority: -- → P3

One possibility is that the broken profile has a saved session where another tab is monopolizing the speech, perhaps even pinned tab that gets loaded with the browser? This would explain the breakage in safemode but the non breakage in a new profile. Wild guess.

So three questions:

  1. Do you have pinned tabs? Is there a possibility that one of those tabs is using speech synthesis?
  2. What voice do you have set in the narrate dialog's dropdown? Does changing that voice make things work?
  3. Paste the following snippet in the console, and execute. Do you hear "hello world", if not do you see anything printed in the console?
let u = new SpeechSynthesisUtterance("hello world");
u.addEventListener("error", console.log.bind(console))
speechSynthesis.speak(u)
Flags: needinfo?(eitan) → needinfo?(anishreddy20.ar)

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

One possibility is that the broken profile has a saved session where another tab is monopolizing the speech, perhaps even pinned tab that gets loaded with the browser? This would explain the breakage in safemode but the non breakage in a new profile. Wild guess.

So three questions:

  1. Do you have pinned tabs? Is there a possibility that one of those tabs is using speech synthesis?
  2. What voice do you have set in the narrate dialog's dropdown? Does changing that voice make things work?
  3. Paste the following snippet in the console, and execute. Do you hear "hello world", if not do you see anything printed in the console?
let u = new SpeechSynthesisUtterance("hello world");
u.addEventListener("error", console.log.bind(console))
speechSynthesis.speak(u)
  1. Do you have pinned tabs? Is there a possibility that one of those tabs is using speech synthesis?
    No pinned tabs.

  2. What voice do you have set in the narrate dialog's dropdown? Does changing that voice make things work?
    Using "Microsoft Zira Desktop - English (United States)", changing it to "Default" didn't work too.

  3. Paste the following snippet in the console, and execute. Do you hear "hello world", if not do you see anything printed in the console?
    No, I don't hear it.
    Here's what was printed in the console:

error { target: SpeechSynthesisUtterance, isTrusted: true, utterance: SpeechSynthesisUtterance, charIndex: 0, elapsedTime: 0, name: "", srcElement: SpeechSynthesisUtterance, currentTarget: SpeechSynthesisUtterance, eventPhase: 2, bubbles: false, … }
​
bubbles: false
​
cancelBubble: false
​
cancelable: false
​
charIndex: 0
​
charLength: null
​
composed: false
​
currentTarget: null
​
defaultPrevented: false
​
elapsedTime: 0
​
eventPhase: 0
​
explicitOriginalTarget: SpeechSynthesisUtterance { text: "hello world", volume: 1, rate: 1, … }
​
isTrusted: true
​
name: ""
​
originalTarget: SpeechSynthesisUtterance { text: "hello world", volume: 1, rate: 1, … }
​
returnValue: true
​
srcElement: SpeechSynthesisUtterance { text: "hello world", volume: 1, rate: 1, … }
​
target: SpeechSynthesisUtterance { text: "hello world", volume: 1, rate: 1, … }
​
timeStamp: 91900
​
type: "error"
​
utterance: SpeechSynthesisUtterance { text: "hello world", volume: 1, rate: 1, … }
​
<get isTrusted()>: function isTrusted()
​
<prototype>: SpeechSynthesisEventPrototype { utterance: Getter, charIndex: Getter, charLength: Getter, … }
Component: Reader Mode → Web Speech
Product: Toolkit → Core

Do you have privacy.resistFingerprinting set to true in the "broken" profile (you can check in about:config), and if so, does resetting it and restarting the browser fix the issue?

Flags: needinfo?(bugzilla.o2hsu)

(In reply to :Gijs (low availability; he/him) from comment #12)

Do you have privacy.resistFingerprinting set to true in the "broken" profile (you can check in about:config), and if so, does resetting it and restarting the browser fix the issue?

ok this disabling this fixed it for me (had it set to true), I did have pinned tabs and they video elements but nothing that would monopolize the text to speech. Also, why would enabling resist.fingerprinting break the narration? That's one of things I would like to keep enabled.

Flags: needinfo?(anishreddy20.ar)

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
Flags: needinfo?(gijskruitbosch+bugs)

(In reply to :Gijs (low availability; he/him) from comment #12)

Do you have privacy.resistFingerprinting set to true in the "broken" profile (you can check in about:config), and if so, does resetting it and restarting the browser fix the issue?

Yes, resetting privacy.resistFingerprinting to false made it work.
Is there any other way to keep it enabled and still use the narrate mode?
Thanks.

Flags: needinfo?(bugzilla.o2hsu)

(In reply to bugzilla.o2hsu from comment #15)

(In reply to :Gijs (low availability; he/him) from comment #12)

Do you have privacy.resistFingerprinting set to true in the "broken" profile (you can check in about:config), and if so, does resetting it and restarting the browser fix the issue?

Yes, resetting privacy.resistFingerprinting to false made it work.
Is there any other way to keep it enabled and still use the narrate mode?
Thanks.

As far as I can tell, there is not. resistFingerprinting blocks web speech completely. Tim/Andre, do you know why, and is a carve-out realistic? I assume that because there is a check for system principal, we should be able to also make it work for reader mode (by checking for an about: page that isn't about:blank/srcdoc etc, I suppose, similar to fluent localization or such), but I'm also curious about the general web speech being completely broken. Related: Do we have user-facing documentation of all the things fingerprint resistance breaks?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(tihuang)
Flags: needinfo?(anatal)
Summary: Screen reader (narrate) in reader view doesn't work on firefox 91.0.1 → Screen reader (narrate) in reader view doesn't work if privacy.resistFingerprinting is enabled
Flags: needinfo?(gijskruitbosch+bugs)
Flags: needinfo?(anatal)

The recognition part of the Web Speech API (the one I worked most of the time) never shipped, so this issue does not apply to it, but I'm not sure about TTS. Better ask Eitan since the wrote that code.

Flags: needinfo?(eitan)

I think resist fingerprinting should indeed block web speech. Content doesn't need any extra permissions to list voices that are setup on the UA and those would vary depending on platform, localization, extra installed modules and configurations. So it is a very potent fingerprinting vector.

Possibly, you can get getVoices return an empty array, but then we would need to retrofit narrate and its UI to work with that too.

I would disable narrate completely if resist fingerprinting is enabled. If someone down the line wants to change how the synthesis API works and re-enable narrate that can be a separate bug.

Flags: needinfo?(eitan)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Component: Web Speech → Reader Mode
Product: Core → Toolkit
Flags: needinfo?(tihuang)
Priority: -- → P1
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7756289cd7c8
don't show narrate options in reader mode when privacy.resistFingerprinting is enabled, r=eeejay
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.