postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.87k stars 841 forks source link

Exception Thrown in Squirrel Updater: FileNotFoundException #6983

Closed eplewis89 closed 4 years ago

eplewis89 commented 5 years ago

Bug Description Whenever Postman updates, I can no longer run Postman. This seems to be due to a bug in the updater. The log specifies the the "RELEASES" file is missing when opening Postman. Here's the log:

2019-07-23 10:41:35> Unhandled exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\user\AppData\Local\Postman\packages\RELEASES'.
File name: 'C:\Users\user\AppData\Local\Postman\packages\RELEASES'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at System.IO.File.ReadAllText(String path, Encoding encoding)
   at Squirrel.Update.Program.ProcessStart(String exeName, String arguments, Boolean shouldWait)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
2019-07-23 10:42:04> Program: Starting Squirrel Updater: 
2019-07-23 10:45:22> Program: Starting Squirrel Updater: 
2019-07-23 10:46:43> Program: Starting Squirrel Updater: 
2019-07-23 10:48:11> Program: Starting Squirrel Updater: --checkForUpdate https://dl.pstmn.io/update/WIN64/7.2.1/stable?installationId=id&userId=userid&syncEnabled=true&teamPlan=
2019-07-23 10:48:11> Program: Fetching update information, downloading from https://dl.pstmn.io/update/WIN64/7.2.1/stable?installationId=id&userId=userid&syncEnabled=true&teamPlan=
2019-07-23 10:48:11> CheckForUpdateImpl: Generated new staging user ID: id
2019-07-23 10:48:11> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.Exception: Invalid release entry: 79E6FA9C290AF02D0656F272B1C91B1F96B32946 https://dl.pstmn.io/download/7.3.4/Postman-win64-7.3.4-delta.nupkg 61323809\nE747245FC86598B1D79D20CACE24AA598C607AA7 https://dl.pstmn.io/download/7.3.4/Postman-win64-7.3.4-full.nupkg 76878702
   at Squirrel.ReleaseEntry.ParseReleaseEntry(String entry)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Squirrel.ReleaseEntry.ParseReleaseFile(String fileContents)
   at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
   at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__2.MoveNext()
2019-07-23 10:48:11> CheckForUpdateImpl: Downloading RELEASES file from https://dl.pstmn.io/update/WIN64/7.2.1/stable?installationId=id&userId=userid&syncEnabled=true&teamPlan=
2019-07-23 10:48:11> FileDownloader: Downloading url: https://dl.pstmn.io/update/WIN64/7.2.1/stable/RELEASES?installationId=id&userId=userid&syncEnabled=true&teamPlan=
2019-07-23 10:48:11> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2019-07-23 10:48:11> UpdateInfo: Couldn't get release notes for:Postman-win64-7.3.4-full.nupkg: System.IO.FileNotFoundException: Could not find file 'C:\Users\user\AppData\Local\Postman\packages\Postman-win64-7.3.4-full.nupkg'.
File name: 'C:\Users\user\AppData\Local\Postman\packages\Postman-win64-7.3.4-full.nupkg'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at NuGet.ZipPackage.<>c__DisplayClass9_0.<.ctor>b__0()
   at NuGet.ZipPackage.EnsureManifest()
   at NuGet.ZipPackage..ctor(String filePath, Boolean enableCaching)
   at Squirrel.ReleaseEntry.GetReleaseNotes(String packageDirectory)
   at Squirrel.UpdateInfo.<FetchReleaseNotes>b__19_0(ReleaseEntry x)
2019-07-23 10:48:11> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.Update.Program.<CheckForUpdate>d__8.MoveNext()<---

Expected behavior I expect the app to update properly and start.

App information (please complete the following information):

eplewis89 commented 5 years ago

Please let me know how I can help when you get around to this. Thanks!!

DannyDainton commented 4 years ago

Hey @eplewis89

I know it's been a while, apologies for that 🙏 - Just trying to find out if this is still an issue that you're facing with the latest app version?

DannyDainton commented 4 years ago

I'm going to close this one out but we can reopen if you're still seeing the issue.