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

downloadUrl property not prefixed to downloadUrl in update package #13

Closed oosthuizenr closed 6 years ago

oosthuizenr commented 7 years ago

I've been testing the electrode-ota-server (2.0.0-beta.1) on an EC2 instance on AWS with Ubuntu Server 16.04LTS.

The download url that gets returned from the server does not contain the downloadUrl property set in the production.json file.

I've included the resulting update package json, and the production.json file below.

Is this a config issue on my side?

update package json

{
    "isPending": false,
    "downloadUrl": "2b173930710933b6acc241a4667f9aa55b75dfdc0246ff843373fe9fab723404",
    "packageSize": 155714,
    "packageHash": "2b173930710933b6acc241a4667f9aa55b75dfdc0246ff843373fe9fab723404",
    "isMandatory": false,
    "appVersion": "1.0.0",
    "label": "v1",
    "description": "",
    "failedInstall": false,
    "deploymentKey": "xxx",
    "binaryModifiedTime": "1498042271029"
}

config/production.json

{
    "plugins": {
        "electrode-ota-server-dao-cassandra": {
            "options": {
                "contactPoints": [
                    "xx.xx.xx.xx"
                ],
                "username": "xx",
                "password": "xx"
            }
        },
        "electrode-ota-server-fileservice":{
              "options": {
                "downloadUrl": "http://xx.xx.xx.xx:9001/storagev2/"
              }
        },
        "electrode-ota-server-auth": {
            "options": {
                "strategy": {
                    "github-oauth": {
                        "options": {
                            "isSecure":false,
                            "location":"http://xx.xx.xx.xx:9001",
                            "clientId": "xxx",
                            "clientSecret": "xxx"
                        }
                    },
                   "session": {
                        "options": {
                            "isSecure":false
                        }
                   }
                }
            }
        }
    }
}
awhelms commented 7 years ago

I ran into this as well. I changed the config name from "electrode-ota-server-fileservice" to "electrode-ota-server-fileservice-upload", and it got the correct downloadUrl. I'm running into some problem still when it installs the update on the device, so this may not be a final solution.

datvong-wm commented 6 years ago

Resolved via awhelms' suggestion.