-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
vagrant 2.2.19 nfs folders uninitialized constant error on Mac OS #12583
Comments
Same here |
well, hope this helps. |
Ah, it's great the fix already landed, I missed the first report about this problem because it got addressed so fast and closed... Might make sense to keep this issue open until the fix gets released to avoid more reports of this problem. Thank you for pointing at the hotfix. |
thanks @AntonioMeireles! I finally stumbled upon the fix and applied it. Works fine now! |
#12583 (comment) worked great for me! Thank you. |
One-liner to apply #12581 sudo curl -o /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/hosts/darwin/cap/path.rb https://raw.githubusercontent.com/hashicorp/vagrant/42db2569e32a69e604634462b633bb14ca20709a/plugins/hosts/darwin/cap/path.rb |
@christopher-hopper
Do I need to be on Mac OS 12.0.1 for this to work? I may try to just manually replace the file after lunch. 🤔 |
@christopher-hopper Nvmdn, I forgot to adjust for the line break character. So:
worked just fine. |
As usual a MacOs upgrade caused a Vagrant issue for me - this one specifically - and also as usual someone within the community came through and figured out how to fix it. Thanks @AntonioMeireles and @kojoidrissa , this fixed my issue updating to Monterey. 👍 |
I was aware of this issue and did not upgrade to Monterey yet (besides other problems). I'm still on 10.15.7 macOS Catalina and today I was also hit by this?!
Before blindly running curl commands I checked the diff and it looks sane: + $ diff -u /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/hosts/darwin/cap/path.rb.backup-20220104 path.rb
--- /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/hosts/darwin/cap/path.rb.backup-20220104 2022-01-04 12:35:09.000000000 +0100
+++ path.rb 2022-01-04 12:35:21.000000000 +0100
@@ -17,7 +17,8 @@
def self.resolve_host_path(env, path)
path = File.expand_path(path)
# Only expand firmlink paths on Catalina
- return path if !CATALINA_CONSTRAINT.satisfied_by?(Cap::Version.version(env))
+ host_version = env.host.capability(:version)
+ return path if !CATALINA_CONSTRAINT.satisfied_by?(host_version)
firmlink = firmlink_map.detect do |mount_path, data_path|
path.start_with?(mount_path) TL;DR: like for many others before here, this change worked for me! Still unclear why my system on Catalina was subject to this problem 😞 |
I can confirm that this affects Catalina, too, as I'm on 10.15.7 and experienced the same problem. The patch worked perfectly. |
It doesn't appear to fix Bg Sur - any ideas? |
@mspacemedia the replace of |
This works. I am on macOS Monterey and using Vagrant 2.2.19 |
Considering the fix has already been merged, how long will it take for this to be released? It's been months now since the fix. |
Thanks @kojoidrissa it worked for me!. |
Worked for me on Big Sur (Mac OS 11.6.4) and Vagrant v2.2.19. Thanks! |
Thanks @kojoidrissa Worked for me on Monterey + Vagrant 2.2.19 |
Thanks works for me MacOS Monterey |
How is this not released yet? This issue was opened six months ago. |
I have the same problem with Big Sur and 2.2.19, the command executed from the terminal, executed correctly but continues to give me the same error. could you tell me the correct file that I try to modify it manually? |
i just upgraded to Monterey but even with this upgrade it doesn't work. |
@astratto-agency said:
see the diff at #12581 |
The one-line fix by @christopher-hopper worked great on macOS Catalina. Why is this not in the release? |
Please release this I just wasted days of my life trying to figure out what was going on. Fixed the issue on Monterey. |
@chrisroberts Apologies for the direct ping, but it looks like you're the Hashicorp team member who's been most actively contributing to Vagrant lately. Is there any way a patch release could be made in the near future, so this bug stops biting people? The fix for it was merged back in November and has been proven to work — so it really is just a matter of getting a new release out. We'd all really appreciate it! |
Hey there, this fix has been shipped with Vagrant 2.3.0 🎉 |
Vagrant version
Vagrant 2.2.19
vagrant-vmware-desktop (3.0.1, global)
Host operating system
Mac OS 11.6
Guest operating system
Ubuntu Linux
Vagrantfile
Actual behavior
vagrant up fails with a traceback right after "Exporting NFS shared folders...". The last line of the traceback is:
/opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/plugins/hosts/darwin/cap/path.rb:20:in `resolve_host_path': uninitialized constant VagrantPlugins::HostDarwin::Cap::Version (NameError)
Full traceback: https://gist.github.com/stolowski/bc2e8e0d96540047c575e6c78e5fd530
The text was updated successfully, but these errors were encountered: