0x800a138f - JavaScript runtime error: Unable to get property 'getRandomValues' of undefined or null reference in powerbi.js and powerbi.min.js

0

I am embedding a PowerBI report in IE using ExtJS .Net, but I am receiving the following console error:

"Unhandled exception at line 6, column 1859 in http://localhost:55020/scripts/powerbi.min.js 0x800a138f - JavaScript runtime error: Unable to get property 'getRandomValues' of undefined or null reference"

function getRandomValue() {
    // window.msCrypto for IE
    var cryptoObj = window.crypto || window.msCrypto;
    var randomValueArray = new Uint32Array(1);
    cryptoObj.getRandomValues(randomValueArray);
    return randomValueArray[0];
}

powerbi-client version 2.10.3

powerbi-embedded
asked on Stack Overflow Apr 7, 2020 by ammulu • edited Apr 7, 2020 by ammulu

1 Answer

2

getRandomValues is a method of window.msCrypto object in IE11, but it is not supported in IE9. powerbi-client library works fine with IE11.

Refer this: https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto#Browser_compatibility

answered on Stack Overflow Jul 31, 2020 by Anant_Kumar • edited Aug 5, 2020 by Anant_Kumar

User contributions licensed under CC BY-SA 3.0