windows-installer
windows-installer copied to clipboard
Can not open the file as [zip] archive on nupkg when generating delta
Hey guys, little problem I have here. For first build of my app everything works smoothly, it generates .exe and -full.nupkg files as well as RELEASES file. But when I try to create new version of my app all I get is this error:
Output:
System.AggregateException: One or more error occured ---> System.Exception: 7-Zip [64] 16.04 : Copyright (c) 1999-2016
Igor Pavlov : 2016-10-04
Scanning the drive for archives:
1 file, 0 bytes
Extracting archive: C:\project\dist\installers\app-2.0.0-full.nupkg
Can't open as archive: 1
Files: 0
Size: 0
Compressed: 0
ERROR: C:\project\dist\installers\app-2.0.0-full.nupkg
C:\project\dist\installers\app-2.0.0-full.nupkg
Open ERROR: Can not open the file as [zip] archive
ERRORS:
Is not archive
v Squirrel.Utility.<ExtractZipToDirectory>d__22.MoveNext()
v System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
v System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
v Squirrel.DeltaPackageBuilder.CreateDeltaPackage(ReleasePackage basePackage, ReleasePackage newPackage, String outputFil
e)
v 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 g
enerateDeltas)
v Squirrel.Update.Program.executeCommandLine(String[] args)
v Squirrel.Update.Program.main(String[] args)
v Squirrel.Update.Program.Main(String[] args)
---> (Inner Exception #0) System.Exception: 7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04
Any idea what to do with this? My .nupkg file is about the same size as .exe file, build script can reach it but for some reason it doesn't work. Oh and one more thing, after this error, my -full.nupkg file is 0 bytes size, but new 2.0.1-full.nupkg file is generated (only .exe is missing) and it is bigger then previously-existing 2.0.0-full.nupkg file.
Here is screenshot of files after second build with error - http://prntscr.com/gw0vpq
Thanks for any help, because I don't really know how to solve this problem and I've been bashing my head against it for a few days :)
i am encountering the same issue. was there any workaround for this @Pirozek?
Nope, sorry :( I solved it by distributing whole app as new version without delta updates, but thats not really a solution
a bit of an update from my end - I am using electron forge to handle my app building and have tried this on 3 different machines (2 mac, 1 win), all with the same result @Pirozek has encountered above.
my electronWinstallerConfig looks like:
"electronWinstallerConfig": {
"name": "MyApp",
"setupExe": "MyApp.exe",
"certificateFile": "./path/to/cert",
"remoteReleases": "http://urltoremotereleases.com"
}
has anyone else encountered this or come up with a workaround?
ok I have seemingly gotten this working.
i think where this is a bit confusing is that if you have the remoteReleases
key on first build, it will break.
so you need to run the task to create the full.nupkg, exe & RELEASES file, then take those and put them in your S3 bucket or wherever. once your RELEASES file is being hosted, then point to it with this and it will create the deltas. seems pretty obvious now, but definitely stumped me for a while. i hope this helps out anyone else who encounters this problem.