iheanyi / ember-cli-deploy-digitalocean

Deploy your FastBoot Ember applications to DigitalOcean droplets. www.digitalocean.com
MIT License
22 stars 4 forks source link

TypeError: Cannot read property 'ip_address' of undefined #7

Open jwlawrence opened 8 years ago

jwlawrence commented 8 years ago

When running ember do:provision I'm running into this error:

There was an error communicating with DigitalOcean's API!
TypeError: Cannot read property 'ip_address' of undefined
Error: TypeError: Cannot read property 'ip_address' of undefined

I looked at the response and it looks like the v4 array is empty. Does DigitalOcean no longer return the ip address in the response or is this something unique to me?

iheanyi commented 8 years ago

@jwlawrence Hey, thanks for reporting. Let me look into this, how many times did you run this command? And were you trying to create a new droplet? Sometimes there's a race condition around creating a droplet and the IP won't be available from the response.

jwlawrence commented 8 years ago

Ok, yeah that makes sense. I ran it a couple more times and was able to successfully create a droplet, and everything worked well. Might be worth adding a guard around the IP address assignment and setting the value to an empty string if no IP is found. At least then the install will complete and the user can manually update the IP var later rather than spinning up multiple droplets until they win the race.

On another note, creating a new droplet was the only option available to me despite having a pre-existing droplet up and running, so that may be a separate issue. Thanks for this plugin, it's very helpful.

iheanyi commented 8 years ago

@jwlawrence - What version of Ember-CLI are you using? I'm noticing this issue a bunch when it comes with Ember-CLI Beta 2.3.0, trying to see if it works for the latest versions.

jwlawrence commented 8 years ago

I'm on ember-cli 2.5.0.

iheanyi commented 8 years ago

@jwlawrence - Hmmmm, dang. That's interesting. I'll have to investigate this further, this is weird. Do you have any specific scenarios when this occurs?