error occurred while downloading the update

Asked by Laurent Daudelin

I read the other topics on the issue but didn't find anything to solve my problem. When using Feeder to create my appcast, I can click on the link in the enclosure and it will download the new version fine. Or, I can copy the link in the enclosure tag, paste it in a browser and the file will be downloaded right away. But when clicking the "Download" button in the update dialog, I get these errors in the console:

Sparkle Error: An error occurred while downloading the update. Please try again later.
Sparkle Error (continued): The operation couldn’t be completed. (NSURLErrorDomain error -1100.)

NSURLErrorDomain -1100 is "File not found" error. But, the files seems to be there since I can download it from Feeder and the browser.

My appcast is currently hosted internally at the company where I work so I can't provide a link but I can provide the content of my appcast here:

<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
    <channel>
        <title>PL Reader</title>
        <link>http://www.plasticlogic.com</link>
        <description>Feed to Macintosh PL Reader updates</description>
        <generator>Feeder 2.0.6(1186) http://reinventedsoftware.com/feeder/</generator>
        <docs>http://blogs.law.harvard.edu/tech/rss</docs>
        <language>en</language>
        <copyright>©2009 Plastic Logic</copyright>
        <managingEditor><email address hidden></managingEditor>
        <webMaster><email address hidden></webMaster>
        <pubDate>Fri, 25 Sep 2009 13:08:16 -0700</pubDate>
        <lastBuildDate>Fri, 25 Sep 2009 13:08:16 -0700</lastBuildDate>
        <atom:link href="http://wiki/download/PLReaderAppcast.xml" rel="self" type="application/rss+xml"/>
        <item>
            <title>PL Reader build 137 Available</title>
            <description><![CDATA[<p>-Add auto-update feature (ZEUS-871)
<br />-Fixes "Send to Reader" item not working (ZEUS-1402)</p>]]></description>
            <pubDate>Wed, 23 Sep 2009 13:13:01 -0700</pubDate>
            <enclosure url="http://builds/view/Builds/job/Mac_neocompanion_continuous/lastSuccessfulBuild/artifact/Macintosh/Neo%20Companion/build/Release/PL%20Reader.app//*zip*/PL%20Reader.app.zip" length="1719042" type="application/octet-stream" sparkle:version="137" sparkle:shortVersionString="1.0a12" sparkle:dsaSignature="MC0CFGSVKfJaSYWkWbnH8XKHKQyAXPFkAhUAjKtDkrBaNRzxnnTtgX1ofVGNPIM="/>
        </item>
    </channel>
</rss>

So, what's the problem?

Thanks in advance!

Question information

Language:
English Edit question
Status:
Solved
For:
Sparkle Edit question
Assignee:
No assignee Edit question
Solved by:
Laurent Daudelin
Solved:
Last query:
Last reply:
Revision history for this message
Andy Matuschak (andymatuschak) said :
#1

Try turning those %20s in the URL into spaces. Maybe the encoding is being weird.

Revision history for this message
Hofman (cmhofman) said :
#2

Are you sure the double slash is correct?

Revision history for this message
Laurent Daudelin (laurent-daudelin) said :
#3

If I copy the link entirely and paste it in a browser, it will download the update right away.

Revision history for this message
Hofman (cmhofman) said :
#4

> If I copy the link entirely and paste it in a browser, it will download the update right away.

That by itself is not really relevant, because most modern browsers have mechanisms to clean and/or complete URLs before they use it. The direct download mechanisms in Cocoa are not so forgiving. And they really shouldn't need to, because you should be able to give a perfectly valid and well-formed URL. My guess is that you didn't, certainly it does not look like a correct URL to me. However, I cannot check this, as I cannot access your domain.

Revision history for this message
Laurent Daudelin (laurent-daudelin) said :
#5

I think I found it. I talked to our build engineer here and he said that the ZIP archive doesn't really exist at that link but when you click the link, it is archived and then your download starts. Must be something like that. I did try putting a real ZIP archive on a different server and of course, it worked. Now, the security stuff and signing the archive properly. Oh well... always something!

Revision history for this message
Billy Gray (wgray-zetetic) said :
#6

> Try turning those %20s in the URL into spaces. Maybe the encoding is being weird.

I just spent the last hour trying to figure this out when it turns out that properly URL-encoding my link so that a space was represented as %20 was the cause of the problem. Obviously, I can just drop the extra URL encoding I'm doing in my build scripts, but I'm pretty sure that when encoding a string into a URL, Cocoa respects items like %20, no?