ZIP does not support timestamps before 1980

Having issues trying to do an AWS CodeDeploy, in the “Create new revision” step, is this a problem with the default container, or something we can/should change on our side?

create_application_revision /tmp/codedeploy_applications.json /tmp/codedeploy_revisions.json
create_application_revision loaded: {"applications":[{"region":"us-west-2","application_root":"/","revision_location":{"s3Location":{"bucket":"xxx","key":"xxx"},"revisionType":"S3"},"deployment_group":"xxx","application_name":"xxx"}]}
Bundling xxx from /home/ubuntu/portal
Unhandled exception
ZIP does not support timestamps before 1980

((create_application_revision "/tmp/codedeploy_applications.json" "/tmp/codedeploy_revisions.json")) returned exit code 1

Action failed: Create new revision of xxx
2 Likes

I’m seeing the exact same problem with my builds, as of at least today (this was working just fine two days ago).

Just to add further weight to this post, we’re also seeing the same problem. I raised this an issue on the aws-cli repo. Please see the following URL: https://github.com/aws/aws-cli/issues/2639.

I’m seeing the exact same problem as well.

Still looking for some solution, it was working like, yesterday.

Is there a way, in either application settings or circle.yml, to force bundling to a tarball instead of a zip archive? That could be a good workaround.

We are running into this problem as well. Started somewhere over the last couple of days.
Will report back if we find cause/solution.

It looks all but certain that this is an issue with files in uglify-js being somehow created with a timestamp of 1969 (-1). Read through the hot drama at https://github.com/mishoo/UglifyJS2/issues/2054. There is some reluctance to look into it.

Thanks for reporting this everyone. The solution for now is to lock uglify-js to 2.8.27. See this GitHub issue for more details: https://github.com/aws/aws-cli/issues/2639#issuecomment-307218133

this is happening again on circleci, getting ZIP does not support timestamps before 1980
suddenly on deploy

Having the same issue, even the build which used to pass.

It is NPM not setting your file timestamps for node_modules right on install.

This causes python’s easy_zip to choke and throw the error when you go to create a deployment zip file.

If this happens to you at any point in the future, CCI probably updated NPM on you, and they re-introduced the bug yet again.

As a workaround, add this post-install run script to your package.json in the “scripts” section:

"find ./node_modules/* -mtime +10950 -exec touch {} \\;"

Your package.json will look something like:

{
    "name": "...",
    "version": "...",
    "devDependencies": {
        ...
    },
    "scripts": {
        "install": "find ./node_modules/* -mtime +10950 -exec touch {} \\;"
    }
}

That will update the timestamps of all files in node_modules that are older than 30 years, allowing the zip to succeed and giving you your CI pipe back.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.