-
Notifications
You must be signed in to change notification settings - Fork 23
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
"Uncaught (in promise) Error: end of central directory record signature not found" when trying to open or extract after download #19
Comments
Can you show some code? Also, what node version and what OS? |
Thanks for your answer! async function changeDlJava() {
const jreDownloader = new Downloader({
url: "https://www.dropbox.com/s/262kaub0ra1ma3d/java.zip?dl=1", // This link work!
directory: "C:/Users/GoldFrite/AppDara/Roaming/" + gameFileName + "/runtime/",
fileName: "JRE.zip",
cloneFiles: false,
onProgress: function (percentage) {
progressBar.max = "100"
progressBar.value = percentage
}
})
try {
await jreDownloader.download()
.then(() => {
try {
decompress("C:/Users/GoldFrite/AppDara/Roaming" + gameFileName + "/runtime/JRE.zip", "C:/Users/GoldFrite/AppDara/Roaming" + gameFileName + "/runtime/") // With 'decompress' module
.then(() => {
try {
fs.unlink("C:/Users/GoldFrite/AppDara/Roaming/" + gameFileName + "/runtime/JRE.zip", () => { })
/* Others actions */
} catch (err) {
console.error(err);
}
})
} catch (err) {
console.error(err);
}
}
}
})
} catch (err) {
console.error(err);
}
}
} |
Well, |
ah lol and notice you wrote appDara instead of appData :D |
Ok, I think the problem is with my connection...
Ok!
😂 No, in fact, this is not my real code: instead of the full link ( |
:D |
Ok so I don't understand why, but I've retried now without any changing and it works... My connection? |
the cnnection of course can cause problems. BUT, it should eventually trigger some exception. |
Yes. I don't understand. But now it works. |
I will need to explore this. my tests do not cover a scenario of lost connection, or anything like it. they cover many error scenarious though. i'll add some tests later on. |
Hello,
I am trying to download a ZIP file with nodejs-file-downloader.
But when I try to extract the file, I get the following error:
I think the problem is with nodejs-file-downloader because when I download the file with this module, the file is 72.1 MB, but when I download the file with Chrome, the file is 75.2 MB.
I can't open the ZIP file downloaded with this module with Windows File Explorer, but I can do it with 7zip.
When I open the 75.2 MB ZIP file, there are 3 folders and 8 files. When I open the 72.1 MB ZIP file, there are 3 folders but 2 files (and the 3rd folder is smaller than in the 75.2 MB file).
The error message is not coming from the nodejs-file-downloader module, but from another one, but I think it is a problem with the nodejs-file-downloader module.
Thanks for your help.
The text was updated successfully, but these errors were encountered: