1

I have a problem when updating chrome to the latest version.

I have a file with name test.csv, button will call readAsText() when click.

When i select test.csv and click button for the first time, everything is normal. After that, i edit test.csv then click button, it has an error.

Error is: "The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired."

I think when i select test.csv, system is save infor about it such as lastedited. So, when i edit test.csv then click button, system will check lastedited and return error.

My code: https://stackblitz.com/edit/read-csv-file

Can anybody help me please?

A8 PK
  • 11
  • 2
  • Can you add some sample code you are executing? Are you sure its not problem related to non-released file handler after first read? – Karol Pawlak Aug 06 '20 at 05:15
  • @KarolPawlak My code: https://stackblitz.com/edit/read-csv-file. i'm not sure about that. When i run with chrome v80.0xxx , it's no problem – A8 PK Aug 06 '20 at 07:47
  • Im afraid this happens due to modified file metadata, which causes the browser and filesystem to recognize the file as different that selected via fileselect component. So trying to read the file will fail, because this file version simply no longer exists. I dont know if this is what you are up to and I know its not very helpfull, but i suggest clearing file selection after file read to avoid pointing at expired file in case of modifying it. – Karol Pawlak Aug 06 '20 at 11:57
  • When user click button, my app will read and check data is correct ? If the data is wrong, it will alert the user to fix. Therefore, if clear file slection after file read, user will re-select file after modify data – A8 PK Aug 06 '20 at 12:19

0 Answers0