alco / porcelain

Work with external processes like a boss

Home Page:http://hexdocs.pm/porcelain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goon protocol version error

ericmj opened this issue · comments

Getting the following error when trying to use the goon driver:

Could not start application porcelain: Porcelain.App.start(:normal, []) returned an error: "goon executable at /... does not support protocol version 2.0"

What does goon -v say? Protocol version 2.0 is available since goon v1.1.0

goon -v returns 1.1.1.

Should work. Could it be the case you have multiple goon executables on your system?

You can also do an isolated test: clone porcelain repo, check it out at the version you're using and put your goon executable into the project root. Then run iex -S mix. To make sure it uses goon, you can also add this to config.exs:

config :porcelain, :driver, Porcelain.Driver.Goon

It works for me in porcelain:master with goon:master.

It works when inside porcelain, but using the same goon executable doesn't work inside my project. Using porcelain v2.0.0.

@ericmj Can you reproduce it in a test project? Or is your project available publicly?

Testing under Windows. Looks like there is an issue with the ackstr. The crypto.rand_bytes seems to produce bytes outside of the ascii range. When passed through cmd.exe, they get munged. Any passes on this test is luck of the draw for getting a ackstr that is completely printable.

Examples of some ackstr values, and the return
<<54, 32, 160, 59, 62, 259, 53,2>> != <<54, 21, 194, 160, 59, 62, 195, 185, 53, 2>>
<<129, 4, 10, 49, 88, 109, 87, 65>> != <<194, 129, 4, 10, 49, 88, 109, 87, 65>>
<<105, 56, 35, 107, 207, 37, 28, 71>> != <<105, 56, 35, 107, 195, 143, 37, 28, 71>>

If I stub the ackstr to a static string that is printable, it passes the version check.

@critch Thanks for the info! I can't say when I'll be able to address this, but I'll look into it at some point.

@alco If you even have an idea you wish to toss out, I can spend a little time working on it at some point.

I had a similar problem, downloaded latest release from the goon repo for linux_amd64.
Got a protocol error launching porcelain.

I then pulled the goon repo, and built from source myself.
No longer receiving protocol error when launching porcelain app.

Might want to double check the release builds of goon are OK.

@harmon25 Thanks for the info, I'll have to check it.

Downloaded goon version 1.1.1 for windows 64. goon -v still shows 1.1.0,
moreover for iex, it shows "goon.exe does not support protocol version 2.0"

I was having this error when running elixir tests when my goon path was inside my elixir project.

Changing:

git clone https://github.com/alco/goon.git && cd goon && go build && export PATH=$PATH:"$(pwd)" && cd -

To:

git clone https://github.com/alco/goon.git $HOME/goon && cd $HOME/goon && go build && export PATH=$PATH:"$(pwd)" && cd -

Fixed the error for me.

Not sure if this is the problem others are having though.