Skip to content

Paket can't unpack our nuget packages (since 0.39) #761

Closed

Description

@devboy

We are using a private nuget host and since nuget.exe has been removed, paket seems to be unable to unpack our nuget archives. (at least on mono/osx)

Paket failed with:
    Argument is out of range.
StackTrace:
    at System.DateTime.op_Subtraction (DateTime d, TimeSpan t) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.get_UtcDateTime () [0x00000] in <filename unknown>:0
  at System.DateTimeOffset..ctor (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.DateTimeOffset.op_Implicit (DateTime dateTime) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipArchiveEntry.get_LastWriteTime () [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToFile (System.IO.Compression.ZipArchiveEntry source, System.String destinationFileName, Boolean overwrite) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFileExtensions.ExtractToDirectory (System.IO.Compression.ZipArchive source, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName, System.Text.Encoding entryNameEncoding) [0x00000] in <filename unknown>:0
  at System.IO.Compression.ZipFile.ExtractToDirectory (System.String sourceArchiveFileName, System.String destinationDirectoryName) [0x00000] in <filename unknown>:0
  at Paket.NuGetV2+ExtractPackage@338.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00000] in <filename unknown>:0
  at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@803[System.String,Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Control.AsyncParams`1 args) [0x00000] in <filename unknown>:0

Activity

  1. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    I just tested this on my Windows VM with 0.39.2 and everything works fine.
    So it seems to be a mono incompatability.
    I am running the latest MONO afaik (Mono JIT compiler version 3.12.1 ((detached/0849ec7 Fri Mar 20 19:07:48 EDT 2015))

  2. forki commented on Apr 9, 2015

    @forki
    Member

    this looks similar to #757

  3. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    Looks exactly like it actually. We are using nuget pack.

  4. forki commented on Apr 9, 2015

    @forki
    Member

    /cc @haf
    On Apr 9, 2015 17:00, "Dominic Graefen" notifications@github.com wrote:

    Looks exactly like it actually. We are using nuget pack actually.

    —
    Reply to this email directly or view it on GitHub
    #761 (comment).

  5. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    I could upgrade to paket pack for our internal libraries and pin paket to 0.38.x.
    But that can't be the solution.

  6. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    Also as this wasn't on nuget.org it is not related to some problems there.
    When rolling back to 0.38.x it works fine.

  7. forki commented on Apr 9, 2015

    @forki
    Member

    I'd love to see a fix. Not really sure how.

  8. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    A cross-platform version of the CLR would be one 😜

    Is there an option/env var you can set to pin the version of paket in the bootstrapper?
    Would like to avoid having to edit all build.cmd/sh(project-scaffold) files in our libraries which are now obviously all failing on travis.

  9. forki commented on Apr 9, 2015

    @forki
    Member

    yes IIRC paket.bootstrapper.exe 0.38 should work.

    But wait maybe I have a workaround.

  10. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    I know bootstrapper takes an argument. But there are quite a few places where i'd have to append, not too bad though.

    But I'll wait a moment 👍

  11. forki commented on Apr 9, 2015

    @forki
    Member

    I can't really reproduce so we have to play a bit ping pong. sorry about that.

    0.39.3 tries to overwrite the dates in the zipfiles.

  12. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    StackOverflow 🚫

    Unhandled Exception: System.StackOverflowException: The requested operation caused a stack overflow. at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0 at System.IO.Compression.ZipFile.Open (System.String archiveFileName, ZipArchiveMode mode) [0x00000] in <filename unknown>:0

    You can also send me a build via email, so you won't have to create ping pong releases.

  13. forki commented on Apr 9, 2015

    @forki
    Member

    WTF!?
    i seems the mono implementation is completly broken

  14. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    Would it possible to apply the mentioned workaround: Using a file stream to create the archive.
    ?

  15. forki commented on Apr 9, 2015

    @forki
    Member

    ok. let's try it using the filestream workaround. 0.39.4 is out

  16. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    Give me 10 mins.

  17. devboy commented on Apr 9, 2015

    @devboy
    ContributorAuthor

    Bingo!
    Works fine(In my reproduction case)

    Thanks a lot!!!

  18. forki commented on Apr 9, 2015

    @forki
    Member

    wtf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions