Instruction errors (runtime)

ReentrancyNotAllowed

Appears as Cross-program invocation reentrancy not allowed for this instruction

Instruction

ReentrancyNotAllowed

“Cross-program invocation reentrancy not allowed for this instruction”

A program invoked itself (directly or indirectly) via CPI, which Solana only allows for direct self-recursion.

Common causes

  • Program A calls B which calls A.

How to fix it

  • Restructure to avoid indirect reentrancy.

Decode another error

Try: