-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: e is not a function #327
Comments
Hi! At first sight I can see that you are passing
|
@tomiir thanks so much, this was indeed the problem. After I started passing let status = await window.ic.plug.isConnected();
if (status) {
console.log(status, host, canisterId, idlFactory);
const actor = await window.ic.plug.createActor({ host, canisterId, interfaceFactory: idlFactory });
let result = await actor.popular_tags();
} However now I run into the next problem with this newly created agent. Whenever I call any function on it (eg |
Btw, I figured out the issue - my flow reloaded the window after the connection and this destroyed the agent. I'm puzzled right now how to avoid reconnecting on every new app visit, but will consult the docs first. Sorry for the noise! |
FYI, I decided to not integrate Plug for now. I managed to get it working, but I don't think the only workflow I found working is user friendly. Let me sketch the issues I encountered so that you can consider improving them in the future.
I help it helps during the future development! |
Reopening this issue as it contains a lot of valid points and possible improvements. |
Hi @taggrx.
We'll be scoping and planning these fixes next week and will let you know when they are released. |
Thanks so much for addressing my feedback! I should have more time in a couple of weeks and would be very happy to try integrating Plug again! |
Hi! @taggrx wanted to do a follow up on this points
Will keep the issue open till we release 0.6. Thank you very much for all the feedback :D |
Dear team,
I've played with the Plug Wallet and tried to integrate it into my small app, but to no avail. I'm using version
0.4.4
with latest Firefox and here's my code almost without any modifications from your docs:The first 3 lines work as expected and I see a console output with
status
beingtrue
, my canister id and that theidlFunction
is initialized. However, the execution ofcreateAgent
fails with an exception (see the screenshot).Since it's an internal exception and not an error returned from the actor constructor, I am a bit clueless about how to proceed.
Any help is appreciated!
The text was updated successfully, but these errors were encountered: