Closed Bug 1906256 Opened 2 years ago Closed 1 year ago

The "Use Microphone" functionality does not work in the Google Gemini Chat sidebar

Categories

(Core :: Machine Learning: General, defect)

Desktop
Unspecified
defect

Tracking

()

VERIFIED FIXED
145 Branch
Tracking Status
firefox-esr128 --- disabled
firefox-esr140 --- disabled
firefox127 --- disabled
firefox128 --- disabled
firefox129 --- disabled
firefox143 --- wontfix
firefox144 --- verified
firefox145 --- verified

People

(Reporter: rdoghi, Assigned: yjamora, NeedInfo)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [genai])

Attachments

(2 external files)

Found in

  • Nightly 129.0a1

Affected versions

  • Nightly 129.0a1 (2024-07-04)

Affected platforms

  • All

Steps to reproduce

  1. Reach about:preferences#experimental page.
  2. Enable the AI Chat integration.
  3. Select the Google Gemini provider.
  4. Reach the AI chat Sidebar.
  5. Try to Use the microphone in order to chat with the google Gemini AI

Expected result

  • The Mic Permissions prompt should trigger and the user should be able to use the microphone in order to chat with the AI.

Actual result

  • The Permissions Prompt is not triggered. The Use microphone function does not work from the Sidebar.
    This functionality works in a new Tab.

Regression range
Not a regression.

This issue came up on SUMO today: https://support.mozilla.org/questions/1506009

The Browser Console (for 137.0.1) shows:

TypeError: chromeDoc.defaultView.PopupNotifications is undefined
WebRTCParent.sys.mjs:1316:3

I was surprised that explicitly setting an Allow Microphone permission on gemini.google.com did not overcome this issue. But maybe that isn't relevant to the WebRTC code. ??

Blocks: 1922413
Whiteboard: [genai]

(In reply to jscher2000 from comment #1)

I was surprised that explicitly setting an Allow Microphone permission on gemini.google.com did not overcome this issue

the current code expecting a regular tab makes sure it's the active tab and active window even if the permission is already granted

https://searchfox.org/mozilla-central/rev/ace4c0612207f29c0d0530dec82e15aeb5fe17d5/toolkit/modules/PopupNotifications.sys.mjs#640-641
https://searchfox.org/mozilla-central/rev/ace4c0612207f29c0d0530dec82e15aeb5fe17d5/browser/actors/WebRTCParent.sys.mjs#799-802

perhaps we can have this bug focus on already-granted and split out correctly showing the permission dialog for the chatbot sidebar

Blocks: 1982956
Attachment #9507011 - Attachment description: WIP: Bug 1906256 - wip permission popup notification. kinda works for already granted → WIP: Bug 1906256 - allow to use mic in chatbot if the perm is already granted
Assignee: nobody → yjamora
Status: NEW → ASSIGNED
Attachment #9507011 - Attachment description: WIP: Bug 1906256 - allow to use mic in chatbot if the perm is already granted → Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=mardak!
Attachment #9507011 - Attachment description: Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=mardak! → Bug 1906256 - allow to use mic in chatbot if the perm is already granted
Attachment #9507011 - Attachment description: Bug 1906256 - allow to use mic in chatbot if the perm is already granted → Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=mardak!
Duplicate of this bug: 1991316
Pushed by elee@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0a27214edf22 https://hg.mozilla.org/integration/autoland/rev/474eef30e5e9 allow to use mic in chatbot if the perm is already granted r=Mardak,firefox-ai-ml-reviewers,emz
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/66485ded5df6 https://hg.mozilla.org/integration/autoland/rev/0da92081af4f Revert "Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=Mardak,firefox-ai-ml-reviewers,emz" for causing mochitests failures in browser_chat_sidebar.js.

Reverted this because it was causing mochitests failures in browser_chat_sidebar.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/genai/tests/browser/browser_chat_sidebar.js | A promise chain failed to handle a rejection: JSWindowActorParent.sendAsyncMessage: JSWindowActorParent cannot send at the moment - stack: denyRequestNoPermission@resource:///actors/WebRTCParent.sys.mjs:175:10
Status: RESOLVED → REOPENED
Flags: needinfo?(yjamora)
Regressions: 1992337
Resolution: FIXED → ---
Target Milestone: 145 Branch → ---
Pushed by yjamora@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fbca7ab31dfe https://hg.mozilla.org/integration/autoland/rev/48d2d5155767 allow to use mic in chatbot if the perm is already granted r=Mardak,firefox-ai-ml-reviewers,emz

firefox-beta Uplift Approval Request

  • User impact if declined: bug fix - If users request a mic access from the sidebar chatbot, they cant use the mic that already gave a granted permission in a tab.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: Go to "https://gemini.google.com/app" or "https://copilot.microsoft.com/" and click microphone icon -> Will pop a PopupNotification -> Check "Remember all microphone" -> Click Allow button -> Open sidebar or sidebar.revamp = true -> Click the chatbot tool -> Choose a provider either "Gemini" or "Copilot" in chatbot -> Once it is loaded click a microphone icon from its website -> Check if the microphone access works
  • Risk associated with taking this patch: low
  • Explanation of risk level: It is low because the changes are just a early check for the granted permission by using existing a function.
  • String changes made/needed: no
  • Is Android affected?: no
Attachment #9518202 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: REOPENED → RESOLVED
Closed: 1 year ago → 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
QA Whiteboard: [uplift][qa-ver-needed-c145/b144]
QA Contact: rdoghi

This issue is verified as fixed in our latest Nightly 145.0a1 (2025-10-05).

Attachment #9518202 - Attachment description: Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=mardak! → Bug 1906256 - allow to use mic in chatbot if the perm is already granted r=Mardak,firefox-ai-ml-reviewers,emz
Attachment #9518202 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed in our latest Beta 144.0b11

Status: RESOLVED → VERIFIED
QA Whiteboard: [uplift][qa-ver-needed-c145/b144] → [uplift][qa-ver-done-c145/b144]
Flags: qe-verify+

Verified as fixed in our latest RC build 144.0 as well

Duplicate of this bug: 1994223
No longer duplicate of this bug: 1994223
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: