c2pa-rs icon indicating copy to clipboard operation
c2pa-rs copied to clipboard

c2patool returns error about no action in array to stderr and return code 101

Open hackerfactor opened this issue 4 months ago • 2 comments

This happens with 0.19.0 - 0.25.0. (And probably earlier versions.) Version 0.13.0 worked with this picture.

Test image:

Image

Result:

[2025-11-05T20:54:08Z ERROR c2pa::status_tracker] Validation error: LogItem {
        kind: Failure,
        label: "self#jumbf=/c2pa/urn:uuid:97a4df54-4ab5-4662-a164-daabdb7dc35f/c2pa.assertions/c2pa.actions.v2",
        description: "Actions missing action array",
        crate_name: "c2pa",
        crate_version: "0.57.0",
        file: "sdk/src/claim.rs",
        function: "verify_actions",
        line: 1938,
        err_val: Some(
            "ValidationRule(\"No Action array in Actions\")",
        ),
        validation_status: Some(
            "assertion.action.malformed",
        ),
        ingredient_uri: None,
    }

thread 'main' panicked at sdk/src/claim.rs:1981:51:
index out of bounds: the len is 0 but the index is 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Also, the return code ($?) is 101.

hackerfactor avatar Nov 05 '25 20:11 hackerfactor

May be due to a bad build. My build process:

rm -f Cargo.lock
git pull
cargo update
cargo build --bin c2patool --target x86_64-unknown-linux-musl --release
# Output:
# ./target/x86_64-unknown-linux-musl/release/c2patool
./target/x86_64-unknown-linux-musl/release/c2patool --version
c2patool 0.25.0

While it says 0.25.0, it acted like 0.23.4. When I did a clean git pull in a different directory, it acted correctly and this error did not appear.

hackerfactor avatar Nov 06 '25 17:11 hackerfactor

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/CAI-10446 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Dec 18 '25 00:12 github-jira-sync-bot