pocketic icon indicating copy to clipboard operation
pocketic copied to clipboard

setupCanister with targetCanisterId

Open infu opened this issue 6 months ago • 5 comments

Creating two canisters with specific targetCanisterId's results in error when one of them tries to call the other "Canister ... doesn't exist"

pic-js docs specify "The Id of the canister to create. Can only be used on Bitcoin, Fiduciary, II, SNS and NNS subnets." Does that mean I have to load the NNS state, so we can have a Feduciary subnet where canisters can be installed and then the above scenario will not result in errors?

infu avatar Jul 24 '25 16:07 infu

pic-js docs specify "The Id of the canister to create. Can only be used on Bitcoin, Fiduciary, II, SNS and NNS subnets."

This is a bit outdated. This feature now works with arbitrary mainnet canister IDs.

Could you please share exact instructions to reproduce the issue?

mraszyk avatar Jul 25 '25 09:07 mraszyk

  1. create canister A with specific id
  2. create canister B with specific id
  3. pocketic test calls canister A, canister A makes intercanister call to B (fails here)

pocketic test calling A or B works

infu avatar Jul 28 '25 11:07 infu

  • create canister A with specific id

  • create canister B with specific id

Could you please also share the exact values of the two specified canister IDs and what subnets the PocketIC instance is created with initially?

mraszyk avatar Aug 04 '25 06:08 mraszyk

Don't remember the canister ids anymore. I believe I took random ones from the dashboard. Didn't know that mattered. I didn't specify subnet

infu avatar Aug 18 '25 12:08 infu

In any case, could you please share exact instructions to reproduce the issue if you'd like us to debug it?

mraszyk avatar Aug 18 '25 12:08 mraszyk