Await canister response forever

so from my browser js client, i called my canister const result = await agent.update_call() and in the canister’s update_call, it made intercanister icrc2_transfer_from call on a token… it went ok and the canister’s state got changed after the transfer… but the browser never got the #Ok from the canister. it’s worsens the user experience on my dapp leaving the users confused “is it done or not?”

should i use polling instead? is there some settings on the browser js i must do? like setting a timeout or something? is it because my canister is in a different subnet from that token?

I’m using Plug wallet and npm @slide-computer/signer-agent btw

browser never got the #Ok from the canister

The browser should always get a response, cross subnet inter canister calls can make the wait longer though (2 sec → 4+ sec).

Does this issue happen with all canister calls or only this particular canister call?

Are you using 3.16.0? Could you try 3.14.0 or older?

Also you can try either @slide-computer/signer-extension (now supports Plug) and @slide-computer/signer-transport-plug (deprecated), and see if the issue is with one or the other.

yea on localhost, everything is smooth… this issue only happens on mainnet. i’ve tried it myself twice and never got the #Ok after the update call was successful. perhaps i should delete my current canister, and redeploy a new one and use --next-to so that it’s in the same subnet?

by “calls” i assume endpoints? if so, yea only this one endpoint, every time i call it, the #Ok was never received by the browser client.

i’m using 3.16.0 because i remember 3.15.0 was causing some errors for even trying to make a call.. i forgot what it was. alright i’ll try it.