writeZip() throws "Invalid LOC header (bad signature)" error
See original GitHub issueThis issue is occurring in version: 0.4.3 on Windows.
Initially noticed this occurred with jar files however I can reproduce it with other zips I had.
Examples: The kickstarter zip: http://www.99lime.com/downloads/ Apache tomcat zip: http://tomcat.apache.org/download-80.cgi
var AdmZip = require('adm-zip');
var jarZip = new AdmZip('WEB-INF\\lib\\snappy-java.jar');
jarZip.writeZip();
Produces
A:\myapp\node_modules\adm-zip\headers\entryHeader.js:113
throw Utils.Errors.INVALID_LOC;
^
Invalid LOC header (bad signature)
Issue Analytics
- State:
- Created 10 years ago
- Comments:31 (1 by maintainers)
Top Results From Across the Web
Handling Maven Invalid LOC Header Error - Baeldung
In these situations, Maven builds throw an “invalid LOC header” error. The solution is to remove the corrupt jar from the repository.
Read more >Deploying Maven project throws java.util.zip.ZipException
This answer is not for DevOps/ system admin guys, but for them who are using IDE like eclipse and facing invalid LOC header...
Read more >zip exception invalid LOC header (bad signature)
I am getting below error every time. Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature).
Read more >Deploying Maven project throws java util zip ZipException ...
MojoExecutionException: Error creating shaded jar: invalid LOC header (bad signature) at org.apache.maven.plugins.shade.mojo.
Read more >ZipException – “invalid LOC header” - Shirish Ranjit
Delete your repository and rebuild your application. Error looks like following. Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

NAVER - http://www.naver.com/
artworker@naver.com 님께 보내신 메일 <Re: [adm-zip] writeZip() throws “Invalid LOC header (bad signature)” error (#64)> 이 다음과 같은 이유로 전송 실패했습니다.
받는 사람이 회원님의 메일을 수신차단 하였습니다.
I got this error calling toBuffer() in nodejs 6.10.0