Strider-CD / strider-ssh-deploy

Plugin for Strider-CD to deploy with SSH
14 stars 12 forks source link

Cannot read property 'host' of null #37

Closed alex-alfaro closed 8 years ago

alex-alfaro commented 8 years ago

This happened right after upgrading ssh-deploy to 1.0.0

`n unexpected error occurred while executing this job. Please report at https://github.com/Strider-CD/strider/issues

Cannot read property 'host' of null

TypeError: Cannot read property 'host' of null at /home/ubuntu/strider/node_modules/strider-ssh-deploy/deploy.js:17:23 at Function.map (/home/ubuntu/strider/node_modules/strider-ssh-deploy/node_modules/lodash/dist/lodash.js:3509:27) at /home/ubuntu/strider/node_modules/strider-ssh-deploy/deploy.js:14:31 at Object.module.exports.getPrivateKey (/home/ubuntu/strider/node_modules/strider-ssh-deploy/keys.js:20:32) at getConnectionOptions (/home/ubuntu/strider/node_modules/strider-ssh-deploy/deploy.js:11:8) at Object.deploy (/home/ubuntu/strider/node_modules/strider-ssh-deploy/deploy.js:52:7) at Object.runPlugin (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/utils.js:26:25) at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/job.js:293:15 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:551:21 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:227:13 at iterate (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:134:13) at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:145:25 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:229:17 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:556:34 at Object.runPlugin (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/utils.js:24:30) at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/job.js:293:15 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:551:21 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:227:13 at iterate (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:134:13) at async.eachSeries (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:150:9) at _asyncMap (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:226:9) at Object.mapSeries (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:216:23) at Object.async.series (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:549:19) at Object.Job.runPhase (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/job.js:296:11) at Object.Job.phaseDone (/home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/lib/job.js:342:10) at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:232:13 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:142:25 at /home/ubuntu/strider/node_modules/strider-simple-runner/node_modules/strider-runner-core/node_modules/async/lib/async.js:229:17`

alex-alfaro commented 8 years ago

Removing the plugin and adding it again in the list of 'choosen plugin' would do the trick. So maybe only warning about it its fine.

knownasilya commented 8 years ago

So re-adding fixed it?

oliversalzburg commented 8 years ago

If it happened after upgrading, the username was probably not part of the host string. This should be closed IMHO