Uncaught DOMException: Failed to execute ‘readAsDataURL’ on ‘FileReader’: The object is already busy reading Blobs.
Error reason: a FileReader is reused
Solution: Create a FileReader each time
function read_files(){
document.querySelector(openfiles[data_jigsaw_puzzle]).click();
$(openfiles[data_jigsaw_puzzle]).change(function(){
var reader_index = 0;
var len = this.files.length;
while(reader_index < len){
var reader=new FileReader();
reader.readAsDataURL(this.files[reader_index]);
reader.onload=function(){
answers.push(this.result);
}
reader_index++;
}
})
}
read_files();
Read More:
- [Solved] Binding onclick event in JS: for loop: error uncaught typeerror: cannot set properties of undefined (setting ‘classname’)
- [Solved] JS Error: Uncaught TypeError: Cannot set properties of null (setting ‘innerHTML‘)
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to crrent location: “/home“
- JavaScript Common Errors List (Reasons & Solutions)
- Method to solve uncaught typeerror: cannot set property ‘onclick’ of null error
- Vue elementui: solution for error: avoided redundant navigation to current location: “/xxx”
- H5 page left and right stretch content area
- [Solved] Vue console error: navigationduplicated: avoided redundant navigation to current location
- [Solved] Uncaught (in promise) Error: Avoided redundant navigation to current location:
- How to Solve Vue route jump repeated clicks Error
- Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- [Solved] Vue Error: Avoided redundant navigation to current location:/xxxx
- [Solved] Vue route jumps to the same page many times error: Navigationduplicated
- Document.querySelector(‘video‘).playbackRate [How to Solve]
- JS bug Log Uncaught TypeError: Cannot read property ‘previoustSibling‘ of null
- [Solved] electron Use remote Error: Cannot read properties of undefined (reading ‘BrowserWindow‘)
- How to Solve electron import page Error
- Solve the problem of repeatedly clicking the same route console in Vue to report an error
- JavaScript determines whether parentheses are paired.