Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Why is FileReader.onerror not called in readAsArrayBuffer on NS_ERROR_FILE_ACCESS_DENIED? (Chrome does)

  • 1 reply
  • 1 has this problem
  • 3 views
  • Last reply by guigs

more options

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED

blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) {

  // this is called under Chrome, but not under Firefox
  console.log('reader.onerror'); 

} reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED

According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

When reading a file via javascript readAsArrayBuffer and file is not readable, Firefox does not call "onerror" handler and instead stops the javascript with error: NS_ERROR_FILE_ACCESS_DENIED blob = file.slice(0,1); var reader = new FileReader; reader.onerror = function(e) { // this is called under Chrome, but not under Firefox console.log('reader.onerror'); } reader.readAsArrayBuffer(blob); // this stops with NS_ERROR_FILE_ACCESS_DENIED According to FileAPI it should: https://developer.mozilla.org/en-US/docs/Web/API/FileReader

All Replies (1)

more options