Squirrel / Squirrel.Mac

:shipit: Cocoa framework for updating OS X apps :shipit:
MIT License
1.57k stars 128 forks source link

Update check failed and I have no clue why #240

Open mr-newell opened 5 years ago

mr-newell commented 5 years ago

I have a code-signed Electron app to which I'm trying to add auto-update functionality.

I have set up a Lambda function at https://api.staging.my-domain.com/updater/checkUpdates/products/product-name/platforms/darwin?v=1.0.0 which returns a 200-status JSON response that looks like this:

{
  "upgradeStatus": "minor",
  "url": "https://s3.amazonaws.com/my-bucket/staging/installers/latest/My Product Name.zip"
}

I can paste that URL into my browser and it will download the file without a problem.

Despite this, I get the error Error: Update check failed. The server sent an invalid response. Try again later. which is coming from SQRLUpdater.m. Objective-C is looks quite foreign to me though so it's hard to understand what is causing the error to be thrown.

As far as I can tell, I am doing everything I should be to get updates working. Is there something else I need to be doing?

anaisbetts commented 5 years ago

Escape the spaces in My Product Name, My%20Product%20Name, spaces in URLs aren't actually valid, the browser is fixing it up for you

mr-newell commented 5 years ago

@anaisbetts I was hoping that would fix it but unfortunately it's still failing with the same error even after trying the encoding. I removed the program from Applications and reinstalled it in case the old URL was getting cached somehow but that didn't help.