heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

pg:copy fails on Mac OS with "Did not recognize your adapter specification" #2042

Closed ed-norris closed 7 years ago

ed-norris commented 7 years ago

Mac OS X 10.12.1 heroku-toolbelt/3.43.15 (x86_64-darwin10.8.0) ruby/1.9.3 heroku-cli/5.5.5-789c5b7 (darwin-amd64) go1.7.4 You have no installed plugins.

I'm following the database upgrade instructions here https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases

This step fails: heroku pg:copy [source] [color] --app [app]

! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:       Did not recognize your adapter specification (dlopen(/usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext/parser.bundle, 9): Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib

Referenced from: /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext/parser.bundle Reason: Incompatible library version: parser.bundle requires version 14.0.0 or later, but libgmp.10.dylib provides version 13.0.0 - /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext/parser.bundle). (MultiJson::AdapterError) Command: heroku pg:copy [source] [color] --app [app] Version: heroku-toolbelt/3.43.15 (x86_64-darwin10.8.0) ruby/1.9.3 Error ID: c822b919c27540afa471529703554cb3

Seems like a clear case of upgrading libgmp, so I ran "brew upgrade gmp" but that completely breaks the Heroku tool: heroku --version

/usr/local/heroku/vendor/gems/json-1.8.2/lib/json/common.rb:67: [BUG] Segmentation fault ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0]

-- Control frame information ----------------------------------------------- c:0021 p:---- s:0076 b:0076 l:000075 d:000075 CFUNC :initialize c:0020 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :new c:0019 p:0099 s:0071 b:0069 l:000068 d:000068 METHOD /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/common.rb:67 c:0018 p:0090 s:0060 b:0059 l:000058 d:000058 CLASS /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext.rb:17 c:0017 p:0011 s:0057 b:0057 l:000056 d:000056 CLASS /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext.rb:12 c:0016 p:0074 s:0055 b:0055 l:000054 d:000054 TOP /usr/local/heroku/vendor/gems/json-1.8.2/lib/json/ext.rb:9 c:0015 p:---- s:0053 b:0053 l:000052 d:000052 FINISH c:0014 p:---- s:0051 b:0051 l:000050 d:000050 CFUNC :require c:0013 p:0036 s:0047 b:0047 l:000046 d:000046 METHOD /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36 c:0012 p:0027 s:0040 b:0040 l:000039 d:000039 CLASS /usr/local/heroku/vendor/gems/json-1.8.2/lib/json.rb:58 c:0011 p:0021 s:0038 b:0038 l:000037 d:000037 TOP /usr/local/heroku/vendor/gems/json-1.8.2/lib/json.rb:54 c:0010 p:---- s:0036 b:0036 l:000035 d:000035 FINISH c:0009 p:---- s:0034 b:0034 l:000033 d:000033 CFUNC :require c:0008 p:0036 s:0030 b:0030 l:000029 d:000029 METHOD /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36 c:0007 p:0194 s:0023 b:0023 l:000022 d:000022 TOP /usr/local/heroku/lib/heroku/cli.rb:16 c:0006 p:---- s:0021 b:0021 l:000020 d:000020 FINISH c:0005 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :require c:0004 p:0036 s:0015 b:0015 l:000014 d:000014 METHOD /usr/local/heroku/ruby/lib/ruby/1.9.1/rubygems/custom_require.rb:36 c:0003 p:0157 s:0008 b:0008 l:0005c8 d:000e38 EVAL /usr/local/bin/heroku:22 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:0005c8 d:0005c8 TOP

I'm not sure what to do at this point: with gmp 6.0.0a, heroku cannot complete a pg:copy command with gmp 6.1.1, heroku segfaults on the version command

jdx commented 7 years ago

the beta may have a fix for this, can you try heroku update beta?

ed-norris commented 7 years ago

That looks promising - I've already copied the database using my Parallels instance and the Windows CLI, so I can't run the exact command, but heroku pg:copy a b --app [app]

was a reliable way to repro the issue and now I think it's actually attempting to run the command

heroku pg:copy a b --app [app] ▸ Couldn't find that add on.

gmp 6.1.1 still causes a segfault with the Heroku beta but I really don't want to dig into that

ed-norris commented 7 years ago

The beta seems like it would work and I'm no longer able to reproduce the issue (since I've accomplished my task through a different route) - should I close this?

jdx commented 7 years ago

yeah the beta will be launched within the next couple of days