fadilfadz01 / Universal_Updater

Console based unofficial updater for Windows Phone.
MIT License
50 stars 12 forks source link

IndexOutOfRangeException: Index was outside the bounds of the array. #3

Closed NokiaX3979 closed 10 months ago

NokiaX3979 commented 1 year ago

Version 2.5.1.0. When analyzing the logs,

Unhandled Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Universal_Updater.GetDeviceInfo.ReadInfo()
   at Universal_Updater.Program.StartUpdater() in /home/just-a-pony/workdirectory/Universal_Updater/Universal Updater/Program.cs:line 44
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

DeviceLog.zip DeviceInfo.txt

NokiaX3979 commented 1 year ago

UsoTroubleshooting.reg.txt

mikelsv commented 1 year ago

I have it too.

Exception in DownloadPackages.cs . Line 121. var fileSize = Convert.ToInt64(logOutput.Where(j => j.Contains("Length:", StringComparison.OrdinalIgnoreCase)).ToArray()[0].Split(' ')[1]);

Log is not have "Length:" call exception. It's random internet connection error. Solution: test it and load again.

Bad log: [0] = "Spider mode enabled. Check if remote file exists.\r" [1] = "--2023-01-20 17:13:32-- https://www.dropbox.com/s/scsm0hdyw14kfxx/Microsoft.MainOS.Production_LANG_de-de.cab\r" [2] = "Resolving www.dropbox.com (www.dropbox.com)... 162.125.70.18\r" [3] = "Connecting to www.dropbox.com (www.dropbox.com)|162.125.70.18|:443... connected.\r" [4] = "HTTP request sent, awaiting response... 405 Method Not Allowed\r" [5] = "Remote file does not exist -- broken link!!!\r" [6] = "\r"

mikelsv commented 1 year ago

Fixed DownloadUpdate() function in DownloadPackages.cs - https://pastebin.com/mxcKJ4tu .

My new console log:

DOWNLOADING PACKAGES
[1/149] Microsoft.MICROSOFTPHONEFM.PlatformManifest.UpdateOS.cab
>>> [Error] Download Fail. Wait 10s and do again.
>>> [Error] Download Fail. Wait 10s and do again.
Microsoft.MICROSOFTPHONEFM.P 100%[=============================================>]  24,09K  --.-KB/s    in 0,004s
[2/149] Microsoft.MobileCore.UpdateOS.cab
Microsoft.MobileCore.UpdateO 100%[=============================================>]  29,13M  7,74MB/s    in 3,8s
[3/149] Microsoft.RELEASE_PRODUCTION.UpdateOS.cab
Microsoft.RELEASE_PRODUCTION 100%[=============================================>] 848,88K  --.-KB/s    in 0,1s
[4/149] Microsoft.UpdateOS.Production.cab
Microsoft.UpdateOS.Productio 100%[=============================================>] 372,03K  --.-KB/s    in 0,1s
[5/149] Microsoft.EFIESP.Production.cab
>>> [Error] Download Fail. Wait 10s and do again.
>>> [Error] Download Fail. Wait 10s and do again.
Microsoft.EFIESP.Production. 100%[=============================================>] 757,01K  2,03MB/s    in 0,4s