Forum Discussion
Power BI Embed ai.0.js 404 error
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.
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?
- dlarin9 years agoNew Member
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.
- Eric_Zhang9 years agoMicrosoft Employee
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.
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.