Closed nalonsoxcode closed 2 years ago
Hi @nalonsoxcode, thank you for the useful information.
The PHP exception is about a "Syntax error" raised by the Nette
JSON library. This means that you may have an error in your JSON syntax.
Here is a common error that many users face with hidden metadata, the following is an example hidden.json
file:
{
"name": "HVS ?",
"description": "A simple metaverse house made for a HashLips tutorial.",
"image": "ipfs://QmVKcPMxD4rKpR6pQngUaTtPPwC9Ai8NyoXiAxtXhW3eTD",
"compiler": "HashLips Art Engine"
}
Many users remove the compiler
property but forget to remove the trailing comma:
{
"name": "HVS ?",
"description": "A simple metaverse house made for a HashLips tutorial.",
"image": "ipfs://QmVKcPMxD4rKpR6pQngUaTtPPwC9Ai8NyoXiAxtXhW3eTD",
}
The code above is not valid JSON. Your error may be something else, but I suggest you to paste your hidden.json
code into a JSON editor like https://jsoneditoronline.org/ and check if there are any errors.
Let me know if this helps fixing the errors.
Amazing Marco you are absolutely 100% on point! Just that little , :) removed and worked perfectly fine! Thanks for your amazing support to the community. You guys got some ETH coming your way!
Thank you very much, I'm happy to hear it worked. 😉
Good luck with your project!
Hey guys! Just updating here. There is an issue with the hidden metadata file structure. It basically fails with this error when you poll the metadata of an unminted NFT:
{"type":"https:\/\/tools.ietf.org\/html\/rfc2616#section-10","title":"An error occurred","status":500,"detail":"Internal Server Error"}
For minted ones it works great!! I followed all the video instructions as well. The folder in the space for hidden metadata is called "hidden" and inside there are the hidden.json and hidden.png files.
I also pulled these logs. You can see a "Syntax Error".
[metadata-provider] [2022-02-13 05:48:56] {"message":"Uncaught PHP Exception Nette\Utils\JsonException: \"Syntax error\" at /workspace/vendor/nette/utils/src/Utils/Json.php line 58","context":{"exception":{"class":"Nette\Utils\JsonException","message":"Syntax error","code":4,"file":"/workspace/vendor/nette/utils/src/Utils/Json.php:58"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-02-13T05:48:56.011170+00:00","extra":{}}