electrode-io / electrode-ota-server

Electrode Over The Air Server for hot deployment of React Native and Cordova mobile apps
Other
204 stars 40 forks source link

electrode-ota-server-model-acquisition fail on version check "Invalid Version: 1.0" #57

Closed muratkarakas closed 6 years ago

muratkarakas commented 6 years ago

I've setup latest version of ota-server(v4.4.0-0) with github login. After releasing update for ios and then trigger updatecheck from mobile it fails. After debugging I've noticed it fails on

js file electrode-ota-server-model-acquisition/acquisition.js on line "updateAppVersion": _semver2.default.lt(fixver(params.appVersion), appVersion),

I've logged values as

fixver(params.appVersion) => 1.0 appVersion=> 1.1

error says: "Invalid Version: 1.0"

Here the error I printed with log:

TypeError: Invalid Version: 1.0 at new SemVer (/Users/murat/DEV/git/ota-server-basic-auth-example/node_modules/semver/semver.js:305:11) at compare (/Users/murat/DEV/git/ota-server-basic-auth-example/node_modules/semver/semver.js:578:10) at Function.lt (/Users/murat/DEV/git/ota-server-basic-auth-example/node_modules/semver/semver.js:612:10)

URL that ios app query is:

http://192.168.0.216:9001/updateCheck?deploymentKey=uyjRvBCktTjFrmDqGzoZJKedztuIyhtKwMAYXjRq&appVersion=1.0&packageHash=&isCompanion=&label=&clientUniqueId=A97C3237-2E04-4658-960A-F4596A5D2262

Thanks

datvong-wm commented 6 years ago

That is an invalid version. The format should be 1.0.0. https://semver.org/

muratkarakas commented 6 years ago

Thanks a lot