Forum Discussion

xli629b's avatar
xli629b
Helper II
6 years ago
Solved

Intermittent JS errors (Cannot read property 'call' of undefined) with embedding

Sometimes, when a report is embedded with the Power BI JS API, the report enters a loading state (flashing graph icon) and never loads, and there is a JS error from Power BI Embedded (see below).
  • The issue happens occasionally and isn't very predictable. I think it's more likely to happen when a report is added or deleted, but it's unclear.
  • Once it happens, it often continues to happen, but clearing all cached data and cookies for windows.net and powerbi.com makes it go away.
  • The error is from minified JS and
 
https://app.powerbi.com/13.0.11747.315/scripts/reportembed.externals.bundle.min.js
 
reportembed.externals.bundle.min.js:1324 TypeError: Cannot read property 'call' of undefined

    at r (reportEmbed.min.js:1)

    at reportEmbed.min.js:1

    at t.invoke (reportembed.externals.bundle.min.js:1197)

    at e.run (reportembed.externals.bundle.min.js:1197)

    at reportembed.externals.bundle.min.js:1197

    at t.invokeTask (reportembed.externals.bundle.min.js:1197)

    at e.runTask (reportembed.externals.bundle.min.js:1197)

    at y (reportembed.externals.bundle.min.js:1197)

2 Replies

  • After forcing it to load 13.0.11747.315/scripts/reportEmbed.js instead of 13.0.11747.315/scripts/reportEmbed.min.js, I saw that the error came from this line:

     modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);


    It tried to load modules[747] and modules[759], which are not defined in the array.

    So it seems this is a problem with async module loading, and some modules are not loaded yet when they are required. I saw this related discussion: https://github.com/webpack/webpack/issues/5429 

    This happens unpredictably, preventing the report from loading, which makes the embedded reports very unreliable. Any idea if the module loading can be fixed?