Closed plpycoin closed 1 week ago
Can you elaborate more about your use case and this issue too?
This is a problem mostly during testing, when running things from localhost and you don't need https. Add the following somewhere early in the code as a polyfill to fix:
try {
crypto.randomUUID();
} catch (e) {
crypto.randomUUID = () => {
var chars = crypto.getRandomValues(new Uint8Array(31));
return "10000000-1000-4000-8000-100000000000".replace(
/[018]/g,
(c, i) => ((c ^ chars[i]) & (15 >> (c / 4))).toString(16)
);
};
}
interesting that makes sense for the crypto API. these are just used for operation ids; I think it's fine to use another library like uuid. will make a PR to fix
Description
When uploading a YAML file from a non-localhost or non-HTTPS environment, the following problem is encountered:
Likely causes
https://stackoverflow.com/questions/74911304/crypto-module-not-loading-randomuuid-when-viewing-a-local-network-ip-address