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

Application fails to update #236

Open
stefanolson opened this issue Feb 10, 2014 · 4 comments
Open

Application fails to update #236

stefanolson opened this issue Feb 10, 2014 · 4 comments

Comments

@stefanolson
Copy link

For the first time ever I have had a scenario where the application doesn't update. It clearly downloads the update but doesn't install it properly. all I get from the installer log is this:
[INFO][2014-02-10T07:13:25] UpdateManager: Downloading RELEASES file from http://[site].azurewebsites.net/setup
[INFO][2014-02-10T07:13:34] UpdateManager: cleanDeadVersions: for version 1.0.23
[INFO][2014-02-10T07:13:34] UpdateManager: cleanDeadVersions: exclude folder app-1.0.23

Which appears to indicate the installer has started and stopped for an unknown reason.

I'm wondering what the best way to handle this is? Because it is now an out of date release I can't test anything else about the update, but presumably there been an exception in UpdateManager.ApplyReleases? My code is:
using (var updateStatusBarItem = StatusBarTrayManager.CreateNewItem("Updating application"))
{
updateStatusBarItem.Maximum = 100;
var releases = updateInfo.ReleasesToApply;

var progress = new Subject<int>();
progress.Subscribe(p => updateStatusBarItem.CurrentValue = p, exception => { /* ignore */ });
await updateManager.DownloadReleases(releases, progress);

List<string> results = await updateManager.ApplyReleases(updateInfo);
_updateChecked = true;
// do nothing with results?
return true;

}

I was wondering if this could potentially be an issue with the diff version only, so maybe I could automatically force it to use the full version if I ever do get an exception in ApplyReleases? I have confirmed that the full version works on the basis of completely reinstalling, which does work (except for the icon never appearing, but that's another post).

Stefan

@stefanolson
Copy link
Author

This is due to an exception:
System.InvalidOperationException was caught
HResult=-2146233079
Message=AwaitableAsyncSubject.GetResult() is rethrowing an inner exception
Source=Shimmer.Core
StackTrace:
at ReactiveUIMicro.AwaitableAsyncSubject1.GetResult() at Shimmer.Client.UpdateManager.<applyReleases>d__1f.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Reactive.PlatformServices.ExceptionServicesImpl.Rethrow(Exception exception) at System.Reactive.ExceptionHelpers.ThrowIfNotNull(Exception exception) at System.Reactive.Subjects.AsyncSubject1.GetResult()
at UserManager.MainWindow.d__16.MoveNext() in c:\projectswpf\hsc\UserManager\MainWindow.xaml.cs:line 257
InnerException:
HResult=-2146233088
Message=BZ_DATA_ERROR
Source=Ionic.Zip
StackTrace:
at Ionic.BZip2.BZip2InputStream.SetupBlock()
at Ionic.BZip2.BZip2InputStream.init()
at Ionic.BZip2.BZip2InputStream..ctor(Stream input, Boolean leaveOpen)
at Ionic.BZip2.BZip2InputStream..ctor(Stream input)
at Shimmer.Core.BinaryPatchUtility.Apply(Stream input, Func1 openPatchStream, Stream output) at Shimmer.Core.DeltaPackageBuilder.applyDiffToFile(String deltaPath, String relativeFilePath, String workingDirectory) at Shimmer.Core.DeltaPackageBuilder.<>c__DisplayClass1a.<ApplyDeltaPackage>b__c(String file) at System.Linq.EnumerableExtensions.ForEach[TSource](IEnumerable1 source, Action1 onNext) at Shimmer.Core.DeltaPackageBuilder.ApplyDeltaPackage(ReleasePackage basePackage, ReleasePackage deltaPackage, String outputFile) at Shimmer.Client.UpdateManager.<>c__DisplayClass61.<createFullPackagesFromDeltas>b__5a() at System.Reactive.Linq.QueryLanguage.<>c__DisplayClassd51.<>c__DisplayClassd7.b__d4()
InnerException:

So if it fails to update using the delta, it should download and use the full, but this exception is not being caught gets all the way up to my application.

Stefan

@bgrainger
Copy link
Contributor

I got this error with the most recent update I published, too. I didn't investigate any further, but simply pulled all delta packages from my feed (forcing users to download the full update).

It would be nice if Squirrel automatically fell back to trying the full update if the delta update fails.

@peters
Copy link
Contributor

peters commented Jun 19, 2014

I solved this by never uploading delta packages. Don't do it!

Regards,
Peter Sunde.

2014-06-18 22:46 GMT+02:00 Bradley Grainger [email protected]:

I got this error with the most recent update I published, too. I didn't
investigate any further, but simply pulled all delta packages from my feed
(forcing users to download the full update).

It would be nice if Squirrel automatically fell back to trying the full
update if the delta update fails.


Reply to this email directly or view it on GitHub
Squirrel/Squirrel.Windows#236 (comment)
.

@stefanolson
Copy link
Author

@peters it works about 90% of time for me. So I'm going to implement a work around where if it fails to use the Delta then it goes back to the full. My app is around 10 MB and if I don't need to download that much data it is better not to.

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

3 participants