Squirrel.Mac icon indicating copy to clipboard operation
Squirrel.Mac copied to clipboard

Update check failed and I have no clue why

Open mr-newell opened this issue 5 years ago • 2 comments

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?

mr-newell avatar Aug 13 '19 20:08 mr-newell

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

anaisbetts avatar Aug 14 '19 00:08 anaisbetts

@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.

mr-newell avatar Aug 14 '19 15:08 mr-newell