Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dlarin
New Member

Power BI Embed ai.0.js 404 error

Hello,

 

I currently have a problem after following the following tutorial :

 

https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-tile-load-tile-iframe/

 

My code mostly follows the tutorial.

 

The iframe sources are set first then the security token is used during the onload event of the iframe exactly like in the above tutorial.

 

Everything works and the dashboard tiles all load correctly.

 

The problem lies with the loading time which I assume is linked to a script error I am getting :Console.png

 

Seeing as over 3 seconds is being wasted during the whole call to obtain this script I can only assume that fixing this error would fix my slow loading problem.

 

After searching left and right I could not find a way to fix my problem.

3 REPLIES 3
Eric_Zhang
Employee
Employee

@dlarin

That slowness might be related to your network, I'm not experiencing the slowness loading the ai.0.js. I think there's very limited things you can do on your side, better to raise a support ticket.

Capture.PNG

 

By the way, usually it is the first time that would consume some seconds, then in sequent loadings it will load from the disk cache, do you experience any slowness after the first load?

I believe the slowness is caused by some sort of timeout delay somehow caused by a 404 error when trying to get the ai.0.js script file.

 

For some reason ai.0.js is the only file who's url is set as : https://app.powerbi.com/undefined/scripts/ai.0.js

 

All the other resources do not have undefined in their url (Ex: https://app.powerbi.com/13.0.1700.1204/scripts/localytics.min.js).

 

I'm assuming that is the root of my entire problem.

 

The url is however set inside utility.min.js over which I have little control. And since it is a minified file is a bit of a pain to even debug to see if I could control the url through some parameter that I may be missing (which isn't mentionned in any tutorial).

 

PS - And yes, the slowness is seen at every single loading since ai.0.js is never cached because it always returns a 404 error it keeps trying to get it at every load and gets a 404 every single time.

@dlarin

In my case, it points to the "https://app.powerbi.com/13.0.1700.1256/scripts/ai.0.js".

 

As to why it points to undefined/scripts/ai.0.js in your case, maybe due to geography factor, I guess you're redirected to an different Power BI cluster node, in which the utility.min.js may have issue to lead you to the correct path of ai.0.js.

 

I'm not quite familiar with Chrome dev tool, and in my case, it seems leading to a node as below(https://168.63.174.8/13.0.1700.1256/scripts/utility.min.js). Maybe we could find any clue by comparing the the utility.min.js difference if you can post the node address in your case.

You could also try to replace the app.powerbi.com in embed url with the my IP address to see if you would have the same issue or not.

Capture.PNG 

 

I don't have further expertise on this and I'm not able to reproduce the issue on my side, so I'll still suggest you submit an support ticket.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.