What type of topic is this?
Bug Report
This is my worked code(await ICPagent.fetchRootKey() solve previous problem:
import { AuthClient } from "https://cdn.jsdelivr.net/npm/@dfinity/auth-client@1.3.0/+esm"; import { HttpAgent } from "https://cdn.jsdelivr.net/npm/@dfinity/agent@1.3.0/+esm"; const ICPauthClient = await AuthClient.create(); window.ICPauthClient = ICPauthClient import isomorphicFetch from 'https://cdn.jsdelivr.net/npm/isomorphic-fetch@3.0.0/+esm' const host = 'local' === 'local' ? 'http://127.0.0.1:4943' : 'https://icp-api.io'; const ICPagent = new HttpAgent({ isomorphicFetch, host }); //isomorphicFetch, host, fetchOptions }); await ICPagent.fetchRootKey() console.log("ICPagent " + JSON.stringify(ICPagent)) window.ICPagent = ICPagent const get_counter = await window.ICPagent.query( 'be2us-64aaa-aaaaa-qaabq-cai', { methodName: 'get_counter', arg: new ArrayBuffer(0), }, ) console.log("get_counter " + JSON.stringify(get_counter))
But it produse new error:
get_counter {βstatusβ:βrejectedβ,βerror_codeβ:βIC0503β,βreject_codeβ:5,βreject_messageβ:βIC0503: Canister be2us-64aaa-aaaaa-qaabq-cai trapped explicitly: failed to decode call arguments: Custom(Cannot parse header \n\nCaused by:\n binary parser error: io error)β,βsignaturesβ:[{βtimestampβ:β1715333024548043000β,βsignatureβ:{β0β:154,β1β:119,β2β:93,β3β:195,β4β:99,β5β:202,β6β:18,β7β:48,β8β:182,β9β:34,β10β:170,β11β:34,β12β:104,β13β:172,β14β:171,β15β:1,β16β:197,β17β:21,β18β:118,β19β:127,β20β:163,β21β:148,β22β:241,β23β:87,β24β:115,β25β:149,β26β:252,β27β:156,β28β:217,β29β:171,β30β:129,β31β:137,β32β:192,β33β:226,β34β:104,β35β:170,β36β:76,β37β:144,β38β:68,β39β:205,β40β:172,β41β:146,β42β:124,β43β:116,β44β:135,β45β:10,β46β:23,β47β:144,β48β:190,β49β:150,β50β:6,β51β:105,β52β:121,β53β:77,β54β:72,β55β:255,β56β:95,β57β:43,β58β:137,β59β:186,β60β:127,β61β:68,β62β:10,β63β:10},βidentityβ:{β0β:237,β1β:78,β2β:21,β3β:221,β4β:245,β5β:204,β6β:213,β7β:51,β8β:231,β9β:76,β10β:3,β11β:98,β12β:24,β13β:55,β14β:119,β15β:87,β16β:127,β17β:245,β18β:29,β19β:228,β20β:215,β21β:14,β22β:33,β23β:7,β24β:157,β25β:118,β26β:74,β27β:7,β28β:2}}],βhttpDetailsβ:{βokβ:true,βstatusβ:200,βstatusTextβ:βOKβ,βheadersβ:[[βcontent-lengthβ,β389β],[βcontent-typeβ,βapplication/cborβ]]},βrequestIdβ:{}}
I try to do args like and it also doesnβt work.