erlef / rebar3_hex

Rebar3 Hex library
Apache License 2.0
101 stars 49 forks source link

Unable to connect to hex.pm:443 #4

Closed sebastiw closed 9 years ago

sebastiw commented 9 years ago

Hi,

I get the following error when authorizing a user. Some paths is modified to keep (some parts of the) information private.

$ DEBUG=1 ./rebar3 hex user auth
===> Load global config file "~/.config/rebar3/rebar.config"
===> Due to a filelib bug in Erlang 17.1 it is recommendedyou update to a newer release.
Username: ([])> sebastiw
Password: 
Generating API key...
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace
===> Uncaught error: {case_clause,
                             {error,
                              {failed_connect,
                               [{to_address,{"hex.pm",443}},
                                {inet,
                                 [inet],
                                 {options,
                                  {socket_options,
                                   [{mode,binary},
                                    {active,false},
                                    inet,
                                    {partial_chain,
                                     #Fun<rebar3_hex_http.1.61525546>}]}}}]}}}
===> Stack trace to the error location: [{rebar3_hex_http,post_json,3,
                                                 [{file,
                                                   "~/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_http.erl"},
                                                  {line,50}]},
                                                {rebar3_hex_user,
                                                 generate_key,2,
                                                 [{file,
                                                   "~/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_user.erl"},
                                                  {line,150}]},
                                                {rebar3_hex_user,do,1,
                                                 [{file,
                                                   "~/.cache/rebar3/plugins/rebar3_hex/src/rebar3_hex_user.erl"},
                                                  {line,50}]},
                                                {rebar_core,do,2,
                                                 [{file,
                                                   "~/SUB/git/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
                                                  {line,124}]},
                                                {rebar_prv_do,do_tasks,2,
                                                 [{file,
                                                   "~/SUB//git/rebar3/_build/default/lib/rebar/src/rebar_prv_do.erl"},
                                                  {line,68}]},
                                                {rebar_core,do,2,
                                                 [{file,
                                                   "~/SUB/git/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
                                                  {line,124}]},
                                                {rebar3,main,1,
                                                 [{file,
                                                   "~/SUB/git/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
                                                  {line,47}]},
                                                {escript,run,2,
                                                 [{file,"escript.erl"},
                                                  {line,752}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
$ ./rebar3 report "./rebar3 hex user auth"
===> Due to a filelib bug in Erlang 17.1 it is recommendedyou update to a newer release.
Rebar3 report
 version 3.0.0-beta-1
 generated at 2015-07-15T22:27:04+00:00
=================
Please submit this along with your issue at https://github.com/rebar/rebar3/issues (and feel free to edit out private information, if any)
-----------------
Task: ./rebar3
Entered as:
  ./rebar3 hex user auth
-----------------
Operating System: x86_64-unknown-linux-gnu
ERTS: Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]
Root Directory: /opt/erlang/17.1/lib/erlang
Library directory: /opt/erlang/17.1/lib/erlang/lib
-----------------
Loaded Applications:
bbmustache: 1.0.1
common_test: 1.8.1
compiler: 5.0.1
crypto: 3.4
erlware_commons: 0.12.0
eunit: 2.2.7
inets: 5.10.2
kernel: 3.0.1
providers: 1.4.1
relx: 3.0.0
sasl: 2.4
stdlib: 2.1
syntax_tools: 1.6.15
tools: 2.6.15

-----------------
Escript path: ~/SUB/git/PROJ/rebar3
Providers:
  app_discovery as clean compile config cover ct cut deps dialyzer do docs edoc escriptize eunit help info install_deps key list lock new owner pkgs publish release relup report search shell tar unlock update upgrade upgrade user version xref 
$ 
tsloughter commented 9 years ago

I noticed ===> Due to a filelib bug in Erlang 17.1 it is recommendedyou update to a newer release. in the output. Could you try a newer 17 or even 18?

sebastiw commented 9 years ago

Ah yes, that solved the stackdump problem, now it only says:

$ ./rebar3 hex user auth
Username: ([])> sebastiw
Password: 
Generating API key...
Generation of API key failed.
$
tsloughter commented 9 years ago

I'll have to improve the logging and error messages but this most likely means your user either isn't registered or the password is wrong.

sebastiw commented 9 years ago

Nice, I re-registered and now it just magically works :+1:

tsloughter commented 9 years ago

Cool, can I close this then?