Getting "ZipError: zip END header not found" when reading S2 data

Here’s the log massage:

java.util.zip.ZipError: zip END header not found
at com.sun.nio.zipfs.ZipFileSystem.zerror(ZipFileSystem.java:1605)
at com.sun.nio.zipfs.ZipFileSystem.findEND(ZipFileSystem.java:1021)
at com.sun.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1030)
at com.sun.nio.zipfs.ZipFileSystem.(ZipFileSystem.java:130)
Caused: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedConstructorAccessor62.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.esa.snap.engine_utilities.util.ZipFileSystemBuilder.newZipFileSystem(ZipFileSystemBuilder.java:48)
at org.esa.snap.engine_utilities.util.FileSystemUtils.isZipFile(FileSystemUtils.java:24)
at org.esa.s2tbx.dataio.VirtualDirEx.build(VirtualDirEx.java:99)
Caused: java.lang.IllegalStateException
at org.esa.s2tbx.dataio.VirtualDirEx.build(VirtualDirEx.java:101)
at org.esa.s2tbx.dataio.s2.filepatterns.S2NamingConventionUtils.transformToSentinel2VirtualPath(S2NamingConventionUtils.java:306)
at org.esa.s2tbx.dataio.s2.ortho.S2ProductCRSCache$S2ProductCRSCacheEntry.(S2ProductCRSCache.java:57)
at org.esa.s2tbx.dataio.s2.ortho.S2ProductCRSCache.ensureIsCached(S2ProductCRSCache.java:155)
at org.esa.s2tbx.dataio.s2.ortho.S2OrthoProductReaderPlugIn.getDecodeQualification(S2OrthoProductReaderPlugIn.java:101)
at org.esa.snap.rcp.actions.file.ProductOpener.lambda$getPluginsForFile$2(ProductOpener.java:269)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at org.esa.snap.rcp.actions.file.ProductOpener.getPluginsForFile(ProductOpener.java:268)
at org.esa.snap.rcp.actions.file.ProductOpener.openProductFilesCheckOpened(ProductOpener.java:223)
at org.esa.snap.rcp.actions.file.ProductOpener.openProduct(ProductOpener.java:179)
at org.esa.snap.rcp.actions.file.OpenProductAction.execute(OpenProductAction.java:126)
at org.esa.snap.rcp.actions.file.OpenProductAction.actionPerformed(OpenProductAction.java:111)
at org.openide.awt.AlwaysEnabledAction$1.run(AlwaysEnabledAction.java:199)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
at org.openide.util.actions.ActionInvoker.doPerformAction(ActionInvoker.java:116)
at org.openide.util.actions.ActionInvoker.invokeAction(ActionInvoker.java:99)
at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:202)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI.doClick(VsnetMenuItemUI.java:1395)
at com.jidesoft.plaf.vsnet.VsnetMenuItemUI$MouseInputHandler.mouseReleased(VsnetMenuItemUI.java:1190)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

It happens only when I try to open specific data, while others work correctly

At the first glance I would say that this caused by a corrupted download of the zip file.
Can you extract the data with some tool?

And actually this related to sentinel-2, so I will move it into this category.

It doesn’t work either with other extraction tool.
I noticed trying to download the corrupted data again that the download itself is very fast and apparently not “complete”: for example, the data is 1.4 GB while the file in my download folder is 16.0 MB. Could there be something wrong with that set of data in the scihub?

This type of error indicates corrupted zip file.
If something wrong happened during the download, retry to download until the zip extraction work with other extraction tool.
It’s always good to check scihub latest news, to see if there is a maintenance/fix period declared:


(this was published last night)

I experience the same issue with all Sentinel-1 SAR-C data that has to be retrieved from the archive. The downloads are only around 16-17 MB and cannot be extracted.

This product for example has not worked for me to download.
S1A_IW_SLC__1SDV_20200705T162040_20200705T162107_033321_03DC50_FD8F https://scihub.copernicus.eu/dhus/odata/v1/Products(‘cf63da6e-664a-4a3d-a40b-2ace93b508e1’)/$value

Yes, it seems that this is the size that is retrieved from SciHub for S1A_IW_SLC__1SDV_20200705T162040_20200705T162107_033321_03DC50_FD8F:

that later results into an invalid zip archive:

@Thimm, you can send them an email. On their website there is:
" For more details or request of help support please send an e-mail to eosupport@copernicus.esa.int "

A post was split to a new topic: Error in snaphu-unwrapping