GitbookIO / nuts

:chestnut: Releases/downloads server with auto-updater and GitHub as a backend
http://nuts.gitbook.com
Apache License 2.0
1.25k stars 300 forks source link

No platform specified #149

Closed sqwk closed 7 years ago

sqwk commented 7 years ago

Electron is querying an url like this https://download.someapp.com/update/darwin_x64/1.1.1/latest-mac.json. This produces a 404 error, Page not found. Nuts logs out the following:

Error: No platform specified and impossible to detect one
at Nuts.onDownload (/app/lib/nuts.js:150:36)
at wrapper (/app/node_modules/lodash/index.js:3189:19)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at next (/app/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
at /app/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
at next (/app/node_modules/express/lib/router/index.js:275:10)
at /app/node_modules/express-useragent/index.js:43:9

What am I doing wrong? Am I using the wrong URL?

sqwk commented 7 years ago

Turns out that this is a safety feature of running nuts on Google App Engine. No Updates available (204 No Content) is translated automatically into a 404 Page not Found. When an update is actually available it works as advertised.