Error! There was a problem listing your nft

Hello, devs! I’m facing an issue while clicking on the list button in ‘Your Collection’ tab in Moralis Nft Marketplace in Rinkeby Testnet.
The approve button is working fine. I can’t understand what’s the problem. Any help will be highly appreciated thanks.

errerer
This is my marketplace.boilerplate contract code here :

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol";

abstract contract ReentrancyGuard {
    
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        _status = _NOT_ENTERED;
    }
}


library Counters {
    struct Counter {

        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

contract marketPlaceBoilerPlate is ReentrancyGuard {
    using Counters for Counters.Counter;
    Counters.Counter private _itemIds;
    Counters.Counter private _itemsSold;
   mapping(address => uint256) public whitelistedAddresses;

    uint256 public trading_fee;

    mapping(address => uint256) public lastPrice;

    mapping (address => bool) UserlastRecorded;

    uint256 getLastPrice;

    // uint256 public SalePrice;
    
     address public owner;
     
     constructor() {
         owner = msg.sender;
     }
     
     struct MarketItem {
         uint itemId;
         address nftContract;
         uint256 tokenId;
         address payable seller;
         address payable owner;
         uint256 price;
         bool sold;
     }
     
     mapping(uint256 => MarketItem) private idToMarketItem;
     
     event MarketItemCreated (
        uint indexed itemId,
        address indexed nftContract,
        uint256 indexed tokenId,
        address seller,
        address owner,
        uint256 price,
        bool sold
     );
     
     event MarketItemSold (
         uint indexed itemId,
         address owner
         );
     
    
    modifier onlyOwner {
        require(owner == msg.sender ,"Caller is not the Owner");
        _;
    }

    function createMarketItem(
        address nftContract,
        uint256 tokenId,
        uint256 price
        ) public payable nonReentrant {
            
            require(owner == msg.sender || whitelistedAddresses[msg.sender]>0,"Unauthorized Caller");
            require(price > 0, "Price must be greater than 0");
            require(block.timestamp > endHold, "Can't list right now, You are on Hold!");

            lastPrice[msg.sender] += price;

            if(!UserlastRecorded[msg.sender]){
                getLastPrice = lastPrice[msg.sender]; 
            }

            UserlastRecorded[msg.sender] = true;

            payable(owner).transfer(msg.value);
            _itemIds.increment();
            uint256 itemId = _itemIds.current();
  
            idToMarketItem[itemId] =  MarketItem(
                itemId,
                nftContract,
                tokenId,
                payable(msg.sender),
                payable(address(0)),
                price,
                false
            );
            
            IERC721(nftContract).transferFrom(msg.sender, address(this), tokenId);
                
            emit MarketItemCreated(
                itemId,
                nftContract,
                tokenId,
                msg.sender,
                address(0),
                price,
                false
            );
        }
        function addUser(address _addressToWhitelist, uint256 number_of_nft) public onlyOwner {
                whitelistedAddresses[_addressToWhitelist] = number_of_nft;
        }
        
        function setFee(uint256 fee_percentage) public onlyOwner{
            trading_fee=fee_percentage;
        }

 
    function createMarketSale(
        address nftContract,
        uint256 itemId
        ) public payable nonReentrant {
            uint price = idToMarketItem[itemId].price;
            uint tokenId = idToMarketItem[itemId].tokenId;
            bool sold = idToMarketItem[itemId].sold;
            require(msg.value == price, "Please submit the asking price in order to complete the purchase");
            require(sold != true, "This Sale has alredy finnished");
            uint256 trading_per = (msg.value*trading_fee)/100;
            payable(owner).transfer(trading_per);
             uint256 _toSeller = msg.value -trading_per;
            emit MarketItemSold(
                itemId,
                msg.sender
                );

            idToMarketItem[itemId].seller.transfer(_toSeller);
            IERC721(nftContract).transferFrom(address(this), msg.sender, tokenId);
            idToMarketItem[itemId].owner = payable(msg.sender);
            _itemsSold.increment();
            idToMarketItem[itemId].sold = true;
        }
        
    function fetchMarketItems() public view returns (MarketItem[] memory) {
        uint itemCount = _itemIds.current();
        uint unsoldItemCount = _itemIds.current() - _itemsSold.current();
        uint currentIndex = 0;

        MarketItem[] memory items = new MarketItem[](unsoldItemCount);
        for (uint i = 0; i < itemCount; i++) {
            if (idToMarketItem[i + 1].owner == address(0)) {
                uint currentId = i + 1;
                MarketItem storage currentItem = idToMarketItem[currentId];
                items[currentIndex] = currentItem;
                currentIndex += 1;
            }
        }
        return items;
    }

    bool onHold = false;
    uint256 public endHold;

    function setFormula() public onlyOwner {

            if(getLastPrice <= 500 ){
                onHold = true;
                endHold = block.timestamp + 3 days;
            }
            else if (getLastPrice > 500 && getLastPrice <= 2000){
                onHold = true;
                endHold = block.timestamp + 10 days ;
            }
            else if (getLastPrice > 2000 && getLastPrice <= 5000){
                onHold = true;
                endHold = block.timestamp + 20 days ;
            }
            else{
                onHold = true;
                endHold = block.timestamp + 30 days ;
            }

    } 
      
}

Do you see any errors in the browser console when you click on the list button?

No, nothing appears in console

Try adding a console.log(error) at list(nft, listPrice) function in NFTBalance.jsx page. It should give more details on why the function is failing.
image

Its showing the following alert
finewre

did you find any reference line for this error?
or you can check in your code if there is variable called call, probably that is causing the error.

There is no function or variable named ‘call’

Have you put your marketplace contract address and ABI for Rinkeby in the MoralisDappProvider? Is your wallet on the right chain?

Check the options and params for the list function, you can add some logging for each of the variables like marketAddress and params to double check.