Creodias SNAP Version agnostic error - Wrong magic string in 'hdr.adf' file

We recently came across this issue that we did not see any information about, so posting a solution (without understanding the cause) here for any others.
On a Creodias VM running Ubuntu 24.04, several different versions of SNAP (9.0, 10.0, 11.0) gave the following error for multiple different gpt and snap desktop processes, in this case Calibration, related to this module:

INFO: org.esa.s2tbx.dataio.gdal.GDALVersion: Internal GDAL 3.2.1 set to be used by SNAP.
org.esa.snap.core.dataio.ProductIOException: Wrong magic string in 'hdr.adf' file.
  at org.esa.snap.dataio.arcbin.Header.create(Header.java:99)
  at org.esa.snap.dataio.arcbin.ArcBinGridReader.readProductNodesImpl(ArcBinGridReader.java:73)
  at org.esa.snap.core.dataio.AbstractProductReader.readProductNodes(AbstractProductReader.java:178)
  at org.esa.snap.core.gpf.main.DefaultCommandLineContext.readProduct(DefaultCommandLineContext.java:59)
  at org.esa.snap.core.gpf.main.CommandLineTool.readProduct(CommandLineTool.java:534)
  at org.esa.snap.core.gpf.main.CommandLineTool.addProduct(CommandLineTool.java:479)
  at org.esa.snap.core.gpf.main.CommandLineTool.getSourceProductMap(CommandLineTool.java:467)
  at org.esa.snap.core.gpf.main.CommandLineTool.runOperator(CommandLineTool.java:295)
  at org.esa.snap.core.gpf.main.CommandLineTool.runGraphOrOperator(CommandLineTool.java:284)
  at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:188)
  at org.esa.snap.core.gpf.main.CommandLineTool.run(CommandLineTool.java:121)
  at org.esa.snap.core.gpf.main.GPT.run(GPT.java:59)
  at org.esa.snap.core.gpf.main.GPT.main(GPT.java:37)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.esa.snap.runtime.Launcher.lambda$run$0(Launcher.java:55)
  at org.esa.snap.runtime.Engine.runClientCode(Engine.java:189)
  at org.esa.snap.runtime.Launcher.run(Launcher.java:51)
  at org.esa.snap.runtime.Launcher.main(Launcher.java:31)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
  at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
  at install4j.org.esa.snap.runtime.Launcher_gpt.main(Unknown Source)

Error: Wrong magic string in 'hdr.adf' file.

For us, it seemed like a gdal issue, and we found this file ~/.snap/system/config/Actions/GDAL/.nbattrs and deleted it
EDIT: above solution did not work, seems to be a problem with reading /eodata s3 object storage files from WAW3-2 cloud. The workaround at the moment is to copy files to local (to the VM) directory.

1 Like