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

UndefinedFunctionError after updating hackney and excoveralls the to latest version #99

Closed
AndrewDryga opened this issue May 29, 2017 · 2 comments

Comments

@AndrewDryga
Copy link
Contributor

$ mix coveralls.travis --exclude pending
Excluding tags: [:pending]
....
Finished in 0.2 seconds
4 tests, 0 failures
Randomized with seed 797741
** (UndefinedFunctionError) function :hackney.start/0 is undefined or private. Did you mean one of:
      * start_response/1
    (hackney) :hackney.start()
    (excoveralls) lib/excoveralls/poster.ex:25: ExCoveralls.Poster.send_file/2
    (excoveralls) lib/excoveralls/poster.ex:13: ExCoveralls.Poster.execute/2
    (mix) lib/mix/tasks/test.ex:245: Mix.Tasks.Test.run/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/task.ex:326: Mix.Task.run_alias/3
    (mix) lib/mix/task.ex:259: Mix.Task.run/2
    (excoveralls) lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:370: Code.require_file/2
The command "mix coveralls.travis --exclude pending" exited with 1.

mix.lock: https://github.com/Nebo15/digital_signature.api/blob/62fa1b688dfabb542400b7ef110e18dab50caa44/mix.lock

@cabol
Copy link

cabol commented May 30, 2017

I'm having the same issue with mix coveralls.travis, what I've found is it might be because the hackney dependency hasn't been updated in your mix.lock, currently is locked to 1.6.5 and your project works. But in this case that we use excoveralls as dependency, hackney version 1.8.4 is fetched and then the error comes up:

** (UndefinedFunctionError) function :hackney.start/0 is undefined or private. Did you mean one of:

      * start_response/1

    :hackney.start()
    lib/excoveralls/poster.ex:25: ExCoveralls.Poster.send_file/2
    lib/excoveralls/poster.ex:13: ExCoveralls.Poster.execute/2
    (mix) lib/mix/tasks/test.ex:245: Mix.Tasks.Test.run/1
    (mix) lib/mix/task.ex:300: Mix.Task.run_task/3
    lib/mix/tasks.ex:54: Mix.Tasks.Coveralls.do_run/2
    (mix) lib/mix/task.ex:300: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
    (elixir) lib/code.ex:370: Code.require_file/2

This is the line that cause the error: https://github.com/parroty/excoveralls/blob/master/lib/excoveralls/poster.ex#L25

A possible fix might be replace that line by:

Application.ensure_all_started(:hackney)

Thanks, stay tuned!

parroty added a commit that referenced this issue May 30, 2017
@parroty
Copy link
Owner

parroty commented May 30, 2017

Thanks for the report and analysis, I've tried to update the code as suggested (will push to hex too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants