-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
v2.8.28's .tgz contains corrupt timestamps, causing errors from zip
command and others
#2065
Comments
Closing as duplicate of #2054 (I will say this one more time - if somebody can figure out why |
@alexlamsl have you not read any of the discussion? This doesn't have anything to do with I guarantee that if you clone the repository fresh into a different directory, bump the version, build, and publish, the files will not have UTC date of 0. REGARDLESS of which npm version you use. |
Note: I have moved this reproducible case to the other issue which appears to be getting more attention. |
maybe npm/npm#16734 ? |
@gabor I think you've just hit jackpot - thanks for finding the root cause of this issue 👍 |
An npm maintainer commented that it's a node 8 bug that was fixed but it's not clear what node 8 bug that is, or what release it will be in. Probably best to avoid node@8 and npm@5 for releases until this shakes out. |
It was apparently fixed by nodejs/node#13173, which was released as part of Node 8.1.0. |
Nice find @gabor! It looks like I was very much in the wrong about this not being a node bug. @alexlamsl I hope this means there will be a re-release of 2.x packaged either with node 8.1 or node 6.x. This is not for my benefit (we resolved this issue in our code days ago, shortly after I posted in this thread, by pinning to @2.8.27 in our package.json) but for the benefit of others who have not yet been bitten by the ctime and mtime in the 2.8.28 release's tar file—that they don't have to spend time troubleshooting and diagnosing why zip or unison isn't working with a build of their project. |
Excellent debugging @gabor. @alexlamsl are you able to confirm it was that particular combo of node@>8.0.0<8.10 and Windows 7 which triggered the bug causing the 0 timestamp? If so, can we assume a new release with a node version outside of that range would fix it? |
@jesstelford not quite Win7, but I was certainly using So in the next backports release, I'll be using |
Since this release is clearly broken for some users (the last thread makes that obvious), and the root cause has been found, would you please publish |
@STRML sounds like a plan - let me get out of bed first 😅 |
Bug report or feature request?
Bug report
Uglify version (
uglifyjs -V
)Steps to reproduce
Notice the Jan 1st, 1970 timestamp.
This is causing issues on certain platforms where the timestamp is actually reported as December 31st, 1969, causing POSIX tools to fail. (ie; it's a
-1
unix timestamp).Edit: The actual error is:
ZIP does not support timestamps before 1980
on Ubuntu 14.04 (our build machine)Analysis
It looks like it's the actual files inside the package,
which implies it's not anything to do withEdit: It wasnpm
, but instead to do with the state of the filesystem at the time of publishnpm
! (I've accidentally caused bad publishes like this myself in the past):Note that this is not a problem in
2.8.27
:Edit: Related to #2054
Edit 2: here's an incomplete list of other issues that appear to have a root cause as outlined above:
The text was updated successfully, but these errors were encountered: