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

Fatal error: Unable to commit changes at Squirrel.Update.Program.<setPEVersionInfoAndIcon>d__20.MoveNext() #1150

Closed
kjpacheco opened this issue Sep 12, 2017 · 9 comments

Comments

@kjpacheco
Copy link

Having issues with the --releasify command. Below is the error from Package Manager Console. After looking at similar issues, I tried seeing if the rcedit.exe needed to be replaced, but that didn't change anything. Please HELP!

PM> squirrel --releasify C:\codebase\GMAD_Test_Matrix-Main\TestMatrixTEST.1.0.0.nupkg
squirrel : System.AggregateException: One or more errors occurred. ---> System.Exception: Failed to modify resources, command invoked was:
'C:\codebase\GMAD_Test_Matrix-Main\GMAD_TestMatrix\packages\squirrel.windows.1.7.8\tools\rcedit.exe "C:\codebase\GMAD_Test_Matrix-Main\GMAD_TestMatrix\Releases\Setup.exe" --set-version-string "CompanyName" "KJPACHECO"
--set-version-string "LegalCopyright" "" --set-version-string "FileDescription" "" --set-version-string "ProductName" "Test Matrix for User Testing ONLY" --set-file-version 1.0.0 --set-product-version 1.0.0'
At line:1 char:1

  • squirrel --releasify C:\codebase\GMAD_Test_Matrix-Main\TestMatrixTEST ...
  •   + CategoryInfo          : NotSpecified: (System.Aggregat...-version 1.0.0':String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    
    

Output was:
Fatal error: Unable to commit changes
at Squirrel.Update.Program.d__20.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Squirrel.Update.Program.<>c__DisplayClass10_1.b__15()
at Squirrel.Utility.<>c__DisplayClass8_0.b__0()
at Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
at Squirrel.Utility.Retry(Action block, Int32 retries)
at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi,
String frameworkVersion, Boolean generateDeltas)
at Squirrel.Update.Program.executeCommandLine(String[] args)
at Squirrel.Update.Program.main(String[] args)
at Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.Exception: Failed to modify resources, command invoked was: 'C:\codebase\GMAD_Test_Matrix-Main\GMAD_TestMatrix\packages\squirrel.windows.1.7.8\tools\rce
dit.exe "C:\codebase\GMAD_Test_Matrix-Main\GMAD_TestMatrix\Releases\Setup.exe" --set-version-string "CompanyName" "KJPACHECO" --set-version-string "LegalCopyright" "" --set-version-string "FileDescription" ""
--set-version-string "ProductName" "Test Matrix for User Testing ONLY" --set-file-version 1.0.0 --set-product-version 1.0.0'

Output was:
Fatal error: Unable to commit changes
at Squirrel.Update.Program.d__20.MoveNext()<---

@fr4gles
Copy link

fr4gles commented Sep 12, 2017

  1. Is that x86, x64 or compiled as "Any"?
  2. Did you try to run squirrel as administator (try to run Powershell as administator)?
  3. What windows version are you using?
  4. It looks like it could be related to: doesn't work on fresh install of windows 10 electron/rcedit#3

@kjpacheco
Copy link
Author

kjpacheco commented Sep 12, 2017

1.) Any
2.) I was using Package Manager Console in VS 2015. I followed the directions and it worked once, then when I tried releasing the same project code (after being branched and merged to a different folder), it wouldn't work. So, I don't think running as admin or not is the issue.
3.)Windows 10
4.) That was my thought, too. I tried replacing the rcedit.exe file and it didn't have any effect.

@anaisbetts
Copy link
Contributor

Do you have 3rd party antivirus installed? If so, try uninstalling it

@kjpacheco
Copy link
Author

@paulcbetts I do have thrid party antivirus, but it wasn't an issue the first time I used squirrel. When I branched the project so I could connect/test with data from a different database, I ran into this problem. So essentially, I have two seperate applications with the same code inside. I don't understand why it would work for one and not the other.

@spaviot
Copy link

spaviot commented Sep 19, 2017

@paulcbetts I had this error or a very similar error while I was experimenting with various scenarios in order to automate the creation for release packages from Visual Studio.
Somehow it seems that if the stub "Setup.exe" (from wherever the squirrel package is located) is read-only, and when it is copied by the --releasify option to the release directory, this read-only flag is not removed after and thus the next write operation fails.

@quasarea
Copy link

quasarea commented May 2, 2019

run into similar issue when publishin on network share, had to replace rcedit.exe with current (1.1.1) from https://github.com/electron/rcedit

@Thieum
Copy link
Contributor

Thieum commented May 2, 2019

@quasarea I found publishing over network always tricky (and not only with squirrel, but also with other software that attempt to work with files over network). One way to get around this kind of issue is to robocopy the content of the relesase folder, then robocopy it back after the release has been done locally, if the size of it is reasonable. Or have a way to sync it from network to local, do the release local, then sync back from local to network.

@shiftkey
Copy link
Contributor

shiftkey commented May 7, 2019

Merging this into #888 which is about upgrading rcedit, but I'm hesitant that this will resolve it because of this earlier comment:

4.) That was my thought, too. I tried replacing the rcedit.exe file and it didn't have any effect.

@shiftkey shiftkey closed this as completed May 7, 2019
@Thieum
Copy link
Contributor

Thieum commented May 7, 2019

@shiftkey I feel like we should avoid releasify over network as much as we can. If it's not rcedit failing, it's sharpcompress, or something else.

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

No branches or pull requests

7 participants