useEffect(() => {
fetch(`http://localhost:5173/1.db.xz`)
.then(compressedResponse => {
const decompressedResponse = new Response(
new XzReadableStream(compressedResponse.body!)
);
return decompressedResponse.arrayBuffer();
})
.catch(error => {
console.error('Error:', error);
});
fetch(`http://localhost:5173/2.db.xz`)
.then(compressedResponse => {
const decompressedResponse = new Response(
new XzReadableStream(compressedResponse.body!)
);
return decompressedResponse.arrayBuffer();
})
.catch(error => {
console.error('Error:', error);
});
}, []);
Code above works fine on Chrome, but on Firefox this will lead to Failed to read data from the ReadableStream: “TypeError: attempting to access detached ArrayBuffer”., and this error will occur only when multiple fetch() (or multiple decompression thread?) are running simultaneously
Code above works fine on Chrome, but on Firefox this will lead to
Failed to read data from the ReadableStream: “TypeError: attempting to access detached ArrayBuffer”., and this error will occur only when multiple fetch() (or multiple decompression thread?) are running simultaneously