TinyNvidiaUpdateChecker icon indicating copy to clipboard operation
TinyNvidiaUpdateChecker copied to clipboard

Unhandled exception. System.IO.FileNotFoundException: Could not find file

Open jiut opened this issue 1 year ago • 10 comments

.\TinyNvidiaUpdateChecker.exe
TinyNvidiaUpdateChecker v1.17.1

Verifying internet connection . . . OK!

Searching for Updates . . . OK!

Retrieving GPU information . . . OK!
There is a new GPU driver available to download!
Downloading the driver . . . [#####-----]  55% \Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Users\jiut\AppData\Local\Temp\546.33\546.33-notebook-win10-win11-64bit-international-dch-whql.exe.part'.
File name: 'C:\Users\jiut\AppData\Local\Temp\546.33\546.33-notebook-win10-win11-64bit-international-dch-whql.exe.part'
   at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at TinyNvidiaUpdateChecker.MainConsole.<>c__DisplayClass34_0.<HandleDownload>b__1(Object sender, AsyncCompletedEventArgs e) in C:\Users\Samuel\Documents\GitHub\TinyNvidiaUpdateChecker\TinyNvidiaUpdateChecker\MainConsole.cs:line 883
   at System.Net.WebClient.OnDownloadFileCompleted(AsyncCompletedEventArgs e)
   at System.Net.WebClient.<StartAsyncOperation>b__78_4(Object arg)
   at System.Threading.SynchronizationContext.<>c.<Post>b__8_0(ValueTuple`2 s)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext`1.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
-

jiut avatar Dec 17 '23 12:12 jiut

Hi. This is a weird error it looks like the partial download gets deleted half way through... What anti virus program are you using, as perhaps it is or some other program interfering?

ElPumpo avatar Dec 17 '23 13:12 ElPumpo

At the time I tested it, it succeeded once, only once. Causing me to not be able to test it anymore. All the errors are the same.

jiut avatar Dec 18 '23 10:12 jiut

So what anti virus did you have? For curiosity

ElPumpo avatar Jan 18 '24 20:01 ElPumpo

So what anti virus did you have? For curiosity

https://www.huorong.cn/ A Chinese anti virus

jiut avatar Jan 19 '24 10:01 jiut

Okay thanks for the info. I am going to close this issue as the file should not be deleted whilst downloading. And the behavior is correct.. something outside of TNUC must have caused this I am concerned about your AV

ElPumpo avatar Jan 19 '24 20:01 ElPumpo

I have tested for many times. It worked less than 5 times, both with and without AV. It's completely unpredictable.

jiut avatar Feb 08 '24 15:02 jiut

When attempting to intercept a file deletion operation, I discovered that it was initiated by the TNVC itself. Below is a screen recording of the intercepted deletion action.

https://github.com/ElPumpo/TinyNvidiaUpdateChecker/assets/52725935/728d295a-98b3-48ff-8c07-26337f65fee4

When allowing this operation, the above error occurs. Further investigation revealed that this may be caused by an unstable network connection. When the download connection is interrupted, the program will attempt to delete the file.

jiut avatar Mar 02 '24 07:03 jiut

This is super confusing so seperate what you're trying to say.

  1. You use some sort of tool to stop TNUC from working. Of course it will fail, what did you expect?? I am super confused to your video what you hoped to achieve
  2. Yes in fact unstable network connections are not accounted for which belogs in a seperate bug report

ElPumpo avatar Mar 02 '24 18:03 ElPumpo

To verify whether downloaded files were deleted by antivirus software, I monitored all deletion operations occurring in the download folder.

The diagram below illustrates that any deletion operation initiated by any program on files within that folder triggers a warning. 1709435029526

Upon launching the program and downloading files to the designated download folder, I discovered that each deletion operation on downloaded files was carried out by TNUC itself, rather than the antivirus software. If this operation is allowed, the previous error message will be displayed.

Subsequently, I speculated that the issue might be related to the network environment. The occurrence of this error seems too random, and my network stability is not optimal. During the file download process, I manually closed the download connection in the network proxy software, and the same situation occurred. Therefore, I believe that this error is caused by unstable network connections.

https://github.com/ElPumpo/TinyNvidiaUpdateChecker/assets/52725935/31df06aa-8c17-48d7-b5fc-5a579c31f09b

jiut avatar Mar 03 '24 03:03 jiut

Okay I understand. Will have to investigate but don't count on it being some priority

ElPumpo avatar Mar 03 '24 15:03 ElPumpo

OK, only someone using a poor VPN may encounter this error.

jiut avatar Mar 04 '24 03:03 jiut

Hi again. I realized I misunderstood your bug report. I tested this and you are correct. If you cut internet connection it causes a crash. I will fix this

image

ElPumpo avatar May 04 '24 07:05 ElPumpo

Actually, TNUC has really bad exception handling and could use an overhaul which won't come.

ElPumpo avatar May 04 '24 07:05 ElPumpo