Clone Morarable: creating an Item gives RPC Error


I have setup a new server, updated the url/appId in main.js, added cloud functions and 2 plugins.
run ganache-cli -d (so addresses are kept same),
run .\frpc.exe -c .\frpc.ini (with ini data from the View details and ganache localport = 8545)
inported an address of ganache and connect to that one in Metamask
Then update my Profile : success
Then want to create an Item: click Create button directly gives in console (waiting in Metamask for 1st confirmation):

The mintNft code (starting at line 209):

mintNft = async (metadataUrl) => {
    console.log('mintNft... url=' + metadataUrl);
    const receipt = await tokenContract.methods.createItem(metadataUrl).send({from: ethereum.selectedAddress});
    console.log('mintNft tokenId=' +;

What can be wrong?

Hi @CasNWK,

Perhaps you could give us more information (code of your migration code, function in the contract that you are trying to access etc). Possible scenarios with the information you gave -

  • There was an issue when triggering the truffle migrate command
  • The contracts were not correctly deployed on ganache (either token contract or the marketplace contract)
  • The addresses on your main.js for token and marketplace are not the same with the ganache deployed addresses.

Let us know.