cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ToC Frequent Visitor
Frequent Visitor

Error with reportEmbed.min.js

Hello,

 

I'm working on embedding PowerBI reports in Salesforce. Currently, the embedding is working in one Salesforce environment, but breaks in another. The code in both instances is the same and was created while following this blog post: https://powerbi.microsoft.com/en-us/blog/embedding-a-power-bi-report-into-salesforce/

 

Browser Console Errors:

wabi-west-us-redirect.analysis.windows.net/metadata/cluster:1 Failed to load resource: the server responded with a status of 403 (Forbidden)



reportEmbed.min.js:1 Unhandled Promise rejection: Object ; Zone: <root> ; Task: XMLHttpRequest.addEventListener:readystatechange ; Value: Object undefined

 

 

 

 

When using Fiddler to inspect what is happening, I noticed a poorly formed HTTPS request:

 

GET https://wabi-west-us-redirect.analysis.windows.net/metadata/cluster HTTP/1.1
Host: wabi-west-us-redirect.analysis.windows.net
Connection: keep-alive
Accept: application/json
Origin: https://app.powerbi.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Authorization: undefinedeyJ0e.........

When it should be:

 

GET https://wabi-west-us-redirect.analysis.windows.net/metadata/cluster HTTP/1.1
Host: wabi-west-us-redirect.analysis.windows.net
Connection: keep-alive
Accept: application/json, text/plain, */*
RequestId: e5a7c278-eb32-d0a3-e7af-6b301ebd1146
Origin: https://app.powerbi.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Authorization: Bearer eyJ0e........

 

 

 When tracing the error through Chrome Dev Tools, I found that the broken request comes from this function in reportEmbed.min.js (Approx. Line 18686):

 

           Zone.__load_patch("ZoneAwarePromise", function(t, r, o) {
                var i = o.symbol,
                    a = [],
                    s = i("Promise"),
                    u = i("then");
                o.onUnhandledError = function(t) {
                    if (o.showUncaughtError()) {
                        var e = t && t.rejection;
                        e ? console.error("Unhandled Promise rejection:", e instanceof Error ? e.message : e, "; Zone:", t.zone.name, "; Task:", t.task && t.task.source, "; Value:", e, e instanceof Error ? e.stack : void 0) : console.error(t)
                    }
 

 I'm not sure why the HTTPS request would be properly formed in one deployment, but not the other if the code is the same. From my understanding, I don't have any access to reportEmbed.min.js in terms of modifying its behavior.

 

Any information is appreciated and please let me know if you need more details.

 

Thank you.

 

 

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,682)