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

elm publish - tried to fetch https://package.elm-lang.org... "But it came back as 413 Request Entity Too Large" #2299

Open
nunntom opened this issue Mar 3, 2023 · 9 comments

Comments

@nunntom
Copy link

nunntom commented Mar 3, 2023

I just tried to publish a shiny new package and got this error:

SSCCE

This package has never been published before. Here's how things work:

  - Versions all have exactly three parts: MAJOR.MINOR.PATCH

  - All packages start with initial version 1.0.0

  - Versions are incremented based on how the API changes:

        PATCH = the API is the same, no risk of breaking code
        MINOR = values have been added, existing values are unchanged
        MAJOR = existing values have been changed or removed

  - I will bump versions for you, automatically enforcing these rules


I will now verify that everything is in order...

  ● Found README.md      
  ● Found LICENSE      
  ● Verified documentation    
  ● All packages start at version 1.0.0                  
  ● Version 1.0.0 is tagged on GitHub 
  ● No uncommitted changes in local code
  ● Code downloaded successfully from GitHub
  ● Downloaded code compiles successfully

-- PROBLEM PUBLISHING PACKAGE --------------------------------------------------

I need to send information about your package to the package website, so I tried
to fetch:

    https://package.elm-lang.org/register?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=4269021e2a9a93b124c5dc2175037258ebfb7e03

But it came back as 413 Request Entity Too Large

This may mean some online endpoint changed in an unexpected way, so if does not
seem like something on your side is causing this (e.g. firewall) please report
this to https://github.com/elm/compiler/issues with your operating system, Elm
version, the command you ran, the terminal output, and any additional
information that can help others reproduce the error!

What do I need to do to get this package published?

  • Elm: 0.19.1
  • Operating System: Linux
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions in a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

@lue-bird
Copy link

lue-bird commented Mar 3, 2023

I don't think it will work but maybe you can get more information by trying to publish with elm 0.19.0?

At least that works for some projects with some sort of package json parsing error - though that seems to be unrelated to your issue

@nunntom
Copy link
Author

nunntom commented Mar 3, 2023

Sadly it didn't work. The error was a little different but not much more useful:

-- HTTP PROBLEM ----------------------------------------------------------------

The following HTTP request failed:

    <https://package.elm-lang.org/register?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=30fc0bf1d46052c0140ca31ab2db141a31464350>

Here is the error message I was able to extract:

    HttpExceptionRequest Request { host = "package.elm-lang.org" port = 443
    secure = True requestHeaders = [("Content-Type","multipart/form-data;
    boundary=----WebKitFormBoundaryNNoMKxsybCEQ7soS"),("User-Agent","elm/0.19.0"),("Accept-Encoding","gzip")]
    path = "/register" queryString =
    "?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=30fc0bf1d46052c0140ca31ab2db141a31464350"
    method = "POST" proxy = Nothing rawBody = False redirectCount = 10
    responseTimeout = ResponseTimeoutNone requestVersion = HTTP/1.1 }
    (StatusCodeException (Response {responseStatus = Status {statusCode = 413,
    statusMessage = "Request Entity Too Large"}, responseVersion = HTTP/1.1,
    responseHeaders = [("Server","nginx/1.10.3 (Ubuntu)"),("Date","Fri, 03 Mar
    2023 21:27:58
    GMT"),("Content-Type","text/html"),("Content-Length","208"),("Connection","close")],
    responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' =
    ResponseClose}) "<html>\r\n<head><title>413 Request Entity Too
    Large</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>413 Request
    Entity Too Large</h1></center>\r\n<hr><center>nginx/1.10.3
    (Ubuntu)</center>\r\n</body>\r\n</html>\r\n")

@bburdette
Copy link

maybe too much in your repo? elm-stuff folder is checked in, or something like that?

@nunntom
Copy link
Author

nunntom commented Mar 23, 2023

maybe too much in your repo? elm-stuff folder is checked in, or something like that?

Nothing like that checked in. I've now tried removing all extraneous codegen and npm stuff, leaving only the barebones elm. Still it fails with the same message.

The full repo is 4.2mb. Is it not possible to publish a library of this size?

@rektdeckard
Copy link

rektdeckard commented Mar 23, 2023

@nunntom You might want to try increasing the git http post buffer size, as this failure seems to be happening when the CLI posts the automatic version commit to your repo:

git config --global http.postBuffer 1048576000

This, then downgrading to 0.19.0 worked for me.

@nunntom
Copy link
Author

nunntom commented Mar 23, 2023

@rektdeckard Thanks for the suggestion, sadly this didn't work in my case. :(

@nunntom
Copy link
Author

nunntom commented Mar 24, 2023

Update.

By checking the source of elm publish I found out that it sends a POST request to the package server with a payload containing among other things the docs.json. I stripped out all the doc comments from most of the functions and now with elm 19.0.0 I get this message which is a little more helpful:

The following HTTP request failed:

    <https://package.elm-lang.org/register?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=494a8b30db6be9855a27578e22928ddba686ad00>

Here is the error message I was able to extract:

    HttpExceptionRequest Request { host = "package.elm-lang.org" port = 443
    secure = True requestHeaders = [("Content-Type","multipart/form-data;
    boundary=----WebKitFormBoundaryAkTA1zJbXHtGn1O6"),("User-Agent","elm/0.19.0"),("Accept-Encoding","gzip")]
    path = "/register" queryString =
    "?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=494a8b30db6be9855a27578e22928ddba686ad00"
    method = "POST" proxy = Nothing rawBody = False redirectCount = 10
    responseTimeout = ResponseTimeoutNone requestVersion = HTTP/1.1 }
    (StatusCodeException (Response {responseStatus = Status {statusCode = 400,
    statusMessage = "Bad Request"}, responseVersion = HTTP/1.1, responseHeaders
    = [("Server","nginx/1.10.3 (Ubuntu)"),("Date","Fri, 24 Mar 2023 10:06:37
    GMT"),("Transfer-Encoding","chunked"),("Connection","keep-alive")],
    responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' =
    ResponseClose}) "Failure uploading your package:\n - Your docs.json is too
    big. Must be less than 768kb.\nLet us know if this limit is too low!")

Compare this with the less helpful message on 0.19.1

-- PROBLEM PUBLISHING PACKAGE --------------------------------------------------

I need to send information about your package to the package website, so I tried
to fetch:

    https://package.elm-lang.org/register?name=nunntom/elm-material-icons&version=1.0.0&commit-hash=ba7dcc73ca09f47aec70b9def788d34d1dad73ac

But it came back as 400 Bad Request

This may mean some online endpoint changed in an unexpected way, so if does not
seem like something on your side is causing this (e.g. firewall) please report
this to https://github.com/elm/compiler/issues with your operating system, Elm
version, the command you ran, the terminal output, and any additional
information that can help others reproduce the error!

It would probably be more useful to stick to at least passing through the error message from the package server.

I'll report this on the package server repo.

@nunntom
Copy link
Author

nunntom commented Mar 24, 2023

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

4 participants