You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suddenly I'm unable to get s3-zip to produce a valid zip file. This started happening this week without any updates to my code base or node versions.
Environment:
Node 20.13.1
Express JS: "4.16.1" (probably not relevant)
@aws-sdk/client-s3: "3.521.0"
Code:
constfilePaths=files.map(myFile=>myFile.path)console.log('creating a zip from: ')console.log(filePaths)// just an array of file paths in s3constarchiverEntryData=files.map(myFile=>({name: `${myFile.type}/${myFile.originalName}`// "type" isn't filetype, it's more like what area the file came from in our app}))s3Zip.archive({region: 'us-east-2',bucket: config.s3Bucket,debug: true},'',filePaths,archiverEntryData).pipe(res)
Output
creating a zip from:
[
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/rk0lGYi2a1709048309719.jpeg',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/rJx0gGKj261709048309721.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/ry-AxGKj361709048309722.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/BJzClfFs3T1709048309723.png',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/Hyb8zKs3a1709048393227.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/rykHmKj2a1709048630694.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/SkqwQYsnT1709048673598.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/B1doXYonT1709048736347.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/Bkr0XFi2a1709048780690.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/ryozNKi2a1709048850607.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/H1u8VYih61709048911527.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/By5F4Yo361709048961920.pdf',
'org-5927a1e253ea6534838869a1/perm-65de01f5f18dd0498b296394/BJLjEYjna1709048990265.pdf'
]
append to zip { name: 'form/Test Document 1.pdf' }
append to zip { name: 'form/Test Document 4.pdf' }
append to zip { name: 'form/Test Document 4-1.pdf' }
append to zip { name: 'internal_comments/Test Document 2.pdf' }
append to zip { name: 'messages/Test Document 3.pdf' }
append to zip { name: 'messages/Test Document 1.pdf' }
append to zip {
name: 'plan-reviews/Business Plans/submission-1/submitted/Test Document 1.pdf'
}
append to zip { name: 'messages/Test Document 3-1.pdf' }
append to zip {
name: 'plan-reviews/Business Plans/submission-1/review-Police/Site Plans - Reviewed.pdf'
}
append to zip {
name: 'plan-reviews/Business Plans/submission-1/response/Test Document 4.pdf'
}
append to zip {
name: 'plan-reviews/Business Plans/submission-2/submitted/Test Document 2.pdf'
}
append to zip { name: 'form/IMG_7681-edit.jpg' }
append to zip { name: 'form/Screenshot 2024-02-27 at 8.37.40 AM.png' }
end -> finalize
Produces a zip file with zero bytes. Used to work just fine. Hoping somebody has noticed this happening suddenly as well. I wonder if something changed about the output stream from AWS?
I even tried copying your source code and then outputting from the progress event with archiver, and it says zero bytes processed.
Thanks in advance for any help. I’ve been banging my head against the wall for about 20 hours now.
The text was updated successfully, but these errors were encountered:
Oh wow, this problem existed earlier I just didn't have any users report it earlier. Looks like a few weeks ago I introduced a package that imported buffer, which my best guess is causing problems. Hopefully this helps someone in the future 🤞
Suddenly I'm unable to get s3-zip to produce a valid zip file. This started happening this week without any updates to my code base or node versions.
Environment:
Code:
Output
Produces a zip file with zero bytes. Used to work just fine. Hoping somebody has noticed this happening suddenly as well. I wonder if something changed about the output stream from AWS?
I even tried copying your source code and then outputting from the progress event with archiver, and it says zero bytes processed.
Thanks in advance for any help. I’ve been banging my head against the wall for about 20 hours now.
The text was updated successfully, but these errors were encountered: