I’ve deployed an NFT Collection contract on Polygon using thirdweb. The contract address is: 0xb853a16bfb7561ED1bf33B080726cb487bdD9006
What works:
The contract and minted NFT are visible in the thirdweb dashboard. Minting NFTs works and I can see them in the dashboard.
What doesn’t work:
My frontend (Next.js + React) uses useContract(NFT_COLLECTION_ADDRESS, "nft-collection") and useNFTs(contract) from @thirdweb-dev/react. The social feed and recently minted NFTs panel do not show any live data. The browser console logs a call revert exception for nextTokenIdToMint() (which is an NFT Drop method, not NFT Collection). The thirdweb API returns a 404 for contract metadata: GET https://contract.thirdweb.com/metadata/1/0xb853a16bfb7561ED1bf33B080726cb487bdD9006
What I’ve tried:
Cleared build cache (.next folder). Updated all thirdweb dependencies. Searched my codebase for any NFT Drop-specific hooks/components (none found). Only using NFT Collection hooks and methods. Confirmed contract and NFTs are visible in the dashboard.
Code Snippet:
const { contract } = useContract(NFT_COLLECTION_ADDRESS, "nft-collection");
const { data: nfts, isLoading: nftsLoading, error: nftsError } = useNFTs(contract);
useEffect(() => {
if (nftsError) {
console.error("Error from useNFTs:", nftsError);
}
if (nfts) {
console.log("NFTs from useNFTs:", nfts);
}
}, [nfts, nftsError]);
Question: Why is useNFTs(contract) not returning my minted NFTs, and why am I seeing a nextTokenIdToMint() error for an NFT Collection contract? Is this a thirdweb SDK or backend issue, or am I missing something in my setup?