shred/acme4j

Unable to update challenge :: authorization must be pending

AmadeusSys opened this issue · 4 comments

Order order = login.bindOrder(orderLocation);

for (Authorization auth : order.getAuthorizations()) {
     authorize(auth);
}

challenge.trigger();

Result JSON: {"type":"urn:ietf:params:acme:error:malformed","detail":"Unable to update challenge :: authorization must be pending","status":400}

shred commented

What is the status of the Authorization object? You can get it with auth.getStatus().

I want to keep "Order", URL save to local.
use login.bindOrder(orderLocation); recovery, but challenge.trigger(); throw Exception .
auth.getStatus() is Invalid

shred commented

auth.getStatus() is Invalid

This is the actual problem. Your Authorization has already failed, so you cannot do the challenges.

You can use order.getError().toString() to see the reason of the failure. After you corrected the problem, you need to start a new order.

The challenge only needs to be performed if the Authorization object is in PENDING state. It is not documented like that in the acme4j docs. I'm going to correct that.

shred commented

Issue has been fixed in the meantime. I forgot to close the issue.