Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squirrel Endpoint for Windows Either 404 or empty #17

Closed
ractoon opened this issue May 3, 2016 · 9 comments
Closed

Squirrel Endpoint for Windows Either 404 or empty #17

ractoon opened this issue May 3, 2016 · 9 comments
Assignees
Labels
Milestone

Comments

@ractoon
Copy link

ractoon commented May 3, 2016

Hi There,

I'm working with the latest release of electron-release-server 1.1.1 and am getting some odd errors from Squirrel when setting the endpoint for updates.

From digging it seems that Squirrel.Windows auto-appends the /RELEASES to the URL set for auto-updates. So initially I had set my update endpoint to:

https://download.myapp.io/update/win32/1.0.0/stable

I'm able to access that directly and get the RELEASES file, but Squirrel is throwing an error saying:

The remote server returned an error: (404) Not Found.

Additionally if I change the endpoint to (just for testing):

https://download.myapp.io/update/win32

I get the error:

Remote release File is empty or corrupted

Which seems to be at least reaching the server. Not sure if I'm missing something in my configuration that could be causing this. Any insights you could offer would be greatly appreciated.

Thanks!

@stevenkroon
Copy link

@ractoon i've got the same problem on win32, I think it has to with the wrong filename being downloaded (or at least tried when there is no x64 file available).

When my architecture is ia32, it should be downloading: AppName-1.4.1-ia32-full.nupkg but it downloads AppName-1.4.1-full.nupkg (which is the default x64 filename).

Need to further investigate this, @ArekSredzki maybe this is a hint in the right direction?

@ractoon
Copy link
Author

ractoon commented May 5, 2016

@stevenkroon Ah, very interesting. I removed the "ia32" from the nupkg file and uploaded it and it does indeed update with that file now.

Since I just have 32-bit applications this isn't a big deal, I can just rename but others who do both may encounter problems.

@ArekSredzki
Copy link
Owner

Hi @ractoon sorry for the slow response, I'm on vacation in Europe so my availability is exceptionally poor.

The -ia32 in the filename is removed from what is referenced in the generated RELEASES file here:
https://github.com/ArekSredzki/electron-release-server/blob/master/api/services/WindowsReleaseService.js#L114

This change was introduced to avoid the server from having the app updated endlessly #8

Squirrel.windows could not possibly be documented any more poorly, so I con't know what it actually expects. Could you try removing the line linked above and letting me know if it works?

@ArekSredzki
Copy link
Owner

If that doesn't work, and I honestly doubt that it will, then the next step to take will be to allow the server to download the ia32 bit file using the other name.

@stevenkroon
Copy link

Hey @ArekSredzki I should have reported back to you earlier upon this. I removed the replace, and just returned the asset.name instead. This works for me, so i'm using it like that currently :-)

If there is anything you want me to test let me know.

@ArekSredzki
Copy link
Owner

@stevenkroon does it not constantly say that there's an update available?

@ArekSredzki
Copy link
Owner

@tkambler could you advise as to what happens if you remove this line as well?

@ArekSredzki
Copy link
Owner

@stevenkroon @tkambler ping!

@anaisbetts
Copy link

anaisbetts commented May 25, 2016

Squirrel.windows could not possibly be documented any more poorly, so I con't know what it actually expects

Hm, there used to be docs for the exact format of RELEASES but it seems to have disappeared in the latest version of the documentation. https://github.com/Squirrel/Squirrel.Windows/tree/0.99.1/specs has more of the technical details of how RELEASES files should be formatted.

The short version is, it's:

SHA1 PACKAGEID-VERSION-[delta/full].nupkg  FILESIZE

So:

14db31d2647c6d2284882a2e101924a9c409ee67  MyCoolApp-1.1-delta.nupkg  80396

That filename is parsed, you can't include ia32 in there. You can also include an absolute HTTPS URL (not a relative URL beginning with /), but it still has to follow the filename rules. Making the filename have to follow rules to be valid is in retrospect super confusing, but it made us be able to add delta updates without breaking old versions of the installer (which is why feature additions to Squirrel in general are so hard)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants