Can't get dmgs to work with 1.5b4

Asked by Aaron VonderHaar

I don't seem to be able to get Sparkle 1.5b4 to work with my project. Everything works successfully when the new version is a zip file, but when I try to use a dmg file, Sparkle shows the error "Update Error! / An error occurred while extracting the archive. Please try again later." while showing the "Extracting update..." progress window. Finder can mount the dmg with no problems.

After dismissing the "Update Error!" window, the following is logged in console:

7/6/08 11:48:14 PM [0x0-0x2ad2ad].com.slooz.timetracker[32987] "disk1" unmounted.
7/6/08 11:48:14 PM [0x0-0x2ad2ad].com.slooz.timetracker[32987] "disk1" ejected.
7/6/08 11:48:20 PM Time Tracker[32987] Sparkle Error: An error occurred while extracting the archive. Please try again later.

Here's the setup of my test:
  * I modified my applications ~/Library/Preferences/*.plist file to set SUFeedURL to the file:///path/to/test/appcast.xml
  * The appcast enclosure also points to a file:/// URL
  * The dmg I am using is created using `hdiutil create -ov -srcfolder ReleaseFolder/ -volname Release-1.2.3 Release.dmg`. I have also tried with a dmg built using the "-format UDBZ" option.
  * I have tried both before and after using `hdiutil internet-enable Release.dmg`
  * The dmg, when mounted, contains the app and nothing else.

I thought at one point that the dmg file was working with Sparkle 1.5b2, but I haven't been able to duplicate that. I've been trying to figure this out for a couple hours, so I will take a break now and clear my head :) I haven't determined if I've built my dmg wrong, if I've screwed up my sparkle configuration somehow, or if there's a bug of some sort.

Question information

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

Hm. It works for me when I test DMGs. Is the name of the file in the .dmg Time Tracker.app? Can you send me the .dmg at <email address hidden>?

Revision history for this message
Aaron VonderHaar (avh4) said :
#2

Yes, the file in the .dmg is "Time Tracker.app"

I just tried with changing the name to "TimeTracker.app" (no space), and the extraction succeeds, but after clicking Install, it failed with these messages in the console:

7/8/08 6:08:55 PM Time Tracker[32987] Sparkle Error: An error occurred while installing the update. Please try again later.
7/8/08 6:08:55 PM Time Tracker[32987] Sparkle Error (continued): Couldn't find an appropriate update in the downloaded package.

That makes since, as the app name doesn't match.

Strangely, I could only get that to happen once. Now it is failing with the "An error occurred while extracting the archive. Please try again later." even with the new dmg. Is there some kind of caching that is going on?

I will send the original dmg momentarily.

Thanks!

Revision history for this message
Aaron VonderHaar (avh4) said :
#3

Hmm... I tried renaming the dmg from "Time Tracker-1.2.3.dmg" to "Time-Tracker-1.2.3.dmg" and also changing the volume name to replace spaces with dashes, and it worked.

However, it only worked once. After it successfully installed the update and relaunched, the same dmg no longer works! Even after rebuilding the dmg, the new dmg doesn't work either.

For testing, I'm trying to make 1.2.3 update to itself by using sparkle:version="99.0.0" to make it think that the 1.2.3 dmg is an update (1.2.3 is the version that is running). Is that not supposed to work for some reason?

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

Well done! You've found a bug. Your DMG has a folder on it called .Trashes which has no read access. Despite the fact that the app obviously isn't in there, Sparkle called it a critical failure when it couldn't copy that folder out of the DMG. Fix on the way...

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

Fixed in r237.

Revision history for this message
Aaron VonderHaar (avh4) said :
#6

Thanks Andy Matuschak, that solved my question.

Revision history for this message
Aaron VonderHaar (avh4) said :
#7

FYI, the parameter to tell hdiutil not to make the .Trashes folder is "-scrub"

`hdiutil create -ov -scrub -srcfolder ReleaseFolder/ -volname Release-1.2.3 Release.dmg`

produces the working dmg.

Thanks!