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

Crashes due to Date bug in NuGet #757

Closed
haf opened this issue Apr 8, 2015 · 9 comments
Closed

Crashes due to Date bug in NuGet #757

haf opened this issue Apr 8, 2015 · 9 comments

Comments

@haf
Copy link
Member

haf commented Apr 8, 2015

Due to this bug in NuGet: https://nuget.codeplex.com/workitem/4412

Paket crashes like this:

Something went wrong with the download of Newtonsoft.Json.FSharp 3.2.2 - automatic retry with --force.
loaded details for 'Newtonsoft.Json.FSharp@3.2.2' from url 'https://www.myget.org/F...b/api/v2'
Downloading Newtonsoft.Json.FSharp 3.2.2 to /Users/henrik.feldt/.local/share/NuGet/Cache/Newtonsoft.Json.FSharp.3.2.2.nupkg
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

Because this is the output on the files in the nupkg:

✗ l
total 184
-rw-r--r--@ 1 henrik.feldt  1744578187  78848 Jan 14  2007 Newtonsoft.Json.FSharp.dll
-rw-r--r--@ 1 henrik.feldt  1744578187   9375 Jan 15  2007 Newtonsoft.Json.FSharp.xml

...which is wrong, obviously. I haven't been able to solicit a response from any NuGet person. They must be busy adding more powershell commands to visual studio instead of fixing the core.

I can work around this now, by using Paket pack. Leaving this bug report here though. If nothing else, please help me vote for that bug! =)

@forki
Copy link
Member

forki commented Apr 9, 2015

I don't see a way to work around this. It throws deep down in .NET framework. Any ideas?

/cc @yishaigalatzer @csharpfritz @maartenba please look at this issue. Thanks.

@maartenba
Copy link

Looking at SuaveIO/suave#190 (followed the link to a link :-)) it seems Mono related / related to System.IO.Packaging which doesn't seem to properly capture file timestamps.

@forki
Copy link
Member

forki commented Apr 9, 2015

@haf do you see the same behavior with latest paket pack? We changed our zip library and now use the default .NET 4.5 stuff.

@haf
Copy link
Member Author

haf commented Apr 9, 2015

The thing is; this wasn't paket pack, it was nuget pack.

@forki
Copy link
Member

forki commented Apr 9, 2015

yes I understand that. And you said paket pack worked. I just want to make
sure we don't have a regression after the change to .NET 4.5

2015-04-09 9:46 GMT+02:00 Henrik Feldt notifications@github.com:

The thing is; this wasn't paket pack, it was nuget pack.


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

@haf
Copy link
Member Author

haf commented Apr 9, 2015

Let me check if paket pack works.

@haf
Copy link
Member Author

haf commented Apr 9, 2015

It turns out that now that I pushed a new version of the package it's not erroring out anymore, despite continued use of NuGet.exe (I didn't finished the WIP yesterday to use paket fully).

I think that my upload was corrupted actually: https://twitter.com/nuget/status/585894933178945537 -- as I was uploading exactly before they announced their problems. You can probably repro by downloading this particular https://www.nuget.org/packages/Newtonsoft.Json.FSharp/3.2.1 version

@forki
Copy link
Member

forki commented Apr 9, 2015

seems to be fixed in #761

@haf
Copy link
Member Author

haf commented Apr 9, 2015

💟

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

No branches or pull requests

4 participants