Closed russel closed 6 years ago
I see a similar parsing error with a different backtrace when I brew search <thing>
. It also happens when I brew info <thing>
if <thing>
is not an available formula.
In each instance, here and in #716, I see Error: <a number>: unexpected token
from:
/path-to-ruby-2.3.0/json/common.rb:156:in `parse'
/path-to-ruby-2.3.0/json/common.rb:156:in `parse'
.linuxbrew/Homebrew/Library/Homebrew/tap.rb:513:in `tap_migrations'
.linuxbrew/Homebrew/Library/Homebrew/tap.rb:655:in `tap_migrations'
Unlike what @thedrow and @russel reported, my brew
commands seem to work OK if they don't use that code path. Even when brew search
emits the error, it searches and returns some results first. Here's my brew update
and brew doctor
:
$ brew update
Already up-to-date.
$ brew doctor
Your system is ready to brew.
Here are the two ways I've received the error:
$ brew search tmux ==> Searching local taps... tmux ✔ tmux-mem-cpu-load tmuxinator-completion tmux-cssh tmux-xpanes ==> Searching taps on GitHub... ==> Searching blacklisted, migrated and deleted formulae... Error: 784: unexpected token at '{ "adobe-air-sdk": "homebrew/cask", "android-ndk": "homebrew/cask", "android-platform-tools": "homebrew/cask", "android-sdk": "homebrew/cask", "app-engine-go-32": "homebrew/cask/google-cloud-sdk", "app-engine-go-64": "homebrew/cask/google-cloud-sdk", "auctex": "homebrew/tex", "avidemux": "homebrew/cask", "awsenv": "Luzifer/tools", "chromedriver": "homebrew/cask", "cloudfoundry-cli": "pivotal/tap", "cmucl": "homebrew/cask", "crystax-ndk": "homebrew/cask", "corelocationcli": "homebrew/cask", "dart": "dart-lang/dart", "dbt": "fishtown-analytics/dbt", "dwarf-fortress": "homebrew/cask", "geany": "homebrew/cask", "gimp": "homebrew/cask", "grads": "homebrew/cask", "gtkwave": "homebrew/cask", "helios": "spotify/public", "hexchat": "homebrew/cask", "horndis": "homebrew/cask", "inkscape": "homebrew/cask", "jsl": "homebrew/cask", "kdiff3": "homebrew/cask", "keybase": "homebrew/cask", "magit": "dunn/emacs", "meld": "homebrew/cask", "osxfuse": "homebrew/cask", "pdf-tools": "dunn/emacs", "pebble-sdk": "pebble/pebble-sdk", "quassel": "homebrew/cask", "sqlitebrowser": "homebrew/cask", "transmission-remote-gtk": "homebrew/cask/transmission-remote-gui", "tuntap": "homebrew/cask" "iotop": "linuxbrew/extra", "libpipeline": "linuxbrew/extra", "man-db": "linuxbrew/extra", "strace": "linuxbrew/extra", } ' Please report this bug: https://github.com/Linuxbrew/brew/wiki/troubleshooting /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/json/common.rb:156:in `parse' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/json/common.rb:156:in `parse' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:513:in `tap_migrations' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:655:in `tap_migrations' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:93:in `block in tap_migration_reason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:531:in `block (2 levels) in each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:530:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:530:in `block in each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:529:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:529:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:92:in `tap_migration_reason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:7:in `reason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/search.rb:67:in `search' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:101:in `<main>'
$ brew info nope Error: No available formula with the name "nope" Error: 784: unexpected token at '{ "adobe-air-sdk": "homebrew/cask", "android-ndk": "homebrew/cask", "android-platform-tools": "homebrew/cask", "android-sdk": "homebrew/cask", "app-engine-go-32": "homebrew/cask/google-cloud-sdk", "app-engine-go-64": "homebrew/cask/google-cloud-sdk", "auctex": "homebrew/tex", "avidemux": "homebrew/cask", "awsenv": "Luzifer/tools", "chromedriver": "homebrew/cask", "cloudfoundry-cli": "pivotal/tap", "cmucl": "homebrew/cask", "crystax-ndk": "homebrew/cask", "corelocationcli": "homebrew/cask", "dart": "dart-lang/dart", "dbt": "fishtown-analytics/dbt", "dwarf-fortress": "homebrew/cask", "geany": "homebrew/cask", "gimp": "homebrew/cask", "grads": "homebrew/cask", "gtkwave": "homebrew/cask", "helios": "spotify/public", "hexchat": "homebrew/cask", "horndis": "homebrew/cask", "inkscape": "homebrew/cask", "jsl": "homebrew/cask", "kdiff3": "homebrew/cask", "keybase": "homebrew/cask", "magit": "dunn/emacs", "meld": "homebrew/cask", "osxfuse": "homebrew/cask", "pdf-tools": "dunn/emacs", "pebble-sdk": "pebble/pebble-sdk", "quassel": "homebrew/cask", "sqlitebrowser": "homebrew/cask", "transmission-remote-gtk": "homebrew/cask/transmission-remote-gui", "tuntap": "homebrew/cask" "iotop": "linuxbrew/extra", "libpipeline": "linuxbrew/extra", "man-db": "linuxbrew/extra", "strace": "linuxbrew/extra", } ' Please report this bug: https://github.com/Linuxbrew/brew/wiki/troubleshooting /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_ 2/lib/ruby/2.3.0/json/common.rb:156:in `parse' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_ 2/lib/ruby/2.3.0/json/common.rb:156:in `parse' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:513:in `tap_migratio ns' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:655:in `tap_migratio ns' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:93:in `b lock in tap_migration_reason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:531:in `block (2 lev els) in each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:530:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:530:in `block in eac h' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:529:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/tap.rb:529:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:92:in `t ap_migration_reason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/missing_formula.rb:7:in `re ason' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:63:in `rescue i n block in print_info' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:54:in `block in print_info' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:52:in `each' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:52:in `each_wit h_index' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:52:in `print_in fo' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/info.rb:41:in `info' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:101:in `<main>'
in my case tap_migrations.json
from homebrew-core
had a comma out of place. I made the below change and no longer get the error:
$ git diff
diff --git a/tap_migrations.json b/tap_migrations.json
index b924c66..95ac615 100644
--- a/tap_migrations.json
+++ b/tap_migrations.json
@@ -35,9 +35,9 @@
"quassel": "homebrew/cask",
"sqlitebrowser": "homebrew/cask",
"transmission-remote-gtk": "homebrew/cask/transmission-remote-gui",
- "tuntap": "homebrew/cask"
+ "tuntap": "homebrew/cask",
"iotop": "linuxbrew/extra",
"libpipeline": "linuxbrew/extra",
"man-db": "linuxbrew/extra",
- "strace": "linuxbrew/extra",
+ "strace": "linuxbrew/extra"
}
I'll put that in a Pull Request on Linuxbrew/homebrew-core
shortly..
Running brew doctor results in: