Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after autoupdate downloads nuget package #1101

Closed
TimvdEijnden opened this issue Jan 10, 2017 · 13 comments · May be fixed by qcif/data-curator#563
Closed

Crash after autoupdate downloads nuget package #1101

TimvdEijnden opened this issue Jan 10, 2017 · 13 comments · May be fixed by qcif/data-curator#563

Comments

@TimvdEijnden
Copy link
Contributor

  • Version: 11.2.1
  • Target: Squirrel.Windows.

  • Affected OS: Windows 7 (8 & 10 work correctly)

We're having the issue that when our app fetches the auto update package it's extracted and executed and then it crashes. Now there is an issue in Squirrel.Windows Squirrel/Squirrel.Windows#892 where @develar is tagged by @kjellski

I was searching through the code of electron-builder to find something like the code mentioned on this comment: Squirrel/Squirrel.Windows#905 (comment)
But couldn't find it, is there a way we could fix this ourselves?

@develar
Copy link
Member

develar commented Jan 10, 2017

@TimvdEijnden Just to be sure — please specify version of your app.

@TimvdEijnden
Copy link
Contributor Author

1.3.0-stablenl ( we use the channel for multi language and environments)

@develar
Copy link
Member

develar commented Jan 10, 2017

@TimvdEijnden Please attach your-app.nupkg packages (want to inspect .nuspec files).

@TimvdEijnden
Copy link
Contributor Author

File is too big to attach. This link has the path to the file in it.: https://desktop-updates.gynzy.com/update/stablenl/win32/RELEASES

@develar really appreciate your efforts 🙌

@TimvdEijnden
Copy link
Contributor Author

This is the contents of the .nuspec file:

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
  <metadata>
    <id>gynzy_desktop_nl</id>
    <version>1.3.2-demonl</version>
    <title>Gynzy Desktop NL</title>
    <authors>Gynzy</authors>
    <owners>Gynzy</owners>
    <iconUrl>https://cdn-dev01.gynzy.net/icon/desktop/icon.ico</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Gynzy Desktop Deno, for more info visit https://www.gynzy.com</description>
    <copyright>Copyright © 2017 Gynzy</copyright>
    <projectUrl>https://www.gynzy.com</projectUrl>
  </metadata>
</package>

I've compared it with the older versions ( Squirrel.Windows 1.4.x) and the structure seems the same, same version number format.

@develar
Copy link
Member

develar commented Jan 11, 2017

Yeah.... are you sure that you cannot migrate to reliable, maintainable and robust NSIS solution?

@develar
Copy link
Member

develar commented Jan 11, 2017

Windows 7 (8 & 10 work correctly)

If you say that it works correctly on 8 and 10, but doesn't work on Windows 7, it is Squirrel.Windows issue. Right?

@develar
Copy link
Member

develar commented Jan 11, 2017

@TimvdEijnden Is it possible to provide crash log? Squirrel.Windows create log file — please attach it.

@TimvdEijnden
Copy link
Contributor Author

I've attached windows crashlog to this issue: Squirrel/Squirrel.Windows#923

Here's the contents of SquirrelSetup:

2017-01-10 13:57:05> Program: Starting Squirrel Updater: --createShortcut=Gynzy Desktop NL.exe
2017-01-10 13:57:05> ApplyReleasesImpl: About to create shortcuts for Gynzy Desktop NL.exe, rootAppDir C:\Users\IEUser\AppData\Local\gynzy_desktop_nl
2017-01-10 13:57:05> ApplyReleasesImpl: Creating shortcut for Gynzy Desktop NL.exe => C:\Users\IEUser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Gynzy\Gynzy Desktop NL.lnk
2017-01-10 13:57:05> ApplyReleasesImpl: About to save shortcut: C:\Users\IEUser\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Gynzy\Gynzy Desktop NL.lnk (target C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\Update.exe, workingDir C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.2.0-demonl, args --processStart "Gynzy Desktop NL.exe")
2017-01-10 13:57:05> ApplyReleasesImpl: Creating shortcut for Gynzy Desktop NL.exe => \\Mac\Home\Desktop\Gynzy Desktop NL.lnk
2017-01-10 13:57:05> ApplyReleasesImpl: About to save shortcut: \\Mac\Home\Desktop\Gynzy Desktop NL.lnk (target C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\Update.exe, workingDir C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.2.0-demonl, args --processStart "Gynzy Desktop NL.exe")
2017-01-10 13:57:05> ApplyReleasesImpl: Examining Pin: Internet Explorer.lnk
2017-01-10 13:57:05> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-01-10 13:57:05> ApplyReleasesImpl: Examining Pin: Windows Media Player.lnk
2017-01-10 13:59:23> Program: Starting Squirrel Updater: --download https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:23> Program: Fetching update information, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:23> CheckForUpdateImpl: Generated new staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 13:59:23> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:23> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.2.0-demonl&arch=x86
2017-01-10 13:59:25> FileDownloader: Downloading file: https://desktop-updates.gynzy.com/update/demonl/win32/gynzy_desktop_nl-1.3.1-demonl-full.nupkg
2017-01-10 13:59:35> UpdateInfo: Couldn't get release notes for:gynzy_desktop_nl-1.3.1-demonl-full.nupkg: System.Exception: Invalid 'ReleaseNotes' value in nuspec file at 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\packages\gynzy_desktop_nl-1.3.1-demonl-full.nupkg'
   at Squirrel.ReleaseEntry.GetReleaseNotes(String packageDirectory)
   at Squirrel.UpdateInfo.<FetchReleaseNotes>b__19_0(ReleaseEntry x)
2017-01-10 13:59:35> Program: Starting Squirrel Updater: --update https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:35> Program: Starting update, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:35> Program: About to update to: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl
2017-01-10 13:59:35> CheckForUpdateImpl: Using existing staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 13:59:35> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 13:59:35> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.2.0-demonl&arch=x86
2017-01-10 13:59:37> FileDownloader: Downloading file: https://desktop-updates.gynzy.com/update/demonl/win32/gynzy_desktop_nl-1.3.1-demonl-full.nupkg
2017-01-10 13:59:48> ApplyReleasesImpl: Writing files to app directory: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl
2017-01-10 13:59:49> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe,C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL_ExecutionStub.exe]
2017-01-10 14:00:07> ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL_ExecutionStub.exe: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Squirrel.Utility.<>c__DisplayClass11_0.<InvokeProcessAsync>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClass10_0.<<invokePostInstall>b__0>d.MoveNext()
2017-01-10 14:00:07> ApplyReleasesImpl: Starting fixPinnedExecutables
2017-01-10 14:00:07> ApplyReleasesImpl: Examining Pin: Internet Explorer.lnk
2017-01-10 14:00:07> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-01-10 14:00:07> ApplyReleasesImpl: Examining Pin: Windows Media Player.lnk
2017-01-10 14:00:07> ApplyReleasesImpl: Fixing up tray icons
2017-01-10 14:00:07> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-01-10 14:00:07> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-01-10 14:00:07> ApplyReleasesImpl: cleanDeadVersions: for version 1.3.1-demonl
2017-01-10 14:00:07> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-1.2.0-demonl
2017-01-10 14:00:07> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-1.3.1-demonl
2017-01-10 14:00:51> Program: Starting Squirrel Updater: --processStart Gynzy Desktop NL.exe
2017-01-10 14:00:51> Program: Want to launch 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe'
2017-01-10 14:00:51> Program: About to launch: 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe': 
2017-01-10 14:01:23> Program: Starting Squirrel Updater: --download https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:01:23> Program: Fetching update information, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:01:23> CheckForUpdateImpl: Using existing staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 14:01:23> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:01:23> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.3.1-demonl&arch=x86
2017-01-10 14:10:51> Program: Starting Squirrel Updater: --processStart Gynzy Desktop NL.exe
2017-01-10 14:10:51> Program: Want to launch 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe'
2017-01-10 14:10:51> Program: About to launch: 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe': 
2017-01-10 14:11:23> Program: Starting Squirrel Updater: --download https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:11:23> Program: Fetching update information, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:11:23> CheckForUpdateImpl: Using existing staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 14:11:23> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:11:23> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.3.1-demonl&arch=x86
2017-01-10 14:25:29> Program: Starting Squirrel Updater: --processStart Gynzy Desktop NL.exe
2017-01-10 14:25:29> Program: Want to launch 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe'
2017-01-10 14:25:29> Program: About to launch: 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.1-demonl\Gynzy Desktop NL.exe': 
2017-01-10 14:26:01> Program: Starting Squirrel Updater: --download https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:01> Program: Fetching update information, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:01> CheckForUpdateImpl: Using existing staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 14:26:01> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:01> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.3.1-demonl&arch=x86
2017-01-10 14:26:03> FileDownloader: Downloading file: https://desktop-updates.gynzy.com/update/demonl/win32/gynzy_desktop_nl-1.3.2-demonl-full.nupkg
2017-01-10 14:26:18> UpdateInfo: Couldn't get release notes for:gynzy_desktop_nl-1.3.2-demonl-full.nupkg: System.Exception: Invalid 'ReleaseNotes' value in nuspec file at 'C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\packages\gynzy_desktop_nl-1.3.2-demonl-full.nupkg'
   at Squirrel.ReleaseEntry.GetReleaseNotes(String packageDirectory)
   at Squirrel.UpdateInfo.<FetchReleaseNotes>b__19_0(ReleaseEntry x)
2017-01-10 14:26:18> Program: Starting Squirrel Updater: --update https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:18> Program: Starting update, downloading from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:18> Program: About to update to: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl
2017-01-10 14:26:18> CheckForUpdateImpl: Using existing staging user ID: 1811422a-ce4d-5e11-b6a9-cff58eddceb3
2017-01-10 14:26:18> CheckForUpdateImpl: Downloading RELEASES file from https://desktop-updates.gynzy.com/update/demonl/win32
2017-01-10 14:26:18> FileDownloader: Downloading url: https://desktop-updates.gynzy.com/update/demonl/win32/RELEASES?id=gynzy_desktop_nl&localVersion=1.3.1-demonl&arch=x86
2017-01-10 14:26:20> FileDownloader: Downloading file: https://desktop-updates.gynzy.com/update/demonl/win32/gynzy_desktop_nl-1.3.2-demonl-full.nupkg
2017-01-10 14:26:29> ApplyReleasesImpl: Writing files to app directory: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.2-demonl
2017-01-10 14:26:31> ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.2-demonl\Gynzy Desktop NL.exe,C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.2-demonl\Gynzy Desktop NL_ExecutionStub.exe]
2017-01-10 14:26:49> ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\IEUser\AppData\Local\gynzy_desktop_nl\app-1.3.2-demonl\Gynzy Desktop NL_ExecutionStub.exe: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Squirrel.Utility.<>c__DisplayClass11_0.<InvokeProcessAsync>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClass10_0.<<invokePostInstall>b__0>d.MoveNext()
2017-01-10 14:26:49> ApplyReleasesImpl: Starting fixPinnedExecutables
2017-01-10 14:26:49> ApplyReleasesImpl: Examining Pin: Internet Explorer.lnk
2017-01-10 14:26:49> ApplyReleasesImpl: Examining Pin: Windows Explorer.lnk
2017-01-10 14:26:49> ApplyReleasesImpl: Examining Pin: Windows Media Player.lnk
2017-01-10 14:26:49> ApplyReleasesImpl: Fixing up tray icons
2017-01-10 14:26:49> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-01-10 14:26:49> ApplyReleasesImpl: Couldn't rewrite shim RegKey, most likely no apps are shimmed: System.NullReferenceException: Object reference not set to an instance of an object.
   at Squirrel.UpdateManager.ApplyReleasesImpl.<unshimOurselves>b__13_0(RegistryView view)
2017-01-10 14:26:49> ApplyReleasesImpl: cleanDeadVersions: for version 1.3.2-demonl
2017-01-10 14:26:49> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-1.3.1-demonl
2017-01-10 14:26:49> ApplyReleasesImpl: cleanDeadVersions: exclude folder app-1.3.2-demonl

@develar
Copy link
Member

develar commented Jan 14, 2017

For NSIS we use versionInWeirdWindowsForm

get versionInWeirdWindowsForm(): string {
    const parsedVersion = new SemVer(this.version)
    return `${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}.${this.buildNumber || "0"}`
  }

because of invalid VIProductVersion format, should be X.X.X.X

So, --set-product-version for rcedit should use the same logic. It should make Squirrel.Windows happy. I hope this solution will be a fix.

develar added a commit to develar/electron-builder that referenced this issue Jan 14, 2017
@TimvdEijnden
Copy link
Contributor Author

TimvdEijnden commented Jan 14, 2017

That would be great, we'll be happy to test this on monday, thanks for looking into it! 👍

@develar
Copy link
Member

develar commented Jan 14, 2017

@TimvdEijnden Please try 11.3.1

@TimvdEijnden
Copy link
Contributor Author

We'll try that version tomorrow if it's out! Good job @develar 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants