Closed ticketshop0devops closed 3 years ago
vagrant up fails after updating to latest version
VirtualBox 6.1.16 r140961 vagrant: 2.2.14
Traceback (most recent call last): 28: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/batch_action.rb:86:in block (2 levels) in run' 27: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:inaction' 26: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in call' 25: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:inlock' 24: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:215:in block in action' 23: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:inaction_raw' 22: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in run' 21: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:inbusy' 20: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in block in run' 19: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:incall' 18: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 17: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/trigger.rb:32:incall' 16: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 15: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/check_virtualbox.rb:26:incall' 14: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 13: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:incall' 12: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in run' 11: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:inbusy' 10: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in block in run' 9: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:incall' 8: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 7: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/created.rb:15:incall' 6: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 5: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:incall' 4: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in call' 3: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:incall' 2: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:99:in addHostEntries' 1: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:inaddToHosts' c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in `+': no implicit conversion of nil into String (TypeError)
block (2 levels) in run' 27: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in
call' 25: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:in
block in action' 23: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:in
run' 21: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in
block in run' 19: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in
call' 17: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/trigger.rb:32:in
call' 15: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in
call' 13: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:in
run' 11: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in
block in run' 9: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in
call' 7: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/created.rb:15:in
call' 5: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:in
call' 3: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in
addHostEntries' 1: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in
This is similar to Issue #188 ...
It can be fixed by changing HostsUpdater.rb in Line 152
From tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd')
tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd')
to
tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid.to_s + '.cmd')
HostsUpdater.zip
@ticketshop0devops Can you test this pre-release before I push it out? https://github.com/agiledivider/vagrant-hostsupdater/releases/tag/1.2.1-beta
Still happens for me
vagrant up fails after updating to latest version
VirtualBox 6.1.16 r140961 vagrant: 2.2.14
Traceback (most recent call last): 28: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/batch_action.rb:86:in
block (2 levels) in run' 27: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in
action' 26: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:incall' 25: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:in
lock' 24: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:215:inblock in action' 23: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:in
action_raw' 22: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:inrun' 21: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in
busy' 20: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:inblock in run' 19: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in
call' 18: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 17: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/trigger.rb:32:in
call' 16: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 15: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in
call' 14: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 13: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:in
call' 12: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:inrun' 11: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in
busy' 10: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:inblock in run' 9: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in
call' 8: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 7: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/providers/virtualbox/action/created.rb:15:in
call' 6: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 5: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:in
call' 4: from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:incall' 3: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in
call' 2: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:99:inaddHostEntries' 1: from c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in
addToHosts' c:/Program Files/lw_d/DEV/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.0/lib/vagrant-hostsupdater/HostsUpdater.rb:152:in `+': no implicit conversion of nil into String (TypeError)This is similar to Issue #188 ...
It can be fixed by changing HostsUpdater.rb in Line 152
From
tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid + '.cmd')
to
tmpPath = File.join(Dir.tmpdir, 'hosts-' + uuid.to_s + '.cmd')