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 when Calling uploadMetadata method() #138

Closed
MNaguib2611 opened this issue Jun 17, 2022 · 6 comments
Closed

Error when Calling uploadMetadata method() #138

MNaguib2611 opened this issue Jun 17, 2022 · 6 comments

Comments

@MNaguib2611
Copy link

MNaguib2611 commented Jun 17, 2022

I am getting the below error whenever I try to use the uploadMetadata method() from my react project
i am using other methods like getNftByCreator () without any issues

Uncaught (in promise) TypeError: _bundlr_network_client__WEBPACK_IMPORTED_MODULE_0__ is not a constructor at BundlrStorageDriver.initNodeBundlr (BundlrStorageDriver.ts:195:1) at BundlrStorageDriver.initBundlr (BundlrStorageDriver.ts:175:1) at BundlrStorageDriver.bundlr (BundlrStorageDriver.ts:162:1) at BundlrStorageDriver.uploadAll (BundlrStorageDriver.ts:84:1) at StorageClient.uploadAll (StorageClient.ts:45:1) at Object.handle (uploadMetadata.ts:33:1) at Task.callback (OperationClient.ts:66:1) at Task.ts:82:1 at Disposable.run (Disposable.ts:34:1) at Task.forceRun (Task.ts:74:1)

const fromWallet = Keypair.generate(); console.log(fromWallet); const connection = new Connection(clusterApiUrl("devnet")); const metaplex = Metaplex.make(connection) .use(keypairIdentity(fromWallet)) .use( bundlrStorage({ address: "https://devnet.bundlr.network", providerUrl: "https://api.devnet.solana.com", timeout: 60000, }) );

const { uri } = await metaplex.nfts().uploadMetadata({ name: "My NFT", description: "My description", image: "https://arweave.net/rP-4r6VookQuSb8IjEep5bZgh6Z7c-MAW8uTkhtczOw", });

Someone else on stackoverflow have my same issue

https://stackoverflow.com/questions/72626538/typeerror-bundlr-network-client-webpack-imported-module-0-is-not-a-construc

@mrdhanz
Copy link

mrdhanz commented Jun 20, 2022

Keypair wallets only work on nodes, because you deploy them on the web. You must use a wallet adapter. so, bundlr need confirmation signature to upload and verify transaction

@MNaguib2611
Copy link
Author

Keypair wallets only work on nodes, because you deploy them on the web. You must use a wallet adapter. so, bundlr need confirmation signature to upload and verify transaction

thank you for your response
how can I use walletAdapter with the current connected phantom wallet ?

@lorisleiva
Copy link
Contributor

Hey 👋 Whilst typically you'd use the wallet adapter in the browser, you should also be able to handle Keypairs there. I'll try to find time to investigate this issue as soon as I can. Thank you for your understanding. 🌺

@MNaguib2611
Copy link
Author

After using the adapter from https://github.com/solana-labs/wallet-adapter I was finally able to use the uploadMetadata() and minted my first NFT through react app

I was not able to use the function by using the keypairIdentity, only walletAdapterIdentity worked for me

Thank you @lorisleiva @mrdhanz for your help ,I really appreciate it

@dreamsea503
Copy link

dreamsea503 commented Sep 26, 2022

After using the adapter from https://github.com/solana-labs/wallet-adapter I was finally able to use the uploadMetadata() and minted my first NFT through react app

I was not able to use the function by using the keypairIdentity, only walletAdapterIdentity worked for me

Thank you @lorisleiva @mrdhanz for your help ,I really appreciate it

Hi, can you send me the creating NFT codes? or metaplex compatible version?
I got errors while creating. I followed js-example codes too.
And which network did you mint? Testnet or Devnet?

@lorisleiva
Copy link
Contributor

lorisleiva commented Sep 30, 2022

Hi there 👋

I'm going to close this due to inactivity but feel free to open a new issue using the latest version with updated information if you need to.

Thank you for your understanding.

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

4 participants