I have a rust backend canister adapted from GitHub - dfinity/icp-eth-starter: An advanced starter project for interacting with Ethereum on the Internet Computer (Beta)
It simply calls an ethereum contract and returns some info. I have this working when calling from the candid UI, and also if calling from a frontend canister.
I switched to calling this canister from an http incall GET request (e.g. directly from postman), and am now receiving the error: "ic0_call_cycles_add128" cannot be executed in non replicated query mode, error code Some("IC0504")
What’s confusing me is that my http_request method is defined as a composite query, so I’d expect this to be running in non replicated query mode already. indeed, if I run it as a vanilla query without defining as composite, I receive a different error that makes sense: "ic0_call_new" cannot be executed in non replicated query mode, error code Some("IC0504")
It seems to be triggered by this method from the ic-cdk api/management_canister/http_request
:
pub async fn http_request(
arg: CanisterHttpRequestArgument,
cycles: u128,
) -> CallResult<(HttpResponse,)> {
call_with_payment128(
Principal::management_canister(),
"http_request",
(arg,),
cycles,
)
.await
}