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

sparkle unexpectedly requires "sparkle:shortVersionString" in delta update feed items #1207

Closed
core-code opened this issue Apr 2, 2018 · 5 comments · Fixed by #1878
Closed

Comments

@core-code
Copy link
Contributor

1.) download https://github.com/aonez/Keka/releases/download/v1.0.14/Keka-1.0.14.zip
2.) "check for updates"
3.) you'll see "Keka 1804 is now available - you have 1.0.14." this obviously confusing message (which compares a bundleversion with a shortversionstring) is presented because sparkle seems to ignore the sparkle:shortVersionString information present in the update feed here: http://www.kekaosx.com/update/keka.xml
4.) since the feed is valid i don't know why sparkle ignores the shortversionstring in this feed, but uses it just fine for most other feeds. same bug exists when replacing the sparkle framework in Keka with the newest version 'Sparkle-1.19.0rc2'

@kornelski
Copy link
Member

kornelski commented Apr 2, 2018

Keka 1.0.14 has Sparkle 1.14.0. Note that when updating an app, the newest version of Sparkle can't be used, since it's not even downloaded yet.

@core-code
Copy link
Contributor Author

core-code commented Apr 2, 2018

i understand that the framework thats embedded into the app is used. but

1.) as i said, i've replaced the (old) Sparkle framework right inside the Keka app bundle with the new Sparkle-1.19.0rc2' version and the problem persists
2.) also when using the CLI tool in the 'XPC-and-UI-separation' tool to from GIT HEAD of that branch the problem is also observable:
just modify the line to also print the enclosure info:

              fprintf(stderr, "Update available!\n %s", item.propertiesDictionary.description.UTF8String);

and then run the CLI tool on Keka:

$ sparkle.app/Contents/MacOS/sparkle Applications/Keka.app --verbose --probe

and you'll get:

enclosure =     {
        length = 38752;
        "sparkle:deltaFrom" = 1799;
        "sparkle:dsaSignature" = "MC0CFGKmwWsJfbjavZHojh8+8MMg6iFdAhUAxOBcIeXWWwTfdnFPUO6jwR7vOWU=";
        "sparkle:version" = 1804;
        type = "application/octet-stream";
        url = "https://github.com/aonez/Keka/releases/download/v1.0.15/1.0.14r1799-1.0.15r1804.delta";
    };

which misses the shortVersionString. this is not true for other apps/feeds

@core-code
Copy link
Contributor Author

note that you'll have problems reproducing it now with 'Keka', as they have fixed it server-side by changing the feed: aonez/Keka#162

@kornelski
Copy link
Member

kornelski commented Apr 2, 2018

Ahh! It was caused by the delta updates. That makes sense. It looks like an easy mistake to make, so we should probably use <enclosure> as a fallback to read version for the deltas.

@kornelski kornelski changed the title sparkle ignores "sparkle:shortVersionString" in some cases sparkle unexpectedly requires "sparkle:shortVersionString" in delta update feed items Apr 2, 2018
@zorgiepoo
Copy link
Member

zorgiepoo commented Mar 19, 2021

This really behaves expectably and shortVersionString is not different than version here. We should not fall back to main enclosure item. We already fall back to version and shortVersionString being app cast element items, which is the correct approach, and I believe we have done this for a very long time to support informational-only updates (like since 2007). I think the correct adjustment documentation wise is to use the appcast item elements for version fields in our sample app casts / generate_appcast. It has actually confused me quite a bit supplying these version strings the first time I integrated delta updates.

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