Trouble with Downloads

12 views
Skip to first unread message

Kevin LaCoste

unread,
May 25, 2010, 12:02:19 PM5/25/10
to shin...@googlegroups.com
Hey guys, a question on downloads if anyone can help.

I read the thread "Downloading managed application?" which seems to be similar to my problem but the solution still isn't clear to me. What I'm seeing is this, I generate a new release via the Shine dashboard and it gives me a "Download URL" of:

s3path/app_100.zip

I log in to my S3 account and sure enough, the file has been uploaded into the expected location. The problem is when I check my feed via feedvalidator.org, it shows me this:

<enclosure url="s3path/app_100.zip" sparkle:shortVersionString="1.0a3" sparkle:version="100" length="302103" type="application/octet-stream" sparkle:dsaSignature="Blah blah" />

The problem is that URL. Shouldn't that be a full URL along the lines of:

http://s3.amazonaws.com/s3bucket/s3path/app_100.zip

If not, how do I communicate that to Sparkle from within my application?

I'm thinking I may have configured something wrong in the class.config.php file but looking through it, nothing jumps out at me. Anyway, any help here would be greatly appreciated.

Kevin

Jeff Schilling

unread,
May 25, 2010, 4:31:47 PM5/25/10
to shin...@googlegroups.com
You need to setup a CNAME record that aliases (in your case) s3path to s3.amazonaws.com

if your amazon bucket name is s3path.mydomain.com then your rss should contain s3path.mydomain.com/app_100.zip

You should have a CNAME that aliases s3path -> s3.amazonaws.com

Does that help?

Kevin LaCoste

unread,
May 26, 2010, 11:41:42 AM5/26/10
to shin...@googlegroups.com
Thanks for the response Jeff.

For that to work I would expect my Sparkle feed to contain something like:

http://shine.mydomain.com/downloads.php?id=1

When I manually load the URL it redirects me to:

http://mydomain.com/appname/archive-xx.zip

which doesn't exist. I could setup a redirect for that URL but that still doesn't fix the fact that the Sparkle feed is generated with only "appname/archive-xx.zip" as it's enclosure URL. Thus updates don't work.

I'm going to look into it a bit more this weekend but if anyone has any ideas, I'd appreciate any pointers!

Kevin

Tyler Hall

unread,
May 27, 2010, 12:00:51 AM5/27/10
to shin...@googlegroups.com
Hey, Kevin.

It sounds like you've just left off a setting in your app's
configuration within Shine. Here's a screenshot of how one of my apps
is setup. Take a look at all the URL and path information fields. Your
info should be similar.

http://cl.ly/65f5bc6f68cae7d896bb

Let me know if you have any other questions.

Tyler

Kevin LaCoste

unread,
May 29, 2010, 10:38:42 AM5/29/10
to shin...@googlegroups.com
Hi Tyler, thanks for the response.

From the screenshot it's clear that I've got my S3 settings setup incorrectly. Where you have <amz.clickontyler.com> for your Amazon S3 Bucket Name I have only <downloads>. Where you have <http://amz.clickontyler.com/virtualhostx> for your Amazon S3 Path I have only <testapp>. I believe the labels for these fields led me to make this error as they use the Amazon terminology which I interpreted literally.

Anyway, I'll try updating my settings and playing with this tonight. Hopefully with some good results!

Kevin

Kevin LaCoste

unread,
May 31, 2010, 9:24:35 PM5/31/10
to shin...@googlegroups.com
Hey guys, things still aren't quite working for me here.

After looking at your settings Tyler, I was able to get Shine to produce a valid Sparkle feed but the problem is, it fails to upload the zip file to S3. If I change it back to the way I had it initially, it will upload the zip file but the Sparkle feed no longer has a valid enclosure URL. My head hurts!

The settings producing a valid Sparkle feed are:

Amazon S3 Bucket Name
s3.amazonaws.com/mybucket
Amazon S3 Path
http://s3.amazonaws.com/mybucket/myfolder

The settings resulting in successful uploads to S3 are:

Amazon S3 Bucket Name
mybucket
Amazon S3 Path
myfolder

I've played with various combinations for these settings but nothing else works. This is with no CNAME records or redirects setup. Just a basic install of Shine on a new hosting account with nothing else on it. I've installed it in a top-level shine directory (http://mydomain.com/shine) and I haven't setup a subdomain (so no http://shine.mydomain.com) yet.

The only other thing I can imagine is that I've missed something in setting up the config file. On that front, I've changed the following 5 lines:

private $productionServers = array('yourdomain.com'); -> mydomain.com

$this->dbHost = ''; -> 'localhost'
$this->dbName = ''; -> 'mydbname'
$this->dbUsername = ''; -> 'myusername'
$this->dbPassword = ''; -> 'password'

That's in the production() method. I haven't set anything under staging or local and I haven't changed anything else in the config file. I can log in and everything within the Shine dashboard seems to work fine otherwise.

Thanks again for any pointers you guys can give me. I'd really like to get this working!

Kevin


On 2010-05-27, at 1:00 PM, Tyler Hall wrote:

Tyler Hall

unread,
Jun 2, 2010, 1:35:56 PM6/2/10
to shin...@googlegroups.com
Hi, Kevin.

In your case, your Amazon S3 Bucket Name should just be "mybucket".
Leave off the "s3.amazonaws.com" part. Does that help?

Tyler

Kevin LaCoste

unread,
Jun 2, 2010, 6:46:13 PM6/2/10
to shin...@googlegroups.com
On Thu, Jun 3, 2010 at 2:35 AM, Tyler Hall <tyle...@gmail.com> wrote:

In your case, your Amazon S3 Bucket Name should just be "mybucket".
Leave off the "s3.amazonaws.com" part. Does that help?

No, that results in Shine corrupting the bucket.

When I log into S3 after creating a new version the bucket contains an untitled folder whose contents can't be opened. When I attempt to delete the untitled folder the containing bucket (and everything in it) gets deleted as well. I tried viewing my S3 account with Transmit, Flow & Interarchy just to be sure it wasn't a client error. They all show the corrupted folder.

I've tried every combination of settings I can think of here and the only one that results in proper uploads is the one I mentioned previously.
 
> The settings resulting in successful uploads to S3 are:
>
> Amazon S3 Bucket Name
>        mybucket
> Amazon S3 Path
>        myfolder
>

 Kevin

Tyler Hall

unread,
Jun 3, 2010, 2:41:57 AM6/3/10
to shin...@googlegroups.com
Jeez. That doesn't sound good.

I don't know what else to do other than go through my S3 code again -
a bug must have crept into it somewhere, which is strange since my
installation of Shine is always running the latest code from GitHub.
You'd think any bug that affects you would also bite me.

If you have a few minutes, could you create an issue for this bug in
GitHub? I'd do it myself, but I'm currently out of town in a hotel
without working wifi :-)

http://github.com/tylerhall/shine/issues

Tyler

Reply all
Reply to author
Forward
0 new messages