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 running yarn update-creator-all-rows #16

Closed
smwein opened this issue Sep 27, 2021 · 12 comments
Closed

Error when running yarn update-creator-all-rows #16

smwein opened this issue Sep 27, 2021 · 12 comments

Comments

@smwein
Copy link

smwein commented Sep 27, 2021

I get this error when running the update-creator command.

$ node ./scripts/update-creator-all-rows
(node:3303) UnhandledPromiseRejectionWarning: Error: [object Object]
at Strapi.request (/root/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 (/root/solana-candy-factory/nft-manager/node_modules/strapi-sdk-javascript/build/main/lib/sdk.js:93:32)
at async updateCreatorAllRows (/root/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:3303) 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:3303) [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.47s.

Not sure why.

@kevinfaveri
Copy link
Owner

kevinfaveri commented Sep 27, 2021

@imentus-rahul bro you changed the code. It states that the nfts var is not defined.
I suppose you should have a const nfts = await strapi.getEntries('nf-ts')

@smwein not sure too bro... Can you share your code for this script?

@EdenShin
Copy link

@imentus-rahul bro you changed the code. It states that the nfts var is not defined.
I suppose you should have a const nfts = await strapi.getEntries('nf-ts')

@smwein not sure too bro... Can you share your code for this script?

Hi, I met a similar issue. Error showes below:

$ yarn update-creator-all-rows
yarn run v1.22.11
$ cd ./nft-manager && yarn update-creator-all-rows
$ node ./scripts/update-creator-all-rows
(node:15608) UnhandledPromiseRejectionWarning: Error: [object Object]
at Strapi.request (/home/yon/NFT/Metaplex/Tutorial/solana-candy-factory-main/nft-manager/node_modules/strapi-sdk-javascript/build/main/lib/sdk.js:59:23)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:15608) 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:15608) [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.32s.

Thanks a lot.

@atomicstorm-hca
Copy link

Also have this problem as the OP. Is the same if you subsequently run yarn generate-nfts-sources.

@kevinfaveri
Copy link
Owner

kevinfaveri commented Sep 28, 2021

Have you published the NFTs on the dashboard? Created a collection and linked to each NFT?

@Yonatan19981
Copy link

I also have a problem.
image

@Yonatan19981
Copy link

Do you have any idea how to solve it?

@wjl8
Copy link

wjl8 commented Sep 28, 2021

const nfts = await strapi.getEntries('nf-ts')
When`` the program runs to this line, an error is reported. The error is unhandledpromiserejectionwarning: error: forbidden

@Yonatan19981
Copy link

Yes do you have any idea how to fix it?

@wjl8
Copy link

wjl8 commented Sep 28, 2021

是的,你知道如何解决它吗?

Set permissions,In settings

@EdenShin
Copy link

Yes do you have any idea how to fix it?

Set permissions,In settings

More in detail, refer to this stackoverflow thread. Open http://localhost:1337/admin/settings/users-permissions/roles/
Select all permissions for the Authenticated Role, then issue solved.

Screenshot from 2021-09-28 21-54-35

@atomicstorm-hca
Copy link

Just want to point out the above issue with Yonatan is not related to the OP issue and still persists.

Yonatan's issue should be separated from this issue.

@kevinfaveri
Copy link
Owner

@atomicstorm-hca I think it is the same one since the error is forbidden. Anyway, I was not able to reproduce these errors by following closely the README.MD. I will update the README.MD to be more detailed like @EdenShin explained. If any of you were to open another issue, please describe again what is happening and provide either a code sandbox or a fork where I can get the code to reproduce.

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

6 participants