hyperledger/fabric · error

could not retrieve QueryExecutor for channel %s, error %s

Error message

could not retrieve QueryExecutor for channel %s, error %s

What it means

getInstantiatedCC called stateFetcher.FetchState and failed to obtain a QueryExecutor for the channel — a VSCC execution (infrastructure) failure rather than a policy violation, often transient ledger access trouble during commit.

Source

Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:611

					err = vscc.checkInstantiationPolicy(chid, env, polNew, payl)
					if err != nil {
						return err
					}
				}
			}
		}

		// all is good!
		return nil
	default:
		return policyErr(fmt.Errorf("VSCC error: committing an invocation of function %s of lscc is invalid", lsccFunc))
	}
}

func (vscc *Validator) getInstantiatedCC(chid, ccid string) (cd *ccprovider.ChaincodeData, exists bool, err error) {
	qe, err := vscc.stateFetcher.FetchState()
	if err != nil {
		err = fmt.Errorf("could not retrieve QueryExecutor for channel %s, error %s", chid, err)
		return
	}
	defer qe.Done()
	channelState := &state{qe}
	bytes, err := channelState.GetState("lscc", ccid)
	if err != nil {
		err = fmt.Errorf("could not retrieve state for chaincode %s on channel %s, error %s", ccid, chid, err)
		return
	}

	if bytes == nil {
		return
	}

	cd = &ccprovider.ChaincodeData{}
	err = proto.Unmarshal(bytes, cd)
	if err != nil {
		err = fmt.Errorf("unmarshalling ChaincodeQueryResponse failed, error %s", err)

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Check ledger state DB connectivity/health
  2. Retry validation; the query executor may be temporarily unavailable
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:611 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/7d254c47b8a68a14. Report an issue: GitHub.