Skip to content
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

Error running example after admin contract adding: TypeError: Cannot destructure property 'publicKey' of 'account' as it is null. #56

Closed
asimaranov opened this issue May 8, 2024 · 5 comments

Comments

@asimaranov
Copy link

When I try to run npm run task examples/concurrent-transfer.eg.ts I got the following trace:

➜  mina-fungible-token git:(main) npm run task examples/concurrent-transfer.eg.ts

(END)...skipping...
> [email protected] task
> node --enable-source-maps --no-warnings= --loader ts-node/esm examples/concurrent-transfer.eg.ts


alexa EKF6.. B62q..
billy .. ..
jackie ...
contract ..
admin ..

Deploying token contract.
Deploy tx: 5JuX8Ye99WoRaDNZodcL6sTihwJLByJTr1cubFXAtKh1V7RQvPg8
Minting new tokens to Alexa.
/workspace_root/src/bindings/ocaml/overrides.js:45
    if (err instanceof Error) throw err;
                              ^


TypeError: Cannot destructure property 'publicKey' of 'account' as it is null.
    at parseFetchedAccount (/Users/andrey/projects/mina-fungible-token/node_modules/o1js/src/lib/mina/account.ts:40:5)
    at fetchAccountInternal (/Users/andrey/projects/mina-fungible-token/node_modules/o1js/src/lib/mina/fetch.ts:222:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at <anonymous> (/Users/andrey/projects/mina-fungible-token/node_modules/o1js/src/lib/mina/fetch.ts:341:22)
    at async Promise.all (index 1)
    at Module.fetchMissingData (/Users/andrey/projects/mina-fungible-token/node_modules/o1js/src/lib/mina/fetch.ts:373:3)
    at <anonymous> (/Users/andrey/projects/mina-fungible-token/node_modules/o1js/src/lib/mina/mina.ts:376:9)
    at <anonymous> (/Users/andrey/projects/mina-fungible-token/examples/concurrent-transfer.eg.ts:109:16)

Node.js v18.19.1
@asimaranov
Copy link
Author

Example stopped to work after moving to the admin contract (commit 0975d5a)

@asimaranov asimaranov changed the title TypeError: Cannot destructure property 'publicKey' of 'account' as it is null. Error running example after admin contract adding: TypeError: Cannot destructure property 'publicKey' of 'account' as it is null. May 8, 2024
@asimaranov
Copy link
Author

@kantp could you please check? It's a blocker for us

@kantp
Copy link
Collaborator

kantp commented May 8, 2024

@qwadratic, could you have a look at this please? I suspect the graphql query might no longer work.

@asimaranov
Copy link
Author

@kantp Example works pretty well on commit 895ec08 but on 0975d5a it fails with this error. For some reason o1js tries to fetch empty public key since admin contract addition and fails here

@kantp
Copy link
Collaborator

kantp commented Jun 26, 2024

Closed by #61

@kantp kantp closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants