Bundler JSON-RPC error codes are often accompanied by an additional AAxx code provided by the EntryPoint.
- AA1x error codes relate to creating an account
- AA2x error codes relate to the sender or the user operation itself (nonce, signature, prefund, time validity, verification gas)
- AA3x error codes relate to paymasters (deposit, expiration, verification)
- AA4x error codes relate to verification
- AA5x errors relate to post execution actions
- AA9x error codes are general and not related to a certain theme (invalid addresses, failed sends, invalid aggregator, etc.)
The sender has already been created. This error may occur if you attempt to create an account multiple times.
Possible Solutions
- Remove the
initCodefrom the userOp struct.
The initCode failed to create the smart account. There are two possible reasons:
- The
initCoderan out of gas (OOG) - The
initCodereverted during the account deployment process
Possible Solutions
- Check the account has native token to pay for its deployment if you aren't using a paymaster.
- Check that the factory address in the
initCodeis correct (the factory address is the first 20 bytes of theinitCode). - Check that the
verificationGasLimitis high enough for theinitCodeto complete without running out of gas. - If the
initCodereverted, investigate why using tools like Tenderly.
The address of the smart account deployed with the initCode does not match the sender address of the user operation.
Possible Solutions
-
Check that the
initCodeis correct.- The first 20 bytes should be the factory address.
- The remaining bytes should be the encoded function call.
-
Verify that the sender address was generated deterministically from
initCode.
The initCode does not return any sender address.
Possible reasons:
- The
initCodefactory is not creating an account. - The
initCodefactory is creating an account, but is not returning the deployed sender address.
Possible solutions
-
Check that the
initCodeis correct.- The first 20 bytes should be the factory address.
- The remaining bytes should be the encoded function call.
-
Verify that the
initCodefactory is implemented correctly, i.e., it deploys the smart account and returns the sender address.
The sender of the userOp is not deployed and the initCode is not specified.
Possible Solutions
- Check that you are using the correct sender address.
- If this is the first transaction by this account make sure the
initCodeis included in the userOp. - Check that you are sending the userOp to the correct network.
The sender did not have enough native tokens to prefund the EntryPoint for the user operation.
Possible Solutions
- If you are not using a paymaster, check that the account has enough native token to cover the required prefund.
- If you are using a paymaster, check that the paymaster and data fields are set.
The signature of the user operation is not valid because it is outside of the specified time range.
This error occurs when the block.timestamp is after the validUntil timestamp or before the validAfter timestamp.
Possible Solutions
- If you are using time-based signatures, check that the
validAfterandvalidUntilfields are set correctly and that the userOp is sent within the specified range. - If you not using time-based signatures, check that the
validAfterandvalidUntilfields are set to0.
The sender signature validation reverted or ran out of gas (OOG).
Possible Solutions
- Check that the
verificationGasLimitis high enough to cover the gas costs ofvalidateUserOp. - If you are not using a paymaster, check that the sender has enough native tokens to cover the required prefund.
- If you are using a paymaster to cover the gas fees, verify that the paymaster and data fields are set.
The signature of the userOp is invalid.
Possible Solutions
-
Check that the userOp was correctly signed.
- The
userOpHashis correctly computed - The
entryPointAddressis correct - The
chainIdis correct - The smart account expects the same type of signature
- The
The nonce of the userOp is invalid. The userOp may be reusing an old nonce or formatting the nonce incorrectly.
Possible Solutions
- Check that you are not using a
noncethat has already been used. - Check that you are not using a
noncethat is too far in the future (more than 10 higher than the currentnonce. - Check that the
nonceis formatted correctly.
The paymaster contract is not deployed.
Possible Solutions
- Check that the first 20 bytes of the
paymasterAndDatafield are the address of the paymaster contract you intend to use. - Check that the paymaster contract is deployed on the network you are using.
The paymaster contract does not have enough funds deposited into the EntryPoint contract to cover the gas of the userOp.
Possible Solutions
- Please file a ticket via our Discord server.
The paymaster's signature is outside of the specified time range and has expired.
Possible Solutions
- Make sure you are sending the userOp within the
sponsorship expiryperiod specified in your Gas Manager policy.
The paymaster signature was rejected or verifying the paymaster signature ran out of gas (OOG).
Possible Solutions
- Check that the
verificationGasLimitis high enough to cover thevalidatePaymasterUserOpfunction's gas costs. - If the userOp is well formed with a high enough
verificationGasLimit, please file a ticket via our Discord server.
The paymaster's signature is invalid.
Possible solutions
- Check the format of the signature in the
paymasterAndDataor thepaymasterfield depending on the EntryPoint version you are using.
The amount of gas used to verify the smart account or paymaster signature was higher than userOp's verificationGasLimit.
Possible Solutions
- Check that the
verificationGasLimitset for the userOp is high enough to cover the gas used for smart account and paymaster verification. - Investigate why the smart account and/or paymaster used more gas than expected using tools like Tenderly.
- Please file a ticket via our Discord server.
Verifying the userOp took too much gas and did not complete.
Potential Solutions
- Increase the
verificationGasLimit.
The paymaster contract's postOp function reverted.
Possible Solutions
- Please file a ticket via our Discord server.
The actual gas cost of the userOp ended was higher than the prefund covered by the smart account or the paymaster.
The bundler specified an invalid address or the zero address as the beneficiary of the userOp.
Possible Solutions
- Please file a ticket via our Discord server.
The beneficiary of the bundler fee was unable to receive compensation from the EntryPoint.
Possible Solutions
- Please file a ticket via our Discord server.
A function intended only for internal calls within the EntryPoint was called externally. This occurs if innerHandleOp is invoked by an address other than the EntryPoint itself.
Possible Solutions:
- Do not call
innerHandleOpdirectly from outside the EntryPoint. - Ensure you are calling the EntryPoint’s main methods (
handleOps, etc.) rather than internal helper methods.
The paymasterAndData field is of an incorrect length.
Possible Solutions
- Check that
paymasterAndDatais either empty or at least 20 bytes long.
A gas value of the userOp did not fit into a uint160.
Possible Solutions
- Check that all the gas limit and gas price fields of the userOp fit into
uint160.
The entire operation (or a sub-call) ran out of gas. This is usually due to too low gas limits passed to handleOps.
Possible Solutions:
- Increase the gas limit provided to the bundler or
handleOpscall. - Optimize your code to require less gas.
The aggregator address is invalid. For example, it might be the special address(1) marker used internally or not meet aggregator requirements.
Possible Solutions:
- Use a proper aggregator address that implements the
IAggregatorinterface. - Check that you’re not using reserved addresses that are disallowed by the EntryPoint.