update.electronjs.org icon indicating copy to clipboard operation
update.electronjs.org copied to clipboard

/kitze/jsui/darwin/0.0.18 is causing 500s

Open zeke opened this issue 7 years ago • 4 comments

https://update.electronjs.org/kitze/jsui/darwin/0.0.18 is causing 500s

// @kitze

zeke avatar Jun 21 '18 15:06 zeke

The error is:

{"level":50,"time":1529596627634,"msg":"Invalid Version: untagged-a303cf707acdd4a51302","pid":4,"hostname":"d7c56f30-e4cd-4a94-a38d-48874d12d74e","type":"Error","stack":"TypeError: Invalid Version: untagged-a303cf707acdd4a51302\n    at new SemVer (/app/node_modules/semver/semver.js:305:11)\n    at compare (/app/node_modules/semver/semver.js:578:10)\n    at Function.eq (/app/node_modules/semver/semver.js:617:10)\n    at Updates.handleUpdate (/app/index.js:84:23)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:188:7)","v":1} 

Should be a quick fix!

juliangruber avatar Jun 21 '18 15:06 juliangruber

@juliangruber can we return a helpful error message when the version is not semver-compatible?

zeke avatar Jun 21 '18 17:06 zeke

My guess was that it's not expected to serve an untagged release, but seems like the most recent release (the one untagged) should actually be used.

If you request for example https://update.electronjs.org/kitze/jsui/darwin/0.0.0 it will point you to the last tagged release, which I think is better than erroring out. What about adding a note here, a la

"warning": "invalid semver in release X"

juliangruber avatar Jun 21 '18 20:06 juliangruber

Warning sounds good.

zeke avatar Jun 21 '18 20:06 zeke