Hey, I am constantly getting `Cause: zip END heade...
# community-support
a
Hey, I am constantly getting
Cause: zip END header not found
Caused by: java.io.FileNotFoundException: /.gradle/caches/8.13/kotlin-dsl/accessors/45fa3cb6b4077a86ce0b8bff6eabdd7d/metadata.bin (No such file or directory) Could not read workspace metadata from /.gradle/caches/8.13/kotlin-dsl/scripts/fd66e26ddb1f221eabbb8ddcbbb386a1/metadata.bin Tried all possible solutions available online! How did you fix this?
a
v
Even though it is the same error message, it is not the same problem. There an ISP block results in an HTML file saved as JAR and then the opening of the file as JAR fails. Here there is a
FileNotFoundException
involved, so should be a different problem.
a
In our case, the only thing that helped was: 1. Exiting IDE 2. Stopping Gradle daemons 3. Removing Gradle cache
$HOME/.gradle/caches
4. Connecting via VPN 5. Starting IDE / running Gradle build again a. this would re-download the dependencies via VPN 6. Disconnecting VPN once everything was back to normal Unfortunately, running
unzip -l
or
unzip -t
on all JAR files in cache didn't let us find any particular broken dependency. That's why we ended up removing all cache.
But perhaps @Vampire is right that your problem is different
Anyway, as I said, even though the linked problem seems to be related to a "broken" JAR file, we didn't find any broken JARs in the whole
~/.gradle
directory, and yet removing cache and re-downloading through VPN helped, so it may be worth trying anyway
👌 1
@Ayushi Khandelwal Please let us know if that helped
OK, here goes the update. One of my coworkers found a specific file and in her case it was a POM instead of a JAR (that would explain why
unzip
didn't report problems). I suppose the broken file can be different on every computer. This file:
Copy code
.gradle/caches/modules-2/files-2.1/com.android.tools.utp/android-test-plugin-host-coverage-proto/31.11.0/8d7a2165956a5324d030033480ea83d95079afbf/android-test-plugin-host-coverage-proto-31.11.0.pom
Contained this:
Copy code
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0"/><style>body{margin:0px;padding:0px;}iframe{width:100%;height:100%}</style><iframe src="<http://210.57.203.2:8080/webadmin/deny/court.html>" width="100%" height="100%" frameborder=0></iframe>
and the
src
points to the page (screenshot) saying:
The website has been blocked as per direction/order of Hon'ble Court.
That's why removing the whole cache is more effective
v
Ok, yeah, same problem. Blocked by ISP with bad implementation, delivering 200 and an HTML page instead of some HTTP error response code. 🙄 Could happen with any file Gradle downloads, yeah. I wonder though, that you get a zip end header not found when the POM is corrupted. But I guess in that case you did not get that message but some "cannot parse POM" message.
a
No, even in that case the error was ZIP-related, so totally misleading
🤔 1
🧐 1
v
No even in the full
--stacktrace
as cause?
a
Sorry, I haven't tried
--stacktrace
unfortunately. Since this problem was blocking the entire team, I was focused on finding and recommending a workaround as soon as possible. And since I was not affected myself, I had to ask other people to run all commands, and it was too time-consuming to continue the analysis that way.
OK, we re-ran with
--stacktrace
and still nothing useful. @Vampire let me know if you are interested in a short call. I can show you the whole stacktrace and explain some stuff
v
I'm just a user like you and sitting at my own full-time job currently, sorry 🙂
a
That's fair and understandable, of course 🙂