I have:
Debug.print("A6");
let inst = await pm.installPackageWithPreinstalledModules({
packageName = "icpack";
version = "0.0.1"; // TODO: should be `"stable"`
preinstalledModules = [("frontend", frontend)];
repo;
caller;
callback = ?bootstrapBackendCallback;
});
Debug.print("A7");
and
public shared({caller}) func installPackageWithPreinstalledModules({
packageName: Common.PackageName;
version: Common.Version;
preinstalledModules: [(Text, Principal)];
repo: Common.RepositoryPartitionRO;
caller: Principal;
callback: ?(shared ({
installationId: Common.InstallationId;
can: Principal;
caller: Principal;
}) -> async ());
})
: async {installationId: Common.InstallationId}
{
Debug.print("B1");
onlyOwner(caller);
Debug.print("B2");
await* _installPackage({caller; packageName; version; preinstalledModules = ?preinstalledModules; repo; callback});
};
How so that A6
is printed and B1
isn’t?!
...
2024-10-06 17:54:12.074027733 UTC: [Canister by6od-j4aaa-aaaaa-qaadq-cai] A6
2024-10-06 17:54:13.406173747 UTC: [Canister 6zqe7-uuaaa-aaaaa-qacia-cai] Indirect caller: IC0503: Error from Canister 66rcl-zmaaa-aaaaa-qaciq-cai: Canister called
ic0.trap with message: IDL error: unexpected IDL type when parsing Principal.
Consider gracefully handling failures from this canister or altering the canister to handle exceptions. See documentation: http://internetcomputer.org/docs/current/references/execution-errors#trapped-explicitly
There isn’t anything between A6
and B1
that would prevent B1
to be printed. That a one-way method fails with an error (Indirect caller
error is printed by Debug.print
in an one-way tunction) during execution of the ongoing code should not prevent B1
to be printed… I misunderstand something.