I’m encountering the following error while deploying my Motoko canister:
I’d like to understand what this error means and how I can resolve it.
The replica returned a rejection error: reject code CanisterError, reject message Error from Canister vizcg-th777-77774-qaaea-cai: Canister’s Wasm module is not valid: Wasm module contains a function at index 0 with complexity 1013027 which exceeds the maximum complexity allowed 1000000..
Try breaking large functions up into multiple smaller functions. See documentation: https://internetcomputer.org/docs/current/references/execution-errors#wasm-module-function-complexity-too-high, error code Some(“IC0505”)