'React with Truffle contract- Resources must be listed in the web_accessible_resources manifest

I am developing a React app with Truffle and when I call the function from the contract I get the following error:

Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': function (err, result) {
if (err) {
  return callback(err);
}

Denying load of 
chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/sourcemaps/inpage.js.map.
Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.

I am using Metamask as well and I believe I somehow have to enable that in the manifest but I cannot get it working. Can anybody tell me what to do?

EDIT: I think the code which gives me the error is:

if (typeof Monster.currentProvider.sendAsync !== "function") {
  Monster.currentProvider.sendAsync = function() {
    return Monster.currentProvider.send.apply(
      Monster.currentProvider, arguments
    );
  };
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source