ammulu
ammulu

Reputation: 1

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

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

Upvotes: 0

Views: 532

Answers (1)

Anant_Kumar
Anant_Kumar

Reputation: 941

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

Upvotes: 2

Related Questions