Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. vdubrovskyi_1854
    3. Posts
    V
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by vdubrovskyi_1854

    • Composer Feed: InvalidPackageException (Missing required property: name) when caching zip artifact causes 404

      Hello,

      We are experiencing an issue with a Composer feed configured as a proxy for Packagist. While running composer install, our local Composer clients receive a 404 Not Found error specifically when attempting to download the .zip distribution of the package voku/simple_html_dom (version 4.8.10).

      Steps to Reproduce:

      • Configure a ProGet feed (composer-public-unvetted) as a Composer proxy to Packagist.

      • list itemRun composer require voku/simple_html_dom:4.8.10 or include it in composer.json and run composer install.

      • The Composer client successfully retrieves the package metadata (JSON) from list itemProGet.

      • The client then attempts to download the artifact .zip file.

      • The download fails with an HTTP 404 error returned by ProGet.

      Diagnosis & Server Logs:
      Upon inspecting the ProGet server logs, it appears that ProGet successfully downloads the package from the upstream source but fails to cache it locally. The internal parser throws an InvalidPackageException because it cannot locate the "name" property inside the package's manifest (composer.json). Because the caching process fails, ProGet returns a 404 to the requesting client.

      Here is the exact stack trace from the ProGet diagnostic logs:

      pg-1  |       Request starting HTTP/1.1 GET http://get.dev.com/composer/composer-public-unvetted/download/voku/simple_html_dom/4.8.10.zip - - -
      pg-1  | An error occurred while attempting to cache pkg:composer/voku/simple_html_dom@4.8.10:File is not a valid manifest file.
      pg-1  | Inedo.ProGet.InvalidPackageException: File is not a valid manifest file.
      pg-1  |  ---> Inedo.ProGet.InvalidPackageException: Missing required property: name
      pg-1  |    at Inedo.ProGet.Feeds.Composer.ComposerManifest..ctor(JsonElement root, String version, Boolean cloneElement) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E654949\Src\src\ProGet\Feeds\Composer\ComposerManifest.cs:line 44
      pg-1  |    at Inedo.ProGet.Feeds.Composer.ComposerManifest.Inedo.ProGet.Feeds.IPackageManifest<Inedo.ProGet.Feeds.Composer.ComposerManifest>.ReadAndParseMetadataFromPackage(Stream packageStream, PackageInstallContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E654949\Src\src\ProGet\Feeds\Composer\ComposerManifest.cs:line 237
      pg-1  |    --- End of inner exception stack trace ---
      pg-1  |    at Inedo.ProGet.Feeds.Composer.ComposerManifest.Inedo.ProGet.Feeds.IPackageManifest<Inedo.ProGet.Feeds.Composer.ComposerManifest>.ReadAndParseMetadataFromPackage(Stream packageStream, PackageInstallContext context) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E654949\Src\src\ProGet\Feeds\Composer\ComposerManifest.cs:line 242
      pg-1  |    at Inedo.ProGet.Feeds.PackageFeed`5.AddPackageAsync(Stream stream, InstallPackageOptions options, PackageInstallContext context, Nullable`1 publishDate, Boolean listed, CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E654949\Src\src\ProGet\Feeds\PackageFeed.PackageAdd.cs:line 67
      pg-1  |    at Inedo.ProGet.Feeds.PackageFeed`5.AddPackageAsync(Stream stream, InstallPackageOptions options, PackageInstallContext context, Nullable`1 publishDate, Boolean listed, CancellationToken cancellationToken) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E654949\Src\src\ProGet\Feeds\PackageFeed.PackageAdd.cs:line 152
      pg-1  |    at Inedo.ProGet.Feeds.PackageFeed`5.DownloadPackageAsync(TPackage package, IPackageDownloadContext context, OpenPackageOptions options, PackageInstallContext installContext, CancellationToken cancellationToken)
      pg-1  | A 404 error occurred in composer-public-unvetted: Package simple_html_dom 4.8.10 not found.
      pg-1  | An error occurred processing a GET request to http://get.dev.com/composer/composer-public-unvetted/download/voku/simple_html_dom/4.8.10.zip: Package simple_html_dom 4.8.10 not found.
      pg-1  | info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      pg-1  |       Request finished HTTP/1.1 GET http://get.dev.com/composer/composer-public-unvetted/download/voku/simple_html_dom/4.8.10.zip - 404 1230 application/json 127.5770ms
      

      Expected Behavior:

      ProGet should accurately extract the composer.json from the upstream artifact, bypass strict validation if upstream parsing differs, or gracefully handle the artifact caching so the Composer client can successfully download the .zip file. The package is completely valid and installs normally when downloading directly from Packagist.

      Could you please investigate why the ComposerManifest parser is failing on this specific package and provide a solution or workaround to prevent it from failing the entire cache operation?

      Thank you!

      posted in Support
      V
      vdubrovskyi_1854
    • RE: Composer feed: metapackage is not saved as a local package

      Yes, that's all logical. But it completely breaks the approach with promotion. I can't promote a package that doesn't exist.

      Why doesn't proget cache the metadata of a package without zip?

      posted in Support
      V
      vdubrovskyi_1854
    • Composer feed: metapackage is not saved as a local package

      Hello.
      I keep trying to use composer feed in a real project.
      There are packages with the metapackage type in composer. If you install such a package from a feed that has a connector on packagest.org, then such a package is not saved in proget as a local package. There is no corresponding folder in vendors, although it is in composer.lock.

      For example:

      composer reinstall -vvv --prefer-dist --no-scripts symfony/polyfill-php70
      

      But if you try to download the zip of such a package directly, the package appears.

      I think this is a mistake. All packages that are in composer.lock must be stored in proget.

      Thank you.

      posted in Support
      V
      vdubrovskyi_1854
    • 1 / 1