Forum Discussion
Uncaught ReferenceError: ClipboardItem is not defined
- 1 year ago
I think the thread can be closed. MS fixed it. Thanks
Uncaught ReferenceError: ClipboardItem is not defined - Power BI Embed in WebView Suddenly Failing
Hi Power BI Community,
We've been using Power BI embedded reports inside a production application via WebView for quite a while now - everything was stable. However, very recently, we've started encountering the following error in the browser console:
Uncaught ReferenceError: ClipboardItem is not defined
This error is triggered at the point of embedding the report using:
report = powerbi.embed(embedContainer, config);
Key Notes:
- Our application setup hasn’t changed - same config, same environment, and same WebView.
- This error only started appearing recently, possibly due to a change in the Power BI SDK (reportEmbed.min.js) or related service.
- Appears to be related to the Clipboard API - specifically ClipboardItem, which is not supported in some WebView contexts or over HTTP.
Community Echoes:
I noticed other developers are facing the exact issue across different platforms and embedding methods:
- Long-running web apps suddenly breaking due to this error, without any recent code changes.
- WPF applications using WebView2 now require serving the HTML file over HTTPS to work.
- Issue seems tied to updates in Power BI's embed SDK - possibly stricter Clipboard API enforcement.
- Some reports confirm that switching to HTTPS resolved the issue, even when HTTP worked fine before.
What I'm looking for:
- Has there been an official change or announcement from Microsoft regarding Clipboard API enforcement in the embed SDK?
- Any workaround to suppress or bypass ClipboardItem usage if clipboard functionality isn't needed?
- Can the Power BI product team confirm if reportEmbed.min.js was recently updated with breaking changes?
This issue is currently affecting our internal dashboards across environments. Any clarity or guidance would be greatly appreciated.
Thanks in advance!
- Puneeth