dify - ✅(Solved) Fix Widget asking permission on chrome device [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35330Fetched 2026-04-17 08:56:01
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
1
Participants
Timeline (top)
labeled ×1

PR fix notes

PR #35374: fix: prevent Chrome mobile permission prompts on embedded chat widget

Description (problem / solution / changelog)

Summary

Fixes #35330 — the embedded chatbot bubble widget triggers Chrome mobile permission prompts ("access to apps and services") instead of rendering, because the iframe unconditionally requests microphone permission.

Root cause

web/public/embed.js line 159:

iframe.allow = "fullscreen;microphone";

On Chrome mobile, requesting microphone in the iframe allow attribute triggers a browser permission prompt even when the chat doesn't use audio input. This blocks the widget from rendering until the user grants permission.

Changes

  • Make microphone permission opt-in via enableMicrophone config flag in difyChatbotConfig (defaults to false)
  • Fix allow attribute syntax — use space-separated format per the Permissions Policy spec ("fullscreen; microphone" not "fullscreen;microphone")
  • Update iframe embed example in the sharing modal to only request fullscreen by default
  • Update both embed.js and embed.min.js

Usage

Users who need microphone access (e.g., for voice input) can opt in:

window.difyChatbotConfig = {
  token: 'your-token',
  enableMicrophone: true
}

Test plan

  • Embed chat widget on a test page without enableMicrophone — verify no permission prompt on Chrome mobile
  • Embed chat widget with enableMicrophone: true — verify microphone permission works when needed
  • Verify widget renders correctly on desktop browsers (Chrome, Firefox, Safari)
  • Verify existing chat functionality is unaffected (text input, responses)

Fixes #35330

Changed files

  • web/app/components/app/overview/embedded/index.tsx (modified, +1/-1)
  • web/public/embed.js (modified, +7/-1)
  • web/public/embed.min.js (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.13.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Add embbeded iframe for bubble chat in the frontend app

✔️ Expected Behavior

buble should show on all devices without asking for permission

❌ Actual Behavior

Problem

The Dify widget loads and works correctly:

  • on desktop browsers
  • on mobile browsers (Chrome/Safari)

But fails on mobile usage context, where:

it shows the message “access to apps and services” and does not render

extent analysis

TL;DR

The issue can be resolved by configuring the iframe to handle permission requests for mobile devices.

Guidance

  • Verify that the iframe is properly configured to handle permission requests on mobile devices.
  • Check the iframe's sandbox attribute to ensure it allows the necessary permissions.
  • Consider adding a permission request handler to the iframe to prompt users for access on mobile devices.
  • Review the Dify widget's documentation for any specific configuration requirements for mobile usage.

Example

No code snippet is provided as the issue lacks specific technical details about the iframe configuration.

Notes

The solution may vary depending on the specific requirements of the Dify widget and the mobile devices being used. Further investigation into the iframe configuration and permission handling is necessary to provide a complete solution.

Recommendation

Apply workaround: Configure the iframe to handle permission requests for mobile devices, as the issue seems to be related to permission handling rather than a version-specific bug.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING