I can't generate meta Data
Abubakr22 opened this issue · comments
PS C:\Users\sarda\Documents\OpenSea\Code\create-10k-nft-collection-2.0.0> npm run upload_metadata
10k-collection-video@2.0.0 upload_metadata
node utils/nftport/uploadMetas
Starting upload of metadata...
CATCH ERROR: ERROR STATUS: 422
Retrying
CATCH ERROR: ERROR STATUS: 422
@Abubakr22 you've opened this issue in the wrong place. You're using codeSTACKr's repo, open an issue there instead.
they don't even replay man
@Abubakr22 I can have a go at fixing this.
In the nftport docs it says that 422 can be any of a large number of different erros, so it on it's own isn't very helpful.
Can you change line ~44 of utils/functions/fetchWithRetry.js
:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/utils/functions/fetchWithRetry.js#L43-L45
To:
} else {
throw `ERROR STATUS: ${status}, ${res.json()}`;
}
So it should print the actual error as well.
Could you then paste the output of running npm run upload_metadata
here please.
Thanks for the replay I really appreciate it !
PS C:\Users\sarda\Documents\OpenSea\Code\NFT Generator> npm run upload_metadata
10k-collection-video@2.0.1 upload_metadata
node utils/nftport/uploadMetas
Starting upload of metadata...
CATCH ERROR: ERROR STATUS: 422, [object Promise]
@Abubakr22 what if you change line 41:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/utils/functions/fetchWithRetry.js#L40-L42
to:
if (true) {
return res.json();
Then insert:
console.error(json);
Between lines 47-48:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/utils/functions/fetchWithRetry.js#L47-L48
PS C:\Users\sarda\Documents\OpenSea\Code\NFT Generator> npm run upload_metadata
10k-collection-video@2.0.1 upload_metadata
node utils/nftport/uploadMetas
Starting upload of metadata...
{
response: 'NOK',
error: {
status_code: 422,
code: 'value_error_any_str_min_length',
message: {
loc: [Array],
msg: 'ensure this value has at least 1 characters',
type: 'value_error.any_str.min_length',
ctx: [Object]
}
}
}
CATCH ERROR: NOK: [object Object]
Retrying
Terminate batch job (Y/N)?
@Abubakr22 it looks like your build/json/*
metadata files are either missing some string field, or it's empty. Could you paste the file build/json/1.json
? You may have to try regenerating, with the fork that you're on at the moment.
Sure thx for help :
{
"name": "Wild Shells #1",
"description": "Wild Shells is a truly unique NFT collection created by 14-year-old, Abubakr. This collection features a stunning array of shells, each with its own personality ands traits, making it an absolute must-have for any discerning NFT collector.",
"file_url": "https://ipfs.io/ipfs/bafkreiefgs5ly74gw7bvz7zkup6gfvqoyxgkv62s3t2uji6o5pfkfuhnwm",
"image": "https://ipfs.io/ipfs/bafkreiefgs5ly74gw7bvz7zkup6gfvqoyxgkv62s3t2uji6o5pfkfuhnwm",
"attributes": [
{
"trait_type": "Background",
"value": "Blue"
},
{
"trait_type": "Skins",
"value": "Red SKIN"
},
{
"trait_type": "Shells",
"value": "Style3"
},
{
"trait_type": "Outline",
"value": "Outline"
},
{
"trait_type": "ShellWear",
"value": "Blank"
},
{
"trait_type": "Eyes",
"value": "Evil Blue Eye"
},
{
"trait_type": "Glasses",
"value": "Black Cool Glasses"
},
{
"trait_type": "Hats",
"value": "Blank"
},
{
"trait_type": "MouthWear",
"value": "Blank"
}
],
"custom_fields": {
"dna": "d0687a893978b6a5f768a1cfa31b470d7be0c97b",
"edition": 1,
"date": 1683057003301,
"compiler": "HashLips Art Engine - codeSTACKr Modified"
},
"external_url": ""
}
@Abubakr22 it looks like it could be external_url
. You could try modifying utils/update_info.js
to either set it or remove it, depending on whether you have a website that you want linking.
You could add (if you have a website):
item.external_url = "insert://website.name/here";
Or if you don't have a website you want linking:
delete item.external_url;
Then you can run either npm run update_info
or node utils/update_info.js
to run (it doesn't matter what you answer to the questions it asks you).
I am minting the metadata but this error is showing up.
}
PS C:\Users\sarda\Documents\OpenSea\Code\NFT Generator> npm run mint --start=1 --end=4000
10k-collection-video@2.0.1 mint
node utils/nftport/mint %npm_config_start% %npm_config_end%
OK to mint 1-4000? (y/n): y
{
response: 'NOK',
error: {
status_code: 422,
code: 'invalid_address',
message: 'Invalid address: contract_address.'
}
}
CATCH ERROR: NOK: [object Object]
Retrying
Terminate batch job (Y/N)?
I am loving your help.
@Abubakr22 from the nftport docs:
You provided an invalid address. Check that the wallet and contract addresses you're sending are valid EVM addresses.
It says contract_address
is wrong, but it looks like that's something to do with minting. I have no clue how any of this works, so you should probably try to find someone who knows more about crypto/NFTs (you could try asking on the hashlips discord)
Another error : plz check if you can solve this error 429
CATCH ERROR: NOK: [object Object]
Retrying
{
error: {
status_code: 429,
code: 'too_many_requests',
message: 'Too many requests hit the API too quickly (per one second). We recommend an exponential backoff of your requests. See rate limit details at https://docs.nftport.xyz/docs/nftport/ZG9jOjQ1ODQ4NzQ4-quotas. If you need higher limits, see https://www.nftport.xyz/pricing'
}
}
CATCH ERROR: NOK: [object Object]
@Abubakr22 you could try increasing LIMIT
in src/config.js
:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/src/config.js#L45-L47
Error:
PS C:\Users\sarda\Documents\OpenSea\Code\NFT Generator> npm run mint
10k-collection-video@2.0.1 mint
node utils/nftport/mint %npm_config_start% %npm_config_end%
OK to mint ALL? (y/n): y
{
response: 'NOK',
error: {
status_code: 422,
code: 'invalid_address',
message: 'Invalid address: contract_address.'
}
}
CATCH ERROR: NOK: [object Object]
Retrying
{
error: {
status_code: 429,
code: 'too_many_requests',
message: 'Too many requests hit the API too quickly (per one second). We recommend an exponential backoff of your requests. See rate limit details at https://docs.nftport.xyz/docs/nftport/ZG9jOjQ1ODQ4NzQ4-quotas. If you need higher limits, see https://www.nftport.xyz/pricing'
}
}
@Abubakr22 the first error is because you haven't set CONTRACT_ADDRESS
on line 58. For the second error, it looks like utils/nftport/mint.js
sets it's own rate limit, you could try increasing it on line 22:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/utils/nftport/mint.js#L21-L23
How can I update CONTRACT_ADDRESS as I have add it
@Abubakr22 you change YOUR CONTRACT ADDRESS
:
https://github.com/codeSTACKr/create-10k-nft-collection/blob/ce244474da4839671f49eb7d6f3f199f518f243c/src/config.js#L53-L55
To your contract address.
Hi bro thx you so much I am able to do it. I have uploaded it to test chine would you mind telling me the way to upload it to the Main Chain?
I want to upload it in Ethereum if not then Polygon
@Abubakr22 I have no clue, you could try asking someone who knows more (maybe on the hashlips discord server)