Tried to call the event method of this OpenChat channel community canister (dgegb-daaaa-aaaar-arlhq-cai), but the error report that there is no such method, is this a call error somewhere on my part?
“Message”: "IC0536: Error from Canister dgegb-daaaa-aaaar-arlhq-cai: Canister has no query method ‘__get_candid_interface_tmp_hack’…\nCheck that the method being called is exported by the target canister. See documentation:
is you mean line 816, thats events : (EventsArgs) -> (EventsResponse) query; on the link you shared.
The error doesnt seem to be on your part, it seems that they don’t expose that specific method to make the candid interface public (outside of github), wonder why, @hpeebles?
Yes, I’ve tried multiple ways to request the corresponding method and there’s no way to check the public did method in the dashboard.
I would like to try to get information about certain groups by calling the canister of openchat.
We have ~200k canisters, so adding the candid file to each one will add a huge amount of storage usage unnecessarily.
The candid file for each one can be found in the OC repo, so you can save that locally and then DFX will be able to determine the args correctly.
I think I understand why there is no did file, but how do I call canister on any group to get the chat messages in the group?
I’ve called it a couple times and it gives me an error
The error is openchatCanister.events is not a function.
It’s not in the canister I’m calling, so I’m not sure what’s wrong, if it’s a problem with the parameters it won’t be this error
Thanks for the heads up, but I’ve tried multiple more ways and still can’t call it, could this be because some communities require permissions to call the interface?
Use dfx call:
Use the ic0 js library:
Calling the __get_candid_interface_tmp_hack method was not my intention, it seems that ic0 calls this method by default
Uncaught (in promise) AgentError: Call failed:
Canister: dgegb-daaaa-aaaar-arlhq-cai
Method: __get_candid_interface_tmp_hack (query)
"Status": "rejected"
"Code": "CanisterError"
"Message": "IC0536: Error from Canister dgegb-daaaa-aaaar-arlhq-cai: Canister has no query method '__get_candid_interface_tmp_hack'..\nCheck that the method being called is exported by the target canister. See documentation: http://internetcomputer.org/docs/current/references/execution-errors#method-not-found"
After adding the --query command, I have successfully called this method anyway, thanks for the reply.
With the following command I can call the corresponding interface: