Reopen - Update-creator-all-rows promise rejection
atomicstorm-hca opened this issue · 12 comments
Originally posted by @kevinfaveri in #16 (comment)
Reopening. It definitely is different. Permissions should be fine.
C:\Users\XXXXXX\Documents\GitHub\solana-candy-factory>yarn update-creator-all-rows
yarn run v1.22.10
$ cd ./nft-manager && yarn update-creator-all-rows
$ node ./scripts/update-creator-all-rows
(node:21136) UnhandledPromiseRejectionWarning: Error
at Strapi.request (C:\Users\XXXXXX\Documents\GitHub\solana-candy-factory\nft-manager\node_modules\strapi-sdk-javascript\build\main\lib\sdk.js:59:23)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Strapi.login (C:\Users\XXXXXX\Documents\GitHub\solana-candy-factory\nft-manager\node_modules\strapi-sdk-javascript\build\main\lib\sdk.js:93:32)
at async updateCreatorAllRows (C:\Users\XXXXXX\Documents\GitHub\solana-candy-factory\nft-manager\scripts\update-creator-all-rows.js:32:3)
(Use node --trace-warnings ...
to show where the warning was created)
(node:21136) 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:21136) [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.
Done in 0.34s.
I pulled fork starting from 4676f11
Will leave this here too:
It is not super admin. It is the "Authenticated" role that must have these permissions. Can you try that? If not, please provide me with a code sandbox, please.
All these are checked for Authenticated. I am not sure what you're looking for with a code sandbox. This is all local. All I did was follow this guide: https://www.quicknode.com/guides/web3-sdks/how-to-mint-an-nft-on-solana-using-candy-machine
I dumped the postgres database and set it up again and got the same result/error.
Yeah. I'm looking at trying to reproduce what is happening to you since I could not reproduce locally to me. It just works by following this guide. I will let the issue open so the community can contribute but I'm afraid that I've reached a point where I do not know how to help.
Also experience this, I'm on mac if that helps
I'm also on mac too but I have not been able to reproduce this in any way lol
Guys just a heads-up, Strapi is just a UI tool for helping people who don't know that much about coding get things running... But it is really an extra (I'm even considering removing it from the project). You can create the nfts-sources
with a simple script that follow the Metaplex standard: https://docs.metaplex.com/nft-standard
i found the issue, missed the part of the auth,
not sure how to improve the err handling of the auth part
Hi all. I was having the exact same problem following the guide at https://www.quicknode.com/guides/web3-sdks/how-to-mint-an-nft-on-solana-using-candy-machine, but then I realized that that guide doesn't mention the Authenticated
role's permissions at all, so I hadn't done that.
This repo's README, does mention this:
! NOTE: Be sure to create an user, after you login with the admin account, that has the role "authenticated", username "admin" and pass "Admin123", as well as add all collections and upload related permissions to the "authenticated" role. To do that, after the user is created, open http://localhost:1337/admin/settings/users-permissions/roles/ select all NFTS permissions as well as Upload permissions for the Authenticated role;; otherwise, the yarn update-creator-all-rows and yarn generate-nfts-sources commands will not work.
So after I did that, the yarn update-creator-all-rows
command didn't error anymore, which is great 💪 , but... it really doesn't update the records in the DB 😕.
I purposely used different creator's address
and seller_fee_basis_points
values from the ones I had set in the NFT records to make sure the script was doing what it's supposed to do but after executing it without any visible error, the values in the DB remain exactly the same as before.
Hi all. I was having the exact same problem following the guide at https://www.quicknode.com/guides/web3-sdks/how-to-mint-an-nft-on-solana-using-candy-machine, but then I realized that that guide doesn't mention the
Authenticated
role's permissions at all, so I hadn't done that.This repo's README, does mention this:
! NOTE: Be sure to create an user, after you login with the admin account, that has the role "authenticated", username "admin" and pass "Admin123", as well as add all collections and upload related permissions to the "authenticated" role. To do that, after the user is created, open http://localhost:1337/admin/settings/users-permissions/roles/ select all NFTS permissions as well as Upload permissions for the Authenticated role;; otherwise, the yarn update-creator-all-rows and yarn generate-nfts-sources commands will not work.
So after I did that, the
yarn update-creator-all-rows
command didn't error anymore, which is great muscle , but... it really doesn't update the records in the DB confused.I purposely used different creator's
address
andseller_fee_basis_points
values from the ones I had set in the NFT records to make sure the script was doing what it's supposed to do but after executing it without any visible error, the values in the DB remain exactly the same as before.
So, how you solve it? add values in DB?
@mmcmp3 I just followed the instructions mentioned in the README file and in my comment:
To do that, after the user is created, open http://localhost:1337/admin/settings/users-permissions/roles/ select all NFTS permissions as well as Upload permissions for the Authenticated role
I mean values in DB was refreshed after all steps?
This issue i mean "I purposely used different creator's address and seller_fee_basis_points values from the ones I had set in the NFT records to make sure the script was doing what it's supposed to do but after executing it without any visible error, the values in the DB remain exactly the same as before."
I just read this part:
The following commands of the nft-manager needs the nft-manager running, so be sure to run yarn nft-manager before running them.
This might be the problem. I had to open another Terminal to execute 'yarn update-creator-all-rows'. Then there are no errors!
Hey @everyone! NFT Manager support with Strapi for generating sources has been dropped from this repo. From now on, I suggest the usage of third party tools, some of them listed here: https://github.com/kevinfaveri/solana-candy-factory#others-tools
Please retry your setup after getting the updated version, and if you still have any issues, please open a new issue.