-
Notifications
You must be signed in to change notification settings - Fork 85
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
Relative URLs for Items #57
Comments
Hi again, No worries. It's not a bother. Hmmm...release notes do use the The original macOS Sparkle project had a similar issue filed here: sparkle-project/Sparkle#616. Their opinion was that it was something Sparkle shouldn't handle due to RSS standards, which makes sense to me. A public file should contain absolute URLs, basically, and https://validator.w3.org/feed/docs/warning/ContainsRelRef.html confirms that idea. But I have to admit that relative URLs would make things easier, potentially. I'm a little torn, to be honest, because I like specs. I'm going to go ahead and make the change for now just so that the software is consistent in how it handles URLs in the appcast (and changing the way release notes are pulled is a breaking change), but I am not promising this change will stay in an eventual X.0 version of NetSparkle. The better plan would be to generate multiple appcast.xml files for each server at build time with absolute URLs. Thanks :) |
Should be fixed in b1bb3d1. Let me know if it doesn't work for you. NuGet package has been pushed but might take a few mins to propagate. |
Hi, I understand - I have the possibility to generate per server appcast.xmls once you remove that feature, but for now as I am under time pressure I wanted to spare me that work ;-). Thanks for including that for now. However; there is No luck for me; NetSparkle.New 0.16.1
as you might have guessed I am fairly new to .NET and C# - but an update of the nuget package plus a complete cleanup and the new version should be included into my build (I have been burnt by eclipse with similar problems), right? At least when looking into the dependend packages I also have 0.16.1 at my installation... or am I doing something wrong? best regards |
Hi, I understand having time constraints, haha. Been there, done that. 😅 What version of .NET are you using? I'm not able to replicate the problem using "installer.exe" as the item link and "http://localhost/aliasmatch/appcast.xml" when building from source. Hm. It's entirely possible I did a dumby and uploaded the wrong thing to NuGet; I've done that before. (I've realized that I did forget to bump the assembly version to 0.16.1, oops.) Could you try cloning the project and building the DLL yourself to double check that you're using the right version, please? In addition, you could try debugging with one of the test apps by changing the URL to point to your local test system's appcast files. Could you try that and let me know what happens, please? Thanks. |
Hi, sure thing, I'll try building a testcase using the example program and let you know the outcome. I am on .NET 4.6.1 and running Visual Studio Community Edition 2017 if this is of any consequence btw. cheers |
Please also let me know what your actual URL is (change words if you need to but not the overall format including dashes and the like) and relative path is, as it's possible your formatting is actually wrong and that's the problem 😅 I also updated NuGet to 0.16.2 'cause I found a Bad Bug. Might take a few minutes to propagate. Let me know! We'll get to the bottom of it. |
Hi, I upgraded to 1.16.2 - still get the same error. I stripped the appcast.xml to the bare minimum:
The appcast and the installer.exe are located in the very same folder. The url would be http://host-name:7777/somepath/some_alias_match/folder/appcast.xml (the url structure including the - and _ are the very same in my local installation) http://host-name:7777/somepath/some_alias_match/folder/installer.exe is available; I can download it e.g. via chrome. Basing on your GetAbsoluteUrl method I built a Sparkle-Less repcase:
Which downloads the installer.exe to d:\temp, so this shoud be correct. Next thing I'll put a testcase together using the NetSparkle example app and let you know the outcome. cheers |
Okie dokie. Based on the stack trace I wonder if the NetSparkle.dll your app is using has been updated. The stack trace should include a call to |
Interesting. I really seem to have an old version of the NetSparkle.dll. Even though I upgraded, and removed NetSparkle from the references twice the version I am getting in the references property is 0.15.0.0. packages.config shows
in the .csproj I have
Maybe this is some oddity from VS Community 2017? I'll look more into it tomorrow. Have a nice day! cheers |
Hey. You're not crazy. Something is wrong with the NuGet build script I use and the NetSparkle DLL is indeed 0.15.0. I'm looking into it now. So sorry for the hassle!! |
OK, I found and fixed the bug. No clue when that happened. (I'm in a bit of a rush at the moment and can't do the research now.) Please try updating your NuGet to 0.16.3 and see how that goes. Many apologies for the confusion and hassle. |
Hi! After an update to 0.16.3 it's working now with relative URLs \o/ ;-). No worries it wasn't a hassle at all. Your library saves me a ton of work - so thanks for that. Thank you very much for the quick fix! best regards |
Hi, So glad to hear! I'll go ahead and close the issue. :) |
Hi!
Sorry to bother you again; I have an issue with relative URLs for the items in the appcast.xml file.
As the appcast file for all servers would very much look the same I figured with relative paths they would be 100% be the same so I would be able to generate one appcast.xml file at build time, not for each server at install time.
The update mechanism works with absolute paths in the URLs of course.
My AppCast.xml would look like this:
The installer.exe is located in the very same Directory where the appcast.xml is located.
Now I instantiate Spakle like
When an Upgrade is attempted I get an Exception:
(Sorry for the German Error Message; it basically tranlsates to invalid URI Format - as the Exception says ;-)).
I took a look at GetAbsoluteUrlString which should return an Absolute URL for a relative item url:
https://github.com/Deadpikle/NetSparkle/#systemuri-getabsoluteurlstring
seems to be right; however; I looked further and in NetSparkle.cs Method InitDownloadAndInstallProcess
Line 1094 there is
Please correct me if I am wrong - but item.DownloadLink is a relative URL in my case - and the code should call GetAbsoluteUrl (or something similar)? Am I getting this right?
thanks & regards
Christian
The text was updated successfully, but these errors were encountered: