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

If "Created Time", "Modified Time", or "Accessed Time" are the start of the 1979 epoch, an out of range exception is thrown. #485

Closed
TheRedstoneScientist opened this issue Apr 24, 2024 · 1 comment · Fixed by #518
Labels

Comments

@TheRedstoneScientist
Copy link

TheRedstoneScientist commented Apr 24, 2024

After some investigation, I have figured out what went wrong for me. Hopefully this will help others. The issue in my case was that the "LastModifiedTime" and "CreatedTime" were the default 1979 timestamps. I used BulkFileChanger (https://www.nirsoft.net/utils/bulk_file_changer.html) to edit all my files to have a new time. This fixed it for me.
This happened because I copied items directly from another archive without unzipping first.
I figured this out by observing the exception happen on line 256.
image

Originally posted by @TheRedstoneScientist in #426 (comment)

@roosipuu
Copy link
Contributor

yes, ZIP uses MSDOS epoch 1/1/1980 and javascript does use UNIX epoch 1/1/1970

most likely value is negative.

@5saviahv 5saviahv linked a pull request Jun 27, 2024 that will close this issue
avi-alpert added a commit to aws/aws-toolkit-vscode that referenced this issue Jan 31, 2025
## Problem
Users see a `Sorry, I ran into an issue while trying to upload your
code` error when using /dev or /doc if files in the repo have a modified
or created time before the MSDOS epoch. This affects some users who
Remote SSH into a Linux machine.

Logs show an out of range exception thrown from the adm-zip package.
Adm-zip issue reported
[here](cthackers/adm-zip#485)

## Solution
Switch to the internal [zipStream
module](https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/shared/utilities/zipStream.ts)


---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants