Closed freahmanCoder closed 2 years ago
same issue here.
createExternalPriceAccount function return many value so you can try that:
const { externalPriceAccount, priceMint, txId: epa_txId } = await createExternalPriceAccount({connection,wallet});
createExternalPriceAccount function return many value so you can try that:
const { externalPriceAccount, priceMint, txId: epa_txId } = await createExternalPriceAccount({connection,wallet});
(node:14116) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toBase58' of undefined
at D:\solona\node_modules\@solana\web3.js\lib\index.cjs.js:2486:38
at Array.sort (node --trace-warnings ...
to show where the warning was created)
(node:14116) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was no
t handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (
rejection id: 1)
(node:14116) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
it seems this change cause some kind of null error when it want to convert some undefined object to base58 type.
In my case, I use useAnchorWallet (@solana/wallet-adapter-vue) so I think bug from wallet vaiable. If it don't pass , i don't know how to fix
Same issue here, simply following the test's code does not work. The last instruction from the batch logs this:
Program log: Instruction: Init Vault
Program log: libstd rust_begin_panic
Program log: panicked at 'index out of bounds: the len is 0 but the index is 0', token-vault/program/src/utils.rs:255:9
UPDATE:
Even though the transaction simulation fails, forcing it to go through with {skipPreflight: true}
makes it work, not sure how feasible this is in a production environment. Now the question is: why does the simulation fail for a valid transaction?
Confirming the EPA transaction should resolve this. Whether that is a direct solution, or just enough delay for something else to fix itself, I am not sure. The panic happens when loading account info, so it is possible that the EPA does not exist yet during the preflight check and it panics on loading that account.
Confirming the EPA transaction should resolve this. Whether that is a direct solution, or just enough delay for something else to fix itself, I am not sure. The panic happens when loading account info, so it is possible that the EPA does not exist yet during the preflight check and it panics on loading that account.
where can I set the EPA transaction exactly? I'm new to blockchain and really not much about it on internet, ty.
Same issue here, simply following the test's code does not work. The last instruction from the batch logs this:
Program log: Instruction: Init Vault Program log: libstd rust_begin_panic Program log: panicked at 'index out of bounds: the len is 0 but the index is 0', token-vault/program/src/utils.rs:255:9
UPDATE: Even though the transaction simulation fails, forcing it to go through with
{skipPreflight: true}
makes it work, not sure how feasible this is in a production environment. Now the question is: why does the simulation fail for a valid transaction?
it work ! it finally return me a vault key that I can use, I hope they fix this issue in the future.
Same issue here any help. How can I Confirm the EPA transaction? @basvanberckel @freahmanCoder
I am also facing the same issue..any help will be highly appreciated.. @swaroopmaddu @basvanberckel @freahmanCoder logs: [ 'Program 11111111111111111111111111111111 invoke [1]', 'Program 11111111111111111111111111111111 success', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]', 'Program log: Instruction: InitializeMint', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2457 of 200000 compute units', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success', 'Program 11111111111111111111111111111111 invoke [1]', 'Program 11111111111111111111111111111111 success', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]', 'Program log: Instruction: InitializeAccount', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3394 of 200000 compute units', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success', 'Program 11111111111111111111111111111111 invoke [1]', 'Program 11111111111111111111111111111111 success', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1]', 'Program log: Instruction: InitializeAccount', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3294 of 200000 compute units', 'Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success', 'Program 11111111111111111111111111111111 invoke [1]', 'Program 11111111111111111111111111111111 success', 'Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn invoke [1]', 'Program log: Instruction: Init Vault', 'Program log: libstd rust_begin_panic', "Program log: panicked at 'index out of bounds: the len is 0 but the index is 0', token-vault/program/src/utils.rs:255:9", 'Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn consumed 7621 of 200000 compute units', 'Program failed to complete: BPF program panicked', 'Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn failed: Program failed to complete' ]
I think i got it working const externalPriceAccountData = await actions.createExternalPriceAccount({ connection, wallet }); await connection.confirmTransaction(externalPriceAccountData.txId, 'finalized');
Describe the bug I was trying to follow the metaplex/ARCHITECTURE to go through the auction create process on the newest branch, at the step that init_vault I have find that a vault programId is required, so I assume I need to createVault first. I write a test just like js/test/actions/utility/createVault.test.ts under the test folder like this The test Code
const {NETWORK} = require( '../utils.js'); const {NodeWallet, Connection, actions,} = require('@metaplex/js'); const {Keypair} = require("@solana/web3.js"); const run = async () => { let secretKey = Uint8Array.from([201,162,79,172,165,174,192,100,11,66,227,92,30,6,251,238,150,68,135,102,144,122,253,15,132,30,8,197,103,68,15,43,122,217,96,105,28,50,43,80,22,229,175,115,94,1,165,67,120,112,94,166,157,208,59,94,88,241,130,111,81,228,15,1]); let myKeypair = Keypair.fromSecretKey(secretKey); let wallet = new NodeWallet(myKeypair); const connection = new Connection(NETWORK); const externalPriceAccountData = await actions.createExternalPriceAccount({ connection, wallet }); // creat const vaultResponse = await actions.createVault({ connection, wallet, ...externalPriceAccountData, });
console.log("vaultResponse :" +JSON.stringify(vaultResponse)); }; run();
Expected behavior I want it to return the vault I just create to continue the process how ever I got an error like this
Screenshots Transaction simulation failed: Error processing Instruction 7: Program failed to complete Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1] Program log: Instruction: InitializeMint Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 2457 of 200000 compute units Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1] Program log: Instruction: InitializeAccount Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3394 of 200000 compute units Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA invoke [1] Program log: Instruction: InitializeAccount Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA consumed 3294 of 200000 compute units Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA success Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn invoke [1] Program log: Instruction: Init Vault Program log: libstd rust_begin_panic Program log: panicked at 'index out of bounds: the len is 0 but the index is 0', token-vault/program/src/utils.rs:255:9 Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn consumed 7621 of 200000 compute units Program failed to complete: BPF program panicked Program vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn failed: Program failed to complete (node:11584) UnhandledPromiseRejectionWarning: Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 7: Program failed to complete at Connection.sendEncodedTransaction (D:\solona\node_modules\@solana\web3.js\lib\index.cjs.js:6634:13) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Connection.sendRawTransaction (D:\solona\node_modules\@solana\web3.js\lib\index.cjs.js:6593:20) (Use
node --trace-warnings ...
to show where the warning was created) (node:11584) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:11584) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.Desktop (please complete the following information):
Additional context I install the metaplex store as well and find out the param on that one is almost the same but the creatVault work on the store, I wonder am I doing anything wrong.