As written in Kaju on 2023R1 - #18 by Paul_Chance, I suddenly have a problem with a Kaju installation that used to work before, without knowing exactly when the issue arose. This is Windows exclusive, macOS is working, and I don’t think Kaju is to blame:
After downloading an update file, its verification will fail because the app cannot open the zip file in a temp folder for read access. File exists, is readable, but a BinaryStream as well as FolderItem.ReadFileMBS will fail, BS raising an IOException 32 which indicates that another process is having a grip on the file.
I tried to decouple the FileReceived URLConnection event from hashing, check its availability and some other stuff, but to no avail: Always the same error.
Any ideas how to find the process that might be accessing the file? Or how to mitigate this issue otherwise?
We have always had intermittent access issues on MS-Windows when our app tries to unzip files it has downloaded. We made the process much more reliable by first trying to unzip the file a few times (with a short delay between each try) and if that fails, copy the file and then unzip that.
Thank you both! Uh, this would be much easier to handle if isReadable would be set to false …
Is it especially the temp folder that is subject to an antivirus interception or will Windows strike in App Support folder too?
And did I get you right that while read access might fail, copying will work? I didn’t try because I was almost certain it would fail too.
EDIT: For the latest, I can’t. Or I try too early. A CopyTo method call will result in an error 104 – file is currently in use. Think I’ll explore process explorer, thanks for the hint!
I think I finally could fix it. It was NOT an antivirus system (I could retry for minutes and still not copy the file), but for reasons unknown this issue happened when the app’s main window was opened after Kaju’s window had shown. I have a file watcher installed there, but none that would watch a temp folder. So reasons completely unknown but currently it looks like a main window opening protection has fixed the problem.