Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Rust Crates are uploaded with an incorrect compression method



  • Apologies if this is in a correct format/too much information, but the forums guide just led to the Inedo website.

    When uploading via cargo publish, the published crates are unable to be viewed in the versions tab and are unable to be downloaded. The same crate packaged using cargo package is able to be uploaded manually fine and viewed/downloaded/etc. There are no errors within the actual act of cargo publish, and the verbose logs do not point to anything out of the unordinary.

    Hex dump of the crate uploaded to ProGet:

    00000000  99 06 00 00 7b 22 6e 61  6d 65 22 3a 22 62 72 69  |....{"name":"bri|
    00000010  64 67 65 22 2c 22 76 65  72 73 22 3a 22 30 2e 31  |dge","vers":"0.1|
    00000020  2e 30 22 2c 22 64 65 70  73 22 3a 5b 7b 22 6f 70  |.0","deps":[{"op|
    00000030  74 69 6f 6e 61 6c 22 3a  66 61 6c 73 65 2c 22 64  |tional":false,"d|
    00000040  65 66 61 75 6c 74 5f 66  65 61 74 75 72 65 73 22  |efault_features"|
    00000050  3a 74 72 75 65 2c 22 6e  61 6d 65 22 3a 22 62 72  |:true,"name":"br|
    00000060  69 64 67 65 2d 6c 6f 67  67 65 72 22 2c 22 66 65  |idge-logger","fe|
    00000070  61 74 75 72 65 73 22 3a  5b 22 70 61 6e 69 63 22  |atures":["panic"|
    00000080  5d 2c 22 76 65 72 73 69  6f 6e 5f 72 65 71 22 3a  |],"version_req":|
    00000090  22 5e 31 2e 30 2e 30 22  2c 22 74 61 72 67 65 74  |"^1.0.0","target|
    000000a0  22 3a 6e 75 6c 6c 2c 22  6b 69 6e 64 22 3a 22 6e  |":null,"kind":"n|
    000000b0  6f 72 6d 61 6c 22 2c 22  72 65 67 69 73 74 72 79  |ormal","registry|
    

    Hex dump of the same crate packaged with cargo package:

    00000000  1f 8b 08 08 00 00 00 00  02 ff 62 72 69 64 67 65  |..........bridge|
    00000010  2d 6c 6f 67 67 65 72 2d  31 2e 30 2e 30 2e 63 72  |-logger-1.0.0.cr|
    00000020  61 74 65 00 ed 5c fd 73  db c4 d6 e6 67 cf e4 7f  |ate..\.s....g...|
    00000030  58 5c 06 6c 70 ec c4 76  9c d6 fd 7a 43 92 96 f0  |X\.lp..v...zC...|
    00000040  a6 b4 93 84 cb f0 76 32  46 96 d6 f6 12 49 2b b4  |......v2F....I+.|
    00000050  52 5c 03 f9 df df e7 9c  95 64 c9 76 da 72 6f e9  |R\.......d.v.ro.|
    00000060  00 37 86 69 ad d5 7e 9c  ef f3 9c 23 b9 e3 58 79  |.7.i..~....#..Xy|
    00000070  53 b9 ed eb e9 54 c6 db  bb ed 9d f6 4e a7 ed 3a  |S....T......N..:|
    00000080  f1 54 8f ae 5d 33 52 e1  44 b7 7f 36 3a fc e4 3f  |.T..]3R.D..6:..?|
    00000090  f8 ec e0 33 e8 f7 37 8e  d3 67 77 b0 5b 7c c7 15  |...3..7..gw.[|..|
    000000a0  be ef f6 f6 fa f8 fb 93  8f f0 49 4d e2 c4 42 7c  |..........IM..B||
    000000b0  f2 5f fa f9 ad 26 44 7d  aa 92 fa 50 d0 57 5c 98  |._...&D}...P.W\.|
    

    ProGet error (only when trying to view the files)

    An error occurred in the web application: The archive entry was compressed using an unsupported compression method.
    
    URL: http://stage.pub.rip/feeds/rs/bridge/0.1.0/files
    Referrer: https://stage.pub.rip/feeds/rs/bridge/0.1.0
    User: Admin
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
    Stack trace:    at System.IO.Compression.Inflater.Inflate(FlushCode flushCode)
       at System.IO.Compression.Inflater.ReadInflateOutput(Byte* bufPtr, Int32 length, FlushCode flushCode, Int32& bytesRead)
       at System.IO.Compression.Inflater.ReadOutput(Byte* bufPtr, Int32 length, Int32& bytesRead)
       at System.IO.Compression.Inflater.InflateVerified(Byte* bufPtr, Int32 length)
       at System.IO.Compression.DeflateStream.ReadCore(Span`1 buffer)
       at System.IO.Compression.DeflateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at SharpCompress.IO.RewindableStream.Read(Byte[] buffer, Int32 offset, Int32 count)
       at System.IO.Stream.Read(Span`1 buffer)
       at SharpCompress.Utility.ReadFully(Stream stream, Span`1 buffer)
       at SharpCompress.Archives.GZip.GZipArchive.IsGZipFile(Stream stream)
       at SharpCompress.Readers.Tar.TarReader.Open(Stream stream, ReaderOptions options)
       at Inedo.ProGet.Feeds.PackageFileInfo.ListTarEntries(Stream stream)+MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGetCoreEx\Feeds\PackageFileInfo.cs:line 135
       at Inedo.ProGet.Feeds.PackageFileInfo.ListTgzEntries(Stream stream)+MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGetCoreEx\Feeds\PackageFileInfo.cs:line 147
       at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListFilesWithinPackageAsync(TPackage package, CancellationToken cancellationToken)+MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGetCoreEx\Feeds\StandardCanonicalPackageFeed.cs:line 175
       at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListFilesWithinPackageAsync(TPackage package, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
       at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListFilesWithinPackageAsync(PackageVersionId purl, CancellationToken cancellationToken)+MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGetCoreEx\Feeds\StandardCanonicalPackageFeed.cs:line 156
       at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListFilesWithinPackageAsync(PackageVersionId purl, CancellationToken cancellationToken)+MoveNext() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGetCoreEx\Feeds\StandardCanonicalPackageFeed.cs:line 156
       at Inedo.ProGet.Feeds.StandardCanonicalPackageFeed`5.ListFilesWithinPackageAsync(PackageVersionId purl, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
       at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
       at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|424_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
       at Inedo.ProGet.WebApplication.Pages.Packages.PackageFilesPage.AddDirectoriesAndFiles() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGet.WebApplication\Pages\Packages\PackageFilesPage.cs:line 63
       at Inedo.ProGet.WebApplication.Pages.Packages.PackageFilesPage.AddContentControlsAsync(ContentContainer content) in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGet.WebApplication\Pages\Packages\PackageFilesPage.cs:line 39
       at Inedo.ProGet.WebApplication.Pages.Packages.PackagePageBase.CreateChildControlsAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGet.WebApplication\Pages\Packages\PackagePageBase.cs:line 113
       at Inedo.ProGet.WebApplication.Pages.ProGetSimplePage.InitializeAsync() in C:\Users\builds\AppData\Local\Temp\InedoAgent\BuildMaster\192.168.44.60\Temp\_E534044\Src\ProGet.WebApplication\Pages\ProGetSimplePage.cs:line 55
       at Inedo.Web.PageFree.SimplePageBase.ExecutePageLifeCycleAsync()
       at Inedo.Web.PageFree.SimplePageBase.ProcessRequestAsync(AhHttpContext context)
       at Inedo.Web.AhWebMiddleware.InvokeAsync(HttpContext context)
    
    ::Web Error on 03/11/2025 03:21:41::
    

    I am able to upload the same crate to a service such as https://shipyard.rs, is there anything that I may be doing wrong in this scenario. Thank you.


    Log in to reply
     

  • inedo-engineer

    Hi @rel_0477 ,

    I just want to confirm... is the error that you're not able to view the files on the View Files tab in the UI? The file uploaded fine otherwise?

    Are you able to download/pull packages through the connector to Shippyard?

    Thanks,
    Alana



  • @atripp Yes, the file uploads fine, but the contents are corrupted / unabled to be downloaded and viewed. The error is when you go to the "Files" tab under any version. All crates from a connector / manually uploaded are fine, which made me think it was an issue with cargo upload, but I am able to upload fine to alternative crate hosters. I am able to pull & download the same crate uploaded to shipyard.rs fine.


  • inedo-engineer

    Hi @rel_0477,

    Would you be able to send us an example crate and the exact publish command you are using so we can test this issue with? Also, what version of cargo are you using? In my test cases, I'm able to run cargo publish and view them in ProGet.

    Thanks,
    Rich



  • @rhessinger Sure. I created a basic Rust library using cargo new test --lib and didn't edit any of the code. I then immediately published using cargo publish --index sparse+https://stage.pub.rip/cargo/rs/ --token <token> --allow-dirty, where stage.pub.rip is my ProGet instance. The output of cargo publish:

        Updating `sparse+https://stage.pub.rip/cargo/rs/` index
    warning: manifest has no description, license, license-file, documentation, homepage or repository.                        
    See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
       Packaging inedo_test v0.1.0 (C:\Users\relax\dev\rust\inedo_test)
        Packaged 4 files, 1.2KiB (824.0B compressed)
       Verifying inedo_test v0.1.0 (C:\Users\relax\dev\rust\inedo_test)
       Compiling inedo_test v0.1.0 (C:\Users\relax\dev\rust\inedo_test\target\package\inedo_test-0.1.0)
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.51s                                                    
       Uploading inedo_test v0.1.0 (C:\Users\relax\dev\rust\inedo_test)
        Uploaded inedo_test v0.1.0 to registry `sparse+https://stage.pub.rip/cargo/rs/`
    note: waiting for `inedo_test v0.1.0` to be available at registry `sparse+https://stage.pub.rip/cargo/rs/`.
    You may press ctrl-c to skip waiting; the crate should be available shortly.
       Published inedo_test v0.1.0 at registry `sparse+https://stage.pub.rip/cargo/rs/`     
    

    I then went to my ProGet instance and attempted to view the files and got the same 500 error about the compression method.
    Cargo publish verbose:

    Updating `sparse+https://stage.pub.rip/cargo/rs/` index
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
    warning: manifest has no description, license, license-file, documentation, homepage or repository.
    See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
    Packaging inedo_test v0.1.1 (C:\Users\relax\dev\rust\inedo_test)
    Archiving Cargo.lock
    Archiving Cargo.toml
    Archiving Cargo.toml.orig
    Archiving src\lib.rs
    Packaged 4 files, 1.2KiB (824.0B compressed)
    Verifying inedo_test v0.1.1 (C:\Users\relax\dev\rust\inedo_test)
    Blocking waiting for file lock on package cache
    Compiling inedo_test v0.1.1 (C:\Users\relax\dev\rust\inedo_test\target\package\inedo_test-0.1.1)
    Running `C:\Users\relax\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name inedo_test --edition=2024 'src\lib.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=123 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=816c523b1b089ad8 -C extra-filename=-8b9ef5447a4b1bad --out-dir 'C:\Users\relax\dev\rust\inedo_test\target\package\inedo_test-0.1.1\target\debug\deps' -C 'incremental=C:\Users\relax\dev\rust\inedo_test\target\package\inedo_test-0.1.1\target\debug\incremental' -L 'dependency=C:\Users\relax\dev\rust\inedo_test\target\package\inedo_test-0.1.1\target\debug\deps'`
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.39s
    Uploading inedo_test v0.1.1 (C:\Users\relax\dev\rust\inedo_test)
    Uploaded inedo_test v0.1.1 to registry `sparse+https://stage.pub.rip/cargo/rs/`
    note: waiting for `inedo_test v0.1.1` to be available at registry `sparse+https://stage.pub.rip/cargo/rs/`.
    You may press ctrl-c to skip waiting; the crate should be available shortly.
    Published inedo_test v0.1.1 at registry `sparse+https://stage.pub.rip/cargo/rs/` 
    

    I also packaged it using cargo package --allow-dirty and uploaded it, and I am able to view & fetch it with cargo fine.


  • inedo-engineer

    Hi @rel_0477,

    Thanks for sending over the recreation steps! I was able to recreate the issue and have created a ticket, PG-2922, to track the fix. This should be released in the next maintenance version of ProGet, 2024.30.

    Thanks,
    Rich



  • Awesome, thank you so much!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation