{"record":{"id":"b426038e11b99c8d","repo":"hyperledger/fabric","slug":"no-such-transaction-id-s-in-index","errorCode":null,"errorMessage":"no such transaction ID [%s] in index","messagePattern":"no such transaction ID \\[(.+?)\\] in index","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/ledger/blkstorage/blockindex.go","lineNumber":256,"sourceCode":"}\n\nfunc (index *blockIndex) getTxIDVal(txID string) (*TxIDIndexValue, uint64, error) {\n\tif !index.isAttributeIndexed(IndexableAttrTxID) {\n\t\treturn nil, 0, errors.New(\"transaction IDs not maintained in index\")\n\t}\n\trangeScan := constructTxIDRangeScan(txID)\n\titr, err := index.db.GetIterator(rangeScan.startKey, rangeScan.stopKey)\n\tif err != nil {\n\t\treturn nil, 0, errors.WithMessagef(err, \"error while trying to retrieve transaction info by TXID [%s]\", txID)\n\t}\n\tdefer itr.Release()\n\n\tpresent := itr.Next()\n\tif err := itr.Error(); err != nil {\n\t\treturn nil, 0, errors.Wrapf(err, \"error while trying to retrieve transaction info by TXID [%s]\", txID)\n\t}\n\tif !present {\n\t\treturn nil, 0, errors.Errorf(\"no such transaction ID [%s] in index\", txID)\n\t}\n\tvalBytes := itr.Value()\n\tif len(valBytes) == 0 {\n\t\treturn nil, 0, errNilValue\n\t}\n\tval := &TxIDIndexValue{}\n\tif err := proto.Unmarshal(valBytes, val); err != nil {\n\t\treturn nil, 0, errors.Wrapf(err, \"unexpected error while unmarshalling bytes [%#v] into TxIDIndexValProto\", valBytes)\n\t}\n\tblockNum, err := retrieveBlockNum(itr.Key(), len(rangeScan.startKey))\n\tif err != nil {\n\t\treturn nil, 0, errors.WithMessage(err, \"error while decoding block number from txID index key\")\n\t}\n\treturn val, blockNum, nil\n}\n\nfunc (index *blockIndex) getTXLocByBlockNumTranNum(blockNum uint64, tranNum uint64) (*fileLocPointer, error) {\n\tif !index.isAttributeIndexed(IndexableAttrBlockNumTranNum) {","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/ledger/blkstorage/blockindex.go#L238-L274","documentation":"Returned by blockIndex.getTxIDVal when a range scan over the TxID index finds no entry for the given transaction ID — the iterator is positioned but the key does not exist. It means the transaction was never committed/recorded in this peer's block index (or the index was built without the TxID attribute populated for it), as opposed to an index-configuration or LevelDB read failure, which are reported separately.","triggerScenarios":"Thrown at common/ledger/blkstorage/blockindex.go:256 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the TXID is correct and belongs to this channel","If history was pruned/snapshotted, query a peer with full history"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}