An error occurred while extracting the archive. Please try again later.

Asked by Russell

Everything works as it should, except after d/l my update, Sparkle returns this error:

An error occurred while extracting the archive. Please try again later.

Console gives this error:

24/09/09 7:01:23 AM Safari[1259] Sparkle Error: No valid unarchiver for /var/folders/av/av5ozywWFiOy36HQ-gx2UE+++TI/-Tmp-/Safari Cookies 0.9 Update 1/Safari Cookies.dmg!

here is my xml file:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
   <channel>
      <title>Safari Cookies Changelog</title>
      <link>http://sweetpproductions.com/safaricookies/appcast.xml</link>
      <description>Most recent changes with links to updates.</description>
      <language>en</language>
         <item>
            <title>Version 0.9.1 (test feed for Sparkle)</title>
      <sparkle:releaseNotesLink>
       http://sweetpproductions.com/safaricookies/updates/updates.htm
      </sparkle:releaseNotesLink>
            <pubDate>Wed, 23 Sep 2009 08:25:11 +1000</pubDate>
            <enclosure url="http://sweetpproductions.com/safaricookies/updates/Safari Cookies.dmg" sparkle:version="0.9.1" length="446478" type="application/octet-stream" sparkle:dsaSignature="ive changed this.........................." />
         </item>
   </channel>
</rss>

Question information

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

I just tested your appcast (disabling DSA validation), and it extracted fine for me...

Revision history for this message
Russell (sweetpproductions) said :
#2

How do I disable DSA, or is there something else I should do to fix the error?

Revision history for this message
Andy Matuschak (andymatuschak) said :
#3

Disabling DSA didn't fix the error; it just let me check your update.

I'm not sure what's causing your error, but that exact feed is working just fine for me. I'll think about it.

Revision history for this message
Russell (sweetpproductions) said :
#4

Am I able to change the button from "Install Update" to "download Update"?

that would probably work better for my app as its a plugin anyway?

Revision history for this message
Andy Matuschak (andymatuschak) said :
#5

You can always change the string in the localized resources, I guess. If your project is a plugin, it's still being installed...

Revision history for this message
Russell (sweetpproductions) said :
#6

I tried using a .zip file, as I noticed other people having problems with .dmg, but I get the same problem.

I also just tried my plugin on a different computer, and get the same error?

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

It just seems that it does not find the SUDiskImageUnarchiver, which probably means it's not registered. I don't think +load is the right place to register. I've had problems with using Cocoa in +load implementations before, it's not safe, it may be called too early. E.g. I don't think it's guaranteed that the SUUnarchiver (Private) category is loaded before the subclasses are loaded, especially on Tiger. I think it's much safer to register the subclasses explicitly in +[SUUnarchiver initialize], where you're guaranteed classes are properly loaded and initialized.

Apart from that, the OP has not said which Sparkle version he's using and on which system he's having problems.

Revision history for this message
Russell (sweetpproductions) said :
#8

Thanks Hofman, that solved my question.

Revision history for this message
Russell (sweetpproductions) said :
#9

I moved the calls to Sparkle out of my load function, and into awakeFromNib, and everything works!
thanks!

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

Sorry Russel, are you saying YOU initiated SPARKLE in a +load method? That's not what I was referring to (I was talking about an implementation detail in the Sparkle code), but calling/initializing Sparkle in a +load method would surely be dangerous.

Revision history for this message
Russell (sweetpproductions) said :
#11

yeah,

I was initiating in the +load method for my plugin, and when I moved it to the awakeFromNib method, it worked as it should.

I thought we were meant to initiate Sparkle as soon as possible?

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

> I thought we were meant to initiate Sparkle as soon as possible?

That depends on what you mean by "possible". Certainly not before loading all the code. I'd say at the beginning of operation. What that is depends on the situation. It's typically either when the main NIB is loaded or in an lauching method like -applicationWillFinishLaunching or -webPluginInitialize.

Revision history for this message
Chris Pepper (reppep) said :
#13

I'm having the same symptom, with multiple versions of Phone Amego <http://www.sustworks.com/site/prod_phoneAmego_help/PhoneAmegoHelp.html> and ClickToFlash 1.5.x, on a couple different Macs (both running 10.6.1 10b504). I believe that despite many errors 'while extracting the archive.', Sparkle did manage to update at least one previous version of Phone Amego on both my home and work Macs, but it's definitely failed over a dozen times for Phone Amego and at least half a dozen times for CTF on each Mac since then.

I would compare md5s, but never see anything appear in /tmp.

Revision history for this message
Chris Pepper (reppep) said :
#14

FWIW, I've confirmed the problem remains after manually upgrading to 1.0.6, which downloads but rejects the 1.0.7 update.