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] Uncaught (in promise) DOMException: Failed to load because no supported source was found.
- [Web Browser] “Uncaught TypeError: object is not a function“
- [Solved] Failed to execute ‘getRangeAt‘ on ‘Selection‘: 0 is not a valid index.“
- Node.js Error: “Error: EBUSY: resource busy or locked, stat“
- [Solved] Module build failed TypeError this.getOptions is not a function at Object.loader
- [Solved] Uncaught ReferenceError: axios is not defined
- [Solved] Vue Error: Uncaught TypeError: Vue.createApp is not a function
- [Solved] Uncaught Error: @electron/remote is disabled for this WebContents
- [Solved] Error: EBUSY: resource busy or locked, lstat ‘D:\DumpStack.log.
- Method to solve uncaught typeerror: cannot set property ‘onclick’ of null error
- Failed to execute ‘setRequestHeader’ on ‘XMLHttpRequest’: String contains non ISO-8859-1 code point.
- Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to crrent location: “/home“
- [Solved] Vue3.2 Error: Object.fromEntries is not a function
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- [Solved] Uncaught (in promise) TypeError: XXX.a is not a constructor
- request.js?b775:101 Uncaught (in promise) Error: Failed to convert value of type ‘java.lang.String’ to required type ‘java.lang.Long’;
- [Solved] Binding onclick event in JS: for loop: error uncaught typeerror: cannot set properties of undefined (setting ‘classname’)
- Vue Error: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location
- [Solved] Uncaught (in promise) Error: Avoided redundant navigation to current location:
- How to Test whether the property value of each property in the object is not empty