Closed Riiskyy closed 1 week ago
Just to make sure it wasn't something funky with PowerShell I tried just using .NET functions with the same result
t1@RhodesIsland ~ $uri = [uri]'https://www.iinact.com/updater/download'
t1@RhodesIsland ~
t1@RhodesIsland ~ $stopwatch = [System.Diagnostics.Stopwatch]::new()
t1@RhodesIsland ~
t1@RhodesIsland ~ $request = [System.Net.HttpWebRequest]::Create($uri)
t1@RhodesIsland ~
t1@RhodesIsland ~ $stopwatch.Restart()
t1@RhodesIsland ~
t1@RhodesIsland ~ $responseStream = $request.GetResponse().GetResponseStream()
t1@RhodesIsland ~ $FilePath = "$env:USERPROFILE\Desktop\FFXIV_ACT_Plugin_2.7.1.8.zip"
t1@RhodesIsland ~
t1@RhodesIsland ~ $targetStream = [System.IO.FileStream]::new($FilePath, 'Create')
t1@RhodesIsland ~
t1@RhodesIsland ~ $buffer = [System.Byte[]]::new(10Kb)
t1@RhodesIsland ~
t1@RhodesIsland ~ do {
> $count = $responseStream.Read($buffer, 0, $buffer.Length)
> $targetStream.Write($buffer, 0, $count)
>
> } while ($count -gt 0)
t1@RhodesIsland ~
t1@RhodesIsland ~ $stopwatch.Stop()
t1@RhodesIsland ~
t1@RhodesIsland ~ $targetStream.Dispose()
t1@RhodesIsland ~ $responseStream.Dispose()
t1@RhodesIsland ~
t1@RhodesIsland ~ return $stopwatch.Elapsed
Days : 0
Hours : 0
Minutes : 0
Seconds : 38
Milliseconds : 756
Ticks : 387563667
TotalDays : 0.000448569059027778
TotalHours : 0.0107656574166667
TotalMinutes : 0.645939445
TotalSeconds : 38.7563667
TotalMilliseconds : 38756.3667
After noticing this ffecting other apps I've done some more investigation and found the issue to be with my DNS over HTTPS resolver. I have switched DNS providers and I am now seeing the same code finish in 2 seconds
Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 837
Ticks : 28377051
TotalDays : 3.28438090277778E-05
TotalHours : 0.000788251416666667
TotalMinutes : 0.047295085
TotalSeconds : 2.8377051
TotalMilliseconds : 2837.7051
I'm still getting these errors when IINACT updates. On https://github.com/marzent/IINACT/issues/106 you said that this was an issue downloading the files. However after looking over FetchDependencies.cs I found the URL that the plugin attempts to connect to in order to download the FFXIV_ACT_PLUGIN and I can connect to the URL from my browser just fine and download the files and they download in less than a second.
I don't really know C# to troubleshoot well enough but I do know PowerShell which also leverages .NET and so I ran a test:
When downloading via .NET framework the download is taking 37 seconds which, from looking at the FetchDependencies.cs file, times out after 37 seconds. I'm not sure how I can go about testing what is causing the delay.