2.2.6
Mac OSX 10.14.6 Mojave
Vagrant.configure("2") do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.box = "yzgyyang/macOS-10.14"
config.vm.network "private_network", ip: "XXXXXXXX"
end
https://gist.github.com/kwaping/928f63e18df946eac9a1ed63e9214f47
What should have happened?
Box should have downloaded, passed checksum, and updated.
Upon error, it would be nice if the downloaded file was retained for retries. Each time I get this error, I have to go through the whole (long!) download process.
What actually happened?
Got a stack trace ending with this line (snipped):
[...]/vagrant-2.2.6/lib/vagrant/util/file_checksum.rb:65:in `load_digest': uninitialized constant FileChecksum::Errors (NameError)
None that I could find.
I have this error without upgrading anything, just installing.
Host: Linux Mint 19.2
Vagrant: 2.2.6
$ mkdir -p yzgyyang/macOS-10.14 && cd $_ && vagrant init $_ && vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'yzgyyang/macOS-10.14' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'yzgyyang/macOS-10.14'
default: URL: https://vagrantcloud.com/yzgyyang/macOS-10.14
==> default: Adding box 'yzgyyang/macOS-10.14' (v10.14.6) for provider: virtualbox
default: Downloading: https://vagrantcloud.com/yzgyyang/boxes/macOS-10.14/versions/10.14.6/providers/virtualbox.box
default: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
default: Calculating and comparing box checksum...
/opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/file_checksum.rb:65:in `load_digest': uninitialized constant FileChecksum::Errors (NameError)
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/file_checksum.rb:30:in `initialize'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_add.rb:533:in `new'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_add.rb:533:in `validate_checksum'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_add.rb:352:in `box_add'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_add.rb:283:in `add_from_metadata'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_add.rb:118:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/handle_box.rb:82:in `handle_box'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/handle_box.rb:42:in `block in call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/handle_box.rb:36:in `synchronize'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/handle_box.rb:36:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:121:in `block in finalize_action'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:238:in `action_raw'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:209:in `block in action'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:613:in `lock'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `call'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `action'
from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
After applying your fix and re-downloading the file, I get the following error:
The specified checksum type is not supported by Vagrant: .
Vagrant supports the following checksum types:
md5, sha1, sha256
Why does this happen? Surely this image works for @yzgyyang.
HI @Redsandro - This is a bug that is currently fixed in a pull request here: https://github.com/hashicorp/vagrant/pull/11211
For now, you'll want to roll back your version of Vagrant since I don't believe the previous version has these issues.
Hi there, my 2cts. next;
I got vagrant 2.2.6 installed under Windows, run into this issue while trying to add a box. After downgrading to previous versions (tried all up to 1.9.x) in all cases I got the message @Redsandro stated got after patching, which @briancain stated is an open issue as well (see above).
So I guess what I am trying to say is that rolling back to previous versions did not cut it for me.
What I ended up doing instead (kept version 2.2.6), since the checksum validation happens when vagrant does the download of the box file, I downloaded the one I needed manually and then pointed the "box add" process to that local file.
As a disclaimer; I am new to vagrant so I might be missing something, yet in any case I thought this might be useful to someone else out there.
Cheers.
@kwaping Thanks for reporting the issue! The box stopped working for me after I updated Vagrant, cause I didn't put a checksum when uploading the box. For your particular use of the box yzgyyang/macOS, I've updated the release with a vaild checksum.
Thank you @yzgyyang :+1:
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
After applying your fix and re-downloading the file, I get the following error:
Why does this happen? Surely this image works for @yzgyyang.