metaplex-foundation / sugar

Candy Machine Rust CLI.
Apache License 2.0
206 stars 117 forks source link

[Bug]: `Image` and `Animation_URL` Uploads are overlooked #359

Closed Neurologist closed 2 years ago

Neurologist commented 2 years ago

Issue description

Steps to reproduce with:

  1. Upload at least 10 GIF image + MP4 animation_url using Sugar Launch command
  2. Deploy

BUG: If the NFT is comprised of animation_url (MP4's) and image (GIFs) or (PNG) Then the sugar upload does not persistently check for completed metadata, it will skip animation_url (Mp4) failed uploads and move on to image and may or may not complete it before forcefully deploying candy machine.

Candy Machine v2 would persistently check the upload and before deploying one could be sure that both were fully uploaded correctly before allowing candy machine from being deployed

Attempt #2 There is an issue with sugar allowing "failed uploads" to proceed and even deploy the candy machine.

Example 1: Uploading image and video NFTs A. Video Upload fails at 300/600 uploads -- sugar proceeds to Upload Images B. All images upload C. Candy Machine is deployed, NFTs are missing data -- so videos are not present, but images are

Proposing adding a check or to persistently request these uploads.

I've had to use metaboss to update the animation_url -- I've recreated this many times on Windows on different machines

Below you can see that it allows deployment of Candy Machine despite having failed uploads. This error is happening again and again across different machines and networks

Relevant log output

[3/5] 📤 Uploading image files

Sending data: (Ctrl+C to abort)
[00:00:09] Upload successful ███████████████████████████████████████████████████████████████████████████████████████ 2/2

[4/5] 📤 Uploading animation files

Sending data: (Ctrl+C to abort)
[00:01:24] Upload failed ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0/1

[5/5] 📤 Uploading metadata files

Sending data: (Ctrl+C to abort)
[00:00:00] Upload successful ███████████████████████████████████████████████████████████████████████████████████████ 2/2

2/2 asset pair(s) uploaded.

sugar deploy

[1/3] 🍬 Creating candy machine
Candy machine ID: DALtHavvaJtKwR1ELcokGZFoeK9SfDpvdkqTzn2Z87xe

[2/3] 📦 Creating and setting the collection NFT for candy machine
Collection mint ID: 3a6GNRRU5wGhCaUYBuppSGYZZao5Kk9qKu1tjeNwocj7

[3/3] 📝 Writing config lines
Sending config line(s) in 1 transaction(s): (Ctrl+C to abort)
[00:00:02] Write config lines successful ███████████████████████████████████████████████████████████████████████████ 1/1

>>> sugar verify

[1/2] 🍬 Loading candy machine
▪▪▪▪▪ Completed

[2/2] 📝 Verification
Verifying 1 config line(s): (Ctrl+C to abort)
[00:00:01] Config line verification successful █████████████████████████████████████████████████████████████████████ 1/1

Verification successful. You're good to go!

Priority this issue should have

Low (slightly annoying)

Neurologist commented 2 years ago

Upload Skipping Error Continues after v1.0 update

This error of skipping failed uploads when uploading image and animation files continues even after the most recent update v1.0

To Recreate:

  1. Assets = 0.gif + 0.mp4 + 0.json (Use a couple hundred pairs)
  2. Upload assets via Sugar Launch
  3. When uploading a couple hundred pairs, failed image uploads skip to failed video uploads and skip to fail totally
  4. cache.json generated will not contain animation_url links to arweave files, it will totally skip them

[2/5] 🖥  Initializing upload
▪▪▪▪▪ Connected
Funding address:
  -> pubkey: DeBtJy88jrnheD8F3HEAqiQztykXksgMyvmcByHC5RGv
  -> lamports: 126601662 (◎ 0.126601662)
Signature: 5wr1vED5oVYSoqAu9Q9sLoMW9UN14dUeeHY2af78ziLV492PuA4h1KSCYakQ7CbsaMgyLoyGJKfSa8p3G2T5uEyd

[3/5] 📤 Uploading image files

Sending data: (Ctrl+C to abort)
[00:21:40] Upload failed ███████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 126/421

[4/5] 📤 Uploading animation files

Sending data: (Ctrl+C to abort)
[00:18:45] ██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 24/421

Forced to use Metaboss to add animation_urls

This would be a nightmare to handle if each NFT were unique and randomized among data set I hope someone can help recreate the error and fix ! Thank you