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

rebar3 hex user whoami fails with unknown error #345

Open
rlipscombe opened this issue Jan 29, 2025 · 5 comments
Open

rebar3 hex user whoami fails with unknown error #345

rlipscombe opened this issue Jan 29, 2025 · 5 comments

Comments

@rlipscombe
Copy link

rlipscombe commented Jan 29, 2025

rebar3 v3.24.0, rebar3_hex v7.0.8

Running rebar3 hex auth whoami fails with An unknown error was encountered. Run with DIAGNOSTIC=1 for more details.

Running with DIAGNOSTIC=1 reports the following:

===> Running provider: {hex,user}
===> Unknown error: {whoami,
                               {ok,#{<<"full_name">> => ...
@starbelly
Copy link
Member

Thanks for opening the issue. Are you positive you are on 7.0.8? I'm unable to reproduce. Additionally, the command is rebar3 hex user whoami. Trying to run this command on auth should return you Command auth not found in namespace hex

@rlipscombe
Copy link
Author

rlipscombe commented Feb 1, 2025

Sorry, yeah, rebar3 hex user whoami.

(I've updated the issue title)

rlipscombe/vsn_transform [master] % rebar3 hex user whoami
===> Verifying dependencies...
===> An unknown error was encountered. Run with DIAGNOSTIC=1 for more details.

OK, so...

rlipscombe/vsn_transform [master] % DIAGNOSTIC=1 rebar3 hex user whoami
===> Load global config file /Users/rogerlipscombe/.config/rebar3/rebar.config
...
===> Running provider: {hex,user}
===> Unknown error: {whoami,
                               {ok,#{<<"full_name">> => <<"Roger Lipscombe">>,
                                     <<"handles">> =>
                                         #{<<"GitHub">> =>
                                               <<"https://github.com/rlipscombe">>},
...

Are you positive you are on 7.0.8?

Pretty sure, yeah:

rlipscombe/vsn_transform [master] % grep version "$REBAR_CACHE_DIR/plugins/rebar3_hex/hex_metadata.config"
  <<"src/rebar3_hex_version.erl">>]}.
{<<"version">>,<<"7.0.8">>}.

Also this, for completeness:

rlipscombe/vsn_transform [master] % rebar3 version
rebar 3.24.0 on Erlang/OTP 27 Erts 15.1.2

@rlipscombe rlipscombe changed the title rebar3 hex auth whoami fails with unknown error rebar3 hex user whoami fails with unknown error Feb 1, 2025
@starbelly
Copy link
Member

Thanks @rlipscombe Did you edit out the username and email from the response before putting it on here? Quite understandable if you did, however my thought atm, and assuming you're definitely on 7.0.8, is for some reason these two bits of information are not being returned (which would be odd). We match on these fields, if they are not present, then we raise (like you're seeing).

@rlipscombe
Copy link
Author

Did you edit out the username and email from the response before putting it on here?

Well, there's your problem: All of my email addresses (there are two attached to the account) are set to private. I also have "Don't show a public email address" set on the main profile page, in case that also triggers the behaviour. The username is in the response, but there's no email address in there.

@starbelly
Copy link
Member

Well, there's your problem: All of my email addresses (there are two attached to the account) are set to private. I also have "Don't show a public email address" set on the main profile page, in case that also triggers the behaviour. The username is in the response, but there's no email address in there.

That's interesting, I've always expected it to return the email address etc since "your" the one querying it, but I suppose that is not the case. Will get a PR open soon.

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

2 participants