metaplex-foundation / sugar

Candy Machine Rust CLI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: sugar deploy - Missing collection item in cache

gschweger opened this issue Β· comments

Issue description

I would like to mint an NFT without adding it to a collection.

  1. I added the 0.png and 0.json to the assets directory.
  2. Run sugar launch
  3. The sugar validate command sends a message about the missing collections files in assets folder and asks if I want to continue.
  4. Yes, I want to continue.
  5. Validation passes.
  6. sugar upload passes.
  7. sugar deploy fails with this error message: πŸ›‘ Error running command (re-run needed): Missing collection item in cache

Here is the generated cache.json:

{
  "program": {
    "candyMachine": "",
    "candyGuard": "",
    "candyMachineCreator": "",
    "collectionMint": ""
  },
  "items": {
    "0": {
      "name": "Number outside collection",
      "image_hash": "36ae5333e54b457cedcc6ec93a84970f05ed57452ca9745a0768ed40cd93e5fa",
      "image_link": "https:///bucket_name.s3.amazonaws.com/nft/0.png",
      "metadata_hash": "f844f1e2e7e6822ff132ec67153732bd6087ecbd67799d03903ab33c765a97d5",
      "metadata_link": "https://bucket_name.s3.amazonaws.com/nft/0.json",
      "onChain": false
    }
  }
}

Relevant log output

$ sugar launch --rpc-url https://api.devnet.solana.com/ --log-level info --strict assets/

Starting Sugar launch... πŸš€ 

>>> sugar validate

[1/1] πŸ—‚  Loading assets

+----------------------------------------------+
| ⚠️  MISSING COLLECTION FILES IN ASSETS FOLDER |
+----------------------------------------------+
Check https://docs.metaplex.com/developer-tools/sugar/guides/preparing-assets for the collection file requirements if you want a collection to be set automatically.

βœ” Do you want to continue without automatically setting the candy machine collection? Β· yes

⠁ 
β–ͺβ–ͺβ–ͺβ–ͺβ–ͺ Validating 1 metadata file(s)...

Validation complete, your metadata file(s) look good.

>>> sugar upload

[1/4] πŸ—‚  Loading assets
Found 1 asset pair(s), uploading files:
+--------------------+
| images    |      0 |
| metadata  |      0 |
+--------------------+

....no files need uploading, skipping remaining steps.

1/1 asset pair(s) uploaded.

>>> sugar deploy


πŸ›‘ Error running command (re-run needed): Missing collection item in cache

Priority this issue should have

Low (slightly annoying)

The Candy Machine V3 smart contract enforces using collections for minting from it. You can either use Candy Machine V2 with Sugar v1.2.2, or if your use case is just minting a single NFT there are better tools for that such as Sol Tools V2 and Metaboss.

Hi were you able to fix this issue?
I'm facing the same problem

Hi @confusedeinstein ,
I started to use metaboss, as it was suggested for me in a previous comment. Metaboss was perfect for me.

I think, this issue could be closed