Overview
This page documents critical limitations and important considerations when working with CoFHE. Understanding these common issues and error messages will help you troubleshoot problems and build more robust FHE-enabled smart contracts.Quick Error Decoding
Encountering cryptic See the CoFHE Errors Package documentation for full usage instructions and the Error Reference for a complete list of all 53 errors.
execution reverted: 0x... errors? Use the @fhenixprotocol/cofhe-errors package to decode them instantly:Common Issues
Missing Revert Data
If you encounter aMissing revert data error, verify that you’re using the latest cofhe-contracts version.
1
Check your version
Verify the version of
cofhe-contracts in your project:2
Compare with compatibility guide
Check the Compatibility page to ensure you’re using a supported version.
3
Update if necessary
If your version is outdated, update to the latest compatible version:
This section will be expanded over time as new issues arise. If you encounter an issue not documented here, please report it to the Fhenix team.
Possible Errors from Solidity
The following table lists common Solidity errors you may encounter when working with CoFHE contracts. Each error includes a description to help you understand what went wrong and how to fix it.Understanding Error Types
Input Validation Errors:InvalidInputsAmount,InvalidOperationInputs,TooManyInputs,InvalidBytesLength- These errors indicate problems with how data is passed to FHE operations
- Solution: Verify that you’re passing the correct number and type of arguments
InvalidTypeOrSecurityZone,InvalidInputType,InvalidInputForFunction,InvalidSecurityZone- These errors occur when encrypted types don’t match expected types or security zones
- Solution: Ensure encrypted values use compatible types (e.g.,
euint32matcheseuint32) and are in the correct security zone
InvalidSignature,InvalidSigner,InvalidAddress- These errors relate to cryptographic verification and address validation
- Solution: Verify signatures are valid and addresses are properly formatted
OnlyOwnerAllowed,OnlyAggregatorAllowed,SenderNotAllowed,DirectAllowForbidden- These errors indicate permission or access control violations
- Solution: Ensure the correct account is calling the function and that proper permissions are set
AlreadyDelegated,SenderCannotBeDelegateeAddress- These errors occur when delegation operations are invalid
- Solution: Check that delegation hasn’t already occurred and that sender and delegatee addresses are different
Troubleshooting Tips
When encountering errors:- Check error messages carefully: The error name and description provide clues about what went wrong
- Verify input types: Ensure encrypted values match expected types
- Check permissions: Verify that
FHE.allowThis()orFHE.allowSender()have been called where necessary - Review component versions: Ensure all CoFHE components are up to date
- Test in mock environment: Use the mock environment to debug issues without network delays
Next Steps
- Use the CoFHE Errors Package to decode error selectors
- View the complete Error Reference with all 53 errors
- Review the Compatibility page for version requirements
- Learn about access control to prevent authorization errors
- Check best practices for secure FHE development