ProductSet-Reader never passes a valid source product downstream — reproducible on SNAP 12 and 13

Hi all,

I’ve been having issues with ProductSet-Reader and was lead down a rabbit-hole by claude. I’ve seen mention of similar issues from almost 10 years ago here but nothing seems to help.

The issue: ProductSet-Reader reports success (logs done., no warnings or errors at the node itself) but doesn’t actually hand off a usable source product to whatever comes next in the graph. Every downstream operator I’ve tried fails with the same error:

org.esa.snap.core.gpf.OperatorException: Operator '<OpName>': Mandatory source product (field 'sourceProduct') not set.

I’ve confirmed this is not specific to any one downstream operator — I tested Write, Subset, and TOPSAR-Split directly after ProductSet-Reader in turn, and all three fail identically. So it seems to be something in how ProductSet-Reader itself hands off its output within the graph, rather than anything about the operator that follows it.

Minimal repro:

xml

<graph id="Graph">
    <version>1.0</version>
    <node id="ProductSet-Reader">
        <operator>ProductSet-Reader</operator>
        <parameters class="com.bc.ceres.binding.dom.XppDomElement">
            <fileList>/path/to/your_file.zip</fileList>
        </parameters>
    </node>
    <node id="Subset">
        <operator>Subset</operator>
        <sources>
            <sourceProduct refid="ProductSet-Reader"/>
        </sources>
        <parameters class="com.bc.ceres.binding.dom.XppDomElement">
        </parameters>
    </node>
    <node id="Write">
        <operator>Write</operator>
        <sources>
            <sourceProduct refid="Subset"/>
        </sources>
        <parameters class="com.bc.ceres.binding.dom.XppDomElement">
            <file>/tmp/test_output</file>
            <formatName>BEAM-DIMAP</formatName>
        </parameters>
    </node>
</graph>

Run with gpt graph.xml -e, and it fails at the Subset node with the “Mandatory source product not set” error, even though ProductSet-Reader logged as complete just before it.

What I’ve ruled out:

  • File path issues (tested with symlinks and direct paths)

  • fileList formatting (tested plain string and comma-separated, per the schema from gpt ProductSet-Reader -h)

  • <sources/> presence/absence on the reader node

  • SNAP version — reproduces identically on SNAP 12.0.0 and SNAP 13.0.0

  • GUI vs CLI — reproduces in both the Graph Builder and via gpt

  • Operator-specific quirks — same failure with Write, Subset, and TOPSAR-Split

Also worth noting: while cross-checking with a different product type (Sentinel-2), ProductSet-Reader in the GUI Graph Builder froze entirely rather than erroring — possibly a related instability in the same operator, though a different symptom.

Why I’m posting this here: I found two older threads describing what looks like the exact same problem:

Using Read instead of ProductSet-Reader for a single-file works fine but it’s not really a solution I’m happy with.

Maybe I’ve missed something when going through the forum so apologies if that’s the case.

Thanks!

The reason you encounter the “Mandatory source product” error is that the operator (e.g. subset) expects a single source product rather than a set of products. If you want to process multiple products with a single graph, I recommend using the Batch Processing functionality in SNAP. For more details, please refer to this tutorial https://step.esa.int/docs/tutorials/S1TBX%20Time-series%20analysis%20with%20Sentinel-1.pdf.