My app runs completely fine in the browser but when I run it on my device, I get this error:
0 758771 log deviceready has not fired after 5 seconds.
1 758797 log Channel not fired: onDOMContentLoaded
2 758932 error Uncaught TypeError: Cannot read property '6' of undefined, http://(ip address)/build/js/Reflect.js, Line: 894
Here's the code in Reflect.js
, but this is something provided by Ionic's packaging, I can't change the code so I don't know how to fix this.
function CreateUUID() {
var data = GenRandomBytes(UUID_SIZE);
// mark as random - RFC 4122 ยง 4.4
data[6] = data[6] & 0x4f | 0x40;
data[8] = data[8] & 0xbf | 0x80;
var result = "";
for (var offset = 0; offset < UUID_SIZE; ++offset) {
var byte = data[offset];
if (offset === 4 || offset === 6 || offset === 8)
result += "-";
if (byte < 16)
result += "0";
result += byte.toString(16).toLowerCase();
}
return result;
}
It seems GenRandomBytes()
is returning null here. Can someone help please?