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

Unexpected token at '' (JSON::ParserError) #10863

Closed
andythsu opened this issue May 17, 2019 · 7 comments
Closed

Unexpected token at '' (JSON::ParserError) #10863

andythsu opened this issue May 17, 2019 · 7 comments

Comments

@andythsu
Copy link

andythsu commented May 17, 2019

Vagrant version

Vagrant 2.2.4

Host operating system

Windows 10

Debug output

https://gist.github.com/andythsu/e7fe6c3411853413252bfee43093ffb0

Expected behavior

It should run the command without error

Actual behavior

C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/json/common.rb:156:in `parse': 751: unexpected token at '' (JSON::ParserError)
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/json/common.rb:156:in `parse'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/vagrantfile.rb:183:in `machine_config'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/vagrantfile.rb:47:in `machine'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:717:in `machine'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/plugin/v2/command.rb:180:in `block in with_target_vms'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/plugin/v2/command.rb:204:in `block in with_target_vms'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/plugin/v2/command.rb:186:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/plugin/v2/command.rb:186:in `with_target_vms'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/plugins/commands/up/command.rb:87:in `execute'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/cli.rb:66:in `execute'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:292:in `cli'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/bin/vagrant:182:in `<main>'

Steps to reproduce

  1. vagrant up runbox

Notes

I have tried to uninstall vagrant, delete ~/.vagrand.d folder, and install vagrant again. The error still persists

@briancain
Copy link
Member

Hi there @andythsu - It looks like the debug log you provided does not contain the error mentioned. Do you have the debug log showing the JSON error? Also do you have a Vagrantfile? Thanks.

@andythsu
Copy link
Author

Hi there @andythsu - It looks like the debug log you provided does not contain the error mentioned. Do you have the debug log showing the JSON error? Also do you have a Vagrantfile? Thanks.

Hi Brian, the debug log does not show the JSON error unfortunately, and I am not able to provide a vagrant file as it contains sensitive information. Do you really need to see the Vagrantfile?

@andythsu
Copy link
Author

@briancain Also, I have updated the gist, it should show the JSON error now

@briancain
Copy link
Member

@andythsu Have you tried removing the local .vagrant directory inside your project directory?

@andythsu
Copy link
Author

@briancain ya.. I deleted it and re-ran the command. It's proceeding without the error anymore. Hopefully it doesn't happen again. Thank you

@briancain
Copy link
Member

@andythsu - thanks! Sounds good. Sometimes that file gets corrupted but it isn't really clear how it happens. The best fix is usually just removing it and Vagrant is typically good to go! If it happens again and you figure out how it happens feel free to open another issue.

@ghost
Copy link

ghost commented Apr 1, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants