Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows10 - Virtualbox - 6.1.16 r140961 - HostsUpdater.rb:152:in `+': no implicit conversion of nil into String #190

Closed
ticketshop0devops opened this issue Dec 3, 2020 · 3 comments

Comments

@ticketshop0devops
Copy link

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: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 lock'
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: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: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 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: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'
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: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: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'
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: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: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 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: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'
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: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: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'
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: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: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 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')

@ticketshop0devops
Copy link
Author

HostsUpdater.zip

@cgsmith cgsmith closed this as completed in 38eee81 Dec 3, 2020
@cgsmith
Copy link
Collaborator

cgsmith commented Dec 3, 2020

@ticketshop0devops Can you test this pre-release before I push it out? https://github.com/agiledivider/vagrant-hostsupdater/releases/tag/1.2.1-beta

@yayMark
Copy link

yayMark commented Dec 8, 2020

Still happens for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants