For manifest 2.0 and sendMessage case its fairly straight-forward:
This happens if you try to use sendMessage inside the popup and there's no listener setup on background script end or the listener has somehow been removed.
By listener I mean - chrome.runtime.onMessage.addListener.