hexpm / hex

Package manager for the Erlang ecosystem.
https://hex.pm
973 stars 186 forks source link

Publishing appears to be successful but package does not appear in hex index #792

Closed kipcole9 closed 4 years ago

kipcole9 commented 4 years ago

I published a new library with what appears to be success (including the confirming email) but the package does not appear in the index.

Current behaviour

Package is reported published but is not in the index.

kip@Kips-iMac-Pro text_corpus_udhr % MIX_ENV=release mix hex.publish
Building text_corpus_uhdr 0.1.0
.... 
Building docs...
Generating docs...
View "html" docs at "doc/index.html"
View "epub" docs at "doc/Text Corpus UDHR.epub"
Local password: 
Publishing package...
[#########################] 100%
Package published to https://hex.pm/packages/text_corpus_uhdr/0.1.0 (4277c981e4e355300a71bea0f9955659c54fd2ba28659b45c66d1d5ff48ae6c9)
Publishing docs...
[#########################] 100%
Docs published to https://hexdocs.pm/text_corpus_uhdr/0.1.0
kip@Kips-iMac-Pro text_corpus_udhr % mix hex.info text_corpus_udhr
No package with name text_corpus_udhr
kip@Kips-iMac-Pro text_corpus_udhr % ls -al text_corpus_uhdr-0.1.0.tar 
-rw-r--r--  1 kip  staff  8091136 30 Jun 05:45 text_corpus_uhdr-0.1.0.tar

Expected result

If success is reported the package should be in the index, otherwise an error should be returned.

Full output

kip@Kips-iMac-Pro text_corpus_udhr % mix local.hex
Found existing entry: /Users/kip/.asdf/installs/elixir/1.10.3-otp-23/.mix/archives/hex-0.20.5
Are you sure you want to replace it with "https://repo.hex.pm/installs/1.10.0/hex-0.20.5.ez"? [Yn] 
* creating /Users/kip/.asdf/installs/elixir/1.10.3-otp-23/.mix/archives/hex-0.20.5
kip@Kips-iMac-Pro text_corpus_udhr % MIX_ENV=release mix hex.publish
Building text_corpus_uhdr 0.1.0
  Dependencies:
    text ~> 0.2 (app: text)
  App: text_corpus_uhdr
  Name: text_corpus_uhdr
  Files:
    lib
    lib/udhr_corpus.ex
    lib/vocabulary
    lib/vocabulary/udhr
    lib/vocabulary/udhr/bigram.ex
    lib/vocabulary/udhr/quadgram.ex
    lib/vocabulary/udhr/multigram.ex
    priv
    priv/vocabulary
    priv/vocabulary/udhr_languages.etf
    priv/vocabulary/udhr_quadgram.etf
    priv/vocabulary/udhr_multigram.etf
    priv/vocabulary/udhr_bigram.etf
    mix.exs
    README.md
    CHANGELOG.md
    LICENSE.md
  Version: 0.1.0
  Build tools: mix
  Description: Corpus for the `Text` library from the Universal Declaration of Human Rights.
  Licenses: Apache 2.0
  Links: 
    Changelog: https://github.com/kipcole9/text_corpus_udhr/blob/v0.1.0/CHANGELOG.md
    GitHub: https://github.com/kipcole9/text_corpus_udhr
    Readme: https://github.com/kipcole9/text_corpus_udhr/blob/v0.1.0/README.md
  Elixir: ~> 1.8
Before publishing, please read the Code of Conduct: https://hex.pm/policies/codeofconduct

Publishing package to public repository hexpm.

Proceed? [Yn] 
Building docs...
Generating docs...
View "html" docs at "doc/index.html"
View "epub" docs at "doc/Text Corpus UDHR.epub"
Local password: 
Publishing package...
[#########################] 100%
Package published to https://hex.pm/packages/text_corpus_uhdr/0.1.0 (4277c981e4e355300a71bea0f9955659c54fd2ba28659b45c66d1d5ff48ae6c9)
Publishing docs...
[#########################] 100%
Docs published to https://hexdocs.pm/text_corpus_uhdr/0.1.0
kip@Kips-iMac-Pro text_corpus_udhr % mix hex.info text_corpus_udhr
No package with name text_corpus_udhr
kip@Kips-iMac-Pro text_corpus_udhr % ls -al text_corpus_uhdr-0.1.0.tar 
-rw-r--r--  1 kip  staff  8091136 30 Jun 05:45 text_corpus_uhdr-0.1.0.tar
ericmj commented 4 years ago

It shows up for me when running mix hex.info text_corpus_uhdr. Do you have any custom configuration to other repositories? What does mix hex.config show?

wojtekmach commented 4 years ago

I think something is wrong, because mix hex.info text_corpus_uhdr was erroring for me before, but now it is OK. However, this errors:

% mix hex.package fetch text_corpus_udhr 0.1.0
Failed to fetch record for 'hexpm/text_corpus_udhr' from registry (using cache instead)
** (Mix) Downloading https://repo.hex.pm/tarballs/text_corpus_udhr-0.1.0.tar failed:

Request failed (403)
This could be because the package does not exist, it was spelled incorrectly or you don't have permissions to it
ericmj commented 4 years ago

The tarball is created in memory so it's also strange that you have a package tarball in your local directory after publishing. What does mix hex.info show?

kipcole9 commented 4 years ago

@ericmj I created the tarball with mix hex.build and also checked it with mix hex.build --unpack -o some_dir. Sorry for the confusion.

The output of mix hex.info is above and reproduced here:

kip@Kips-iMac-Pro text_corpus_udhr % mix hex.info text_corpus_udhr
No package with name text_corpus_udhr
kipcole9 commented 4 years ago

Output of mix hex.info:

kip@Kips-iMac-Pro text_corpus_udhr % mix hex.info                     
Hex:    0.20.5
Elixir: 1.10.3
OTP:    23.0.2

Built with: Elixir 1.10.0 and OTP 21.3
kipcole9 commented 4 years ago

And mix hex.config. Noting that this is the same config for all my libs, none of which exhibit this strange issue.

kip@Kips-iMac-Pro text_corpus_udhr % mix hex.config
api_key: nil (default)
api_url: "https://hex.pm/api" (default)
cacerts_path: nil (default)
diff_command: "git diff --no-index __PATH1__ __PATH2__" (default)
home: "/Users/kip/.hex" (default)
http_concurrency: 8 (default)
http_proxy: nil (default)
http_timeout: nil (default)
https_proxy: nil (default)
mirror_url: nil (default)
no_verify_repo_origin: false (default)
offline: false (default)
repos_key: nil (default)
resolve_verbose: false (default)
unsafe_https: false (default)
unsafe_registry: false (default)
kipcole9 commented 4 years ago

Just a couple of notes in case it helps:

  1. I first published yesterday and only discovered this issue trying to use the package as a dependency today. I have published twice again today, both showing success
  2. I have never had mix hex.info text_corpus_udhr return a successful result
ericmj commented 4 years ago

You are spelling the package wrong: text_corpus_udhr vs text_corpus_uhdr.

kipcole9 commented 4 years ago

Thats really really embarrassing Eric, sorry for bothering you. I actually spelled the name in mix.exs incorrectly.

ericmj commented 4 years ago

No worries, I do the same thing all the time. Glad we didn't have a very weird bug :)