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

Squirrel installer crashes on Windows 10 ARM64 (Cecil update required) #1616

Closed
dennisameling opened this issue May 6, 2020 · 3 comments · Fixed by #1617 or #1623
Closed

Squirrel installer crashes on Windows 10 ARM64 (Cecil update required) #1616

dennisameling opened this issue May 6, 2020 · 3 comments · Fixed by #1617 or #1623
Assignees
Labels
infrastructure Pull requests related dependencies, tooling or testing that the project needs

Comments

@dennisameling
Copy link
Contributor

Squirrel version(s)
1.9.0 (source)

Description
When running a Squirrel-based installer on Windows 10 ARM64, installation fails:

image

The logs are:

Click here
2020-05-06 11:01:58> Program: Starting Squirrel Updater: --install .
2020-05-06 11:01:58> Program: Starting install, writing to C:\Users\denni\AppData\Local\SquirrelTemp
2020-05-06 11:01:58> Program: About to install to: C:\Users\denni\AppData\Local\electron-webpack-quick-start
2020-05-06 11:01:58> Program: Install path C:\Users\denni\AppData\Local\electron-webpack-quick-start already exists, burning it to the ground
2020-05-06 11:01:59> CheckForUpdateImpl: Couldn't write out staging user ID, this user probably shouldn't get beta anything: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\denni\AppData\Local\electron-webpack-quick-start\packages\.betaId niet vinden.
   bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bij 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)
   bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   bij System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   bij System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   bij System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   bij System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
   bij Squirrel.UpdateManager.CheckForUpdateImpl.getOrCreateStagedUserId()
2020-05-06 11:01:59> CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Kan een gedeelte van het pad C:\Users\denni\AppData\Local\electron-webpack-quick-start\packages\RELEASES niet vinden.
   bij System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bij 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)
   bij System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   bij Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
   bij Squirrel.UpdateManager.CheckForUpdateImpl.d__2.MoveNext()
2020-05-06 11:01:59> CheckForUpdateImpl: Reading RELEASES file from C:\Users\denni\AppData\Local\SquirrelTemp
2020-05-06 11:01:59> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
2020-05-06 11:02:00> ApplyReleasesImpl: Writing files to app directory: C:\Users\denni\AppData\Local\electron-webpack-quick-start\app-0.0.0
2020-05-06 11:02:03> LogHost: Rigging execution stub for electron-webpack-quick-start_ExecutionStub.exe to C:\Users\denni\AppData\Local\electron-webpack-quick-start\electron-webpack-quick-start.exe
2020-05-06 11:02:05> IEnableLogger: Failed to invoke post-install: System.NotSupportedException: De opgegeven methode wordt niet ondersteund.
   bij Mono.Cecil.PE.ImageReader.ReadArchitecture()
   bij Mono.Cecil.PE.ImageReader.ReadImage()
   bij Mono.Cecil.PE.ImageReader.ReadImageFrom(Stream stream)
   bij Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters)
   bij Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAssemblySquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass1_0.b__0()
   bij Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
   bij Squirrel.SquirrelAwareExecutableDetector.GetPESquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass0_0.b__2(String x)
   bij System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAllSquirrelAwareApps(String directory, Int32 minimumVersion)
   bij Squirrel.UpdateManager.ApplyReleasesImpl.d__10.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Squirrel.Utility.d__42.MoveNext()
2020-05-06 11:02:05> Unhandled exception: System.AggregateException: Er zijn één of meer fouten opgetreden. ---> System.NotSupportedException: De opgegeven methode wordt niet ondersteund.
   bij Mono.Cecil.PE.ImageReader.ReadArchitecture()
   bij Mono.Cecil.PE.ImageReader.ReadImage()
   bij Mono.Cecil.PE.ImageReader.ReadImageFrom(Stream stream)
   bij Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters)
   bij Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAssemblySquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass1_0.b__0()
   bij Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
   bij Squirrel.SquirrelAwareExecutableDetector.GetPESquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass0_0.b__2(String x)
   bij System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAllSquirrelAwareApps(String directory, Int32 minimumVersion)
   bij Squirrel.UpdateManager.ApplyReleasesImpl.d__10.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Squirrel.Utility.d__42.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   bij Squirrel.UpdateManager.ApplyReleasesImpl.d__2.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Squirrel.UpdateManager.d__10.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   bij Squirrel.Update.Program.d__4.MoveNext()
   --- Einde van intern uitzonderingsstackpad ---
   bij System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   bij System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   bij System.Threading.Tasks.Task.Wait()
   bij Squirrel.Update.Program.executeCommandLine(String[] args)
   bij Squirrel.Update.Program.main(String[] args)
---> (Interne uitzondering #0) System.NotSupportedException: De opgegeven methode wordt niet ondersteund.
   bij Mono.Cecil.PE.ImageReader.ReadArchitecture()
   bij Mono.Cecil.PE.ImageReader.ReadImage()
   bij Mono.Cecil.PE.ImageReader.ReadImageFrom(Stream stream)
   bij Mono.Cecil.ModuleDefinition.ReadModule(Stream stream, ReaderParameters parameters)
   bij Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAssemblySquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass1_0.b__0()
   bij Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
   bij Squirrel.SquirrelAwareExecutableDetector.GetPESquirrelAwareVersion(String executable)
   bij Squirrel.SquirrelAwareExecutableDetector.<>c__DisplayClass0_0.b__2(String x)
   bij System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   bij System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bij System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bij Squirrel.SquirrelAwareExecutableDetector.GetAllSquirrelAwareApps(String directory, Int32 minimumVersion)
   bij Squirrel.UpdateManager.ApplyReleasesImpl.d__10.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Squirrel.Utility.d__42.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   bij Squirrel.UpdateManager.ApplyReleasesImpl.d__2.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij Squirrel.UpdateManager.d__10.MoveNext()
--- Einde van stacktracering vanaf vorige locatie waar uitzondering is opgetreden ---
   bij System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bij System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   bij Squirrel.Update.Program.d__4.MoveNext()<---

Pay attention especially to Mono.Cecil.PE.ImageReader.ReadArchitecture(), the error is related to Mono Cecil. This error was fixed in jbevain/cecil#338, back in 2017. Squirrel is using an outdated version of Mono Cecil and would need to update the Cecil version.

Steps to recreate

  1. git clone https://github.com/dennisameling/electron-webpack-quick-start.git
  2. git checkout squirrel-arm64
  3. Open the Windows Command Prompt (cmd)
  4. Run set npm_config_arch=arm64
  5. Run yarn - dependencies (like Electron) will download their arm64 versions because of npm_config_arch.
  6. Run yarn dist.
  7. Open .\dist\squirrel-windows-arm64\electron-webpack-quick-start Setup 0.0.0.exe on a Windows ARM64 device (e.g. Surface Pro X). You get this error:

Expected behavior
Installation on Windows ARM64 completes without errors.

Actual behavior
Installation on Windows ARM64 causes errors.

Additional information
Mono Cecil dependency version needs to be updated.

@dennisameling
Copy link
Contributor Author

Just tested by updating Cecil to 0.11.2 and building Squirrel.Windows locally, then creating an ARM64 installer. Installation now finishes without errors, I took GitHub Desktop ARM64 for my testing 🎉

image

@robmen robmen self-assigned this May 14, 2020
@robmen robmen added the infrastructure Pull requests related dependencies, tooling or testing that the project needs label May 14, 2020
@robmen
Copy link
Contributor

robmen commented May 14, 2020

Let me take a look at this over the weekend/into next week. If all goes well, I'll finally have some breathing room.

@anaisbetts
Copy link
Contributor

@JayBeavers @robmen Lemme see what I can do to clean this all up, I also want to get #1578 merged because it's really trolling anyone who uses the C# API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Pull requests related dependencies, tooling or testing that the project needs
Projects
None yet
3 participants