onflow / freshmint

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Freshmint CLI fails to mint NFTs when switching blockchain networks

conorao opened this issue · comments

Issue:
When minting NFT's with Freshmint's CLI tool on testnet, and then using the same project to mint NFTs on mainnet, a database error is thrown:

$ fresh mint --network mainnet --claim

? Create NFTs using data from editions.csv? Yes

⠹ Checking for duplicate NFTs ...
Error
    at new CustomPouchError (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:656:21)
    at createError (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:665:10)
    at updateDoc (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:4621:15)
    at nextDoc (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:4740:9)
    at /home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:4750:5
    at Map.forEach (<anonymous>)
    at processDocs (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:4724:13)
    at /home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:5650:9
    at checkDone (/home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:5331:18)
    at /home/user/.nvm/versions/node/v16.14.2/lib/node_modules/freshmint/node_modules/pouchdb/lib/index.js:5349:11 {
  status: 409,
  name: 'conflict',
  message: 'Document update conflict',
  error: true,
  id: '4',
  docId: '4'
}

Reproduction:

  1. Mint NFTs on testnet
  2. Try to mint NFTs on mainnet
  3. See error above

This is fixed in the latest release (freshmint@0.1.0-alpha) that removes the database.