Hi, does Pocket-ic have other restrictions on wasm size than IC in general. I have no problems running my canister locally or deploying to mainnet. But, when using pocket-ic:
Failed to submit ingress message: Request 0x73f6562d82a01782d062f91443751263bd72382d3fd4fa925bc4dadfebb6eeef is too large. Message byte size 2546230 is larger than the max allowed 2097152.
On an application subnet, the limit is at 2M just like in PocketIC. Locally, the request could work on a system subnet, but on mainnet, it won’t work on an application subnet. Which mainnet subnet were you targetting?
Given that you can deploy your canister both locally and on mainnet, did you double check that you actually pass correctly the Gzip file path to Pocket-ic and not inadvertently the path to the Wasm?
Given that you can deploy your canister both locally and on mainnet, did you double check that you actually pass correctly the Gzip file path to Pocket-ic and not inadvertently the path to the Wasm?
That could totally have happened! But not this time. The byte size specified in the message, 2,5 mb ca, is the compressed size. BoaEngine I believe take up a lot of that space.
I was under the impression the allowed WASM size for canisters had been raised quite significantly, back in January or there around. See here for instance:
Also, for testing, I tried installing my canister unzipped to ic, 9+ mb, that worked without issue.
If you use dfx to deploy your canister on mainnet, then dfx would chunk your WASM and upload the chunks in multiple update calls (using the so-called large WASM feature). PocketIC doesn’t do that yet which might be why you perceive a different behavior.
Some parts can of course be unit tested. But, all parts that require ic specific features would need to be mocked, which is quite messy. I am surprised not more devs have run into this. Maybe testing of canisters is not a big thing.
To begin with I’ll try replacing the JS runtime I use in the canister to see if I can squeeze size below limit. That was the plan anyway. Large wasm support further on would be fantastic though!
Any updates on this? I’m running into this with pic.js 10.0…my wasm zipped is just over the limit. It has another actor that it deploys. I can pull that out from a reference and upload the bytes into the canister after deploy, but this will extend the setup time and is just generally annoying to have to do.
I see that it was added in 5.0.0, but I’m guessing that pic may not be using it. I’ll investigate.
the store_canister is the canister ID of the canister that hosts the chunks (it can be the same canister as the installed canister or a different canister on the same subnet)
the sender_canister_version must not be set for ingress message (it could only be set for inter-canister calls as the sender’s canister version returned by the ic0.canister_version system API before making the inter-canister call)