I suppose youYou might have added the custom network in the metamaskMetaMask wallet .
In the metamaskMetaMask wallet go to Settings >> AdvancedSettings > Advanced and clear the data(Do.
Do this whenever you have redeployed the contract or restarted the blockchain node ).
This will stop the error .
:)