question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

writeZip() throws "Invalid LOC header (bad signature)" error

See original GitHub issue

This 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:closed
  • Created 10 years ago
  • Comments:31 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
artworkercommented, Jan 8, 2016

NAVER - http://www.naver.com/

artworker@naver.com 님께 보내신 메일 <Re: [adm-zip] writeZip() throws “Invalid LOC header (bad signature)” error (#64)> 이 다음과 같은 이유로 전송 실패했습니다.


받는 사람이 회원님의 메일을 수신차단 하였습니다.


6reactions
plettixcommented, Mar 21, 2017

I got this error calling toBuffer() in nodejs 6.10.0

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found