I'm new to dapp and trying to follow iwaldman to build an ipfs-image-dapp. Here is the repo: https://github.com/iwaldman/ipfs-image-dapp.

But running yarn start gives the error Cannot read property 'apply' of undefined. I have tried the method given by the net such as

    if (typeof contract.currentProvider.sendAsync !== "function") {
       contract.currentProvider.sendAsync = function() {
         return contract.currentProvider.send.apply(

But it gives another error that Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window'.

I must have done something wrong. I'm using the latest metamask and ganache v2.0.1. I have turned off metamask's privacy mode. Could anyone give me some advice? Thank you.

Please forgive my poor English.

  • 1
    @SanjaySB: The error implies that contract.currentProvider does not have a property (variable or function) named send, which implies that your suggestion is incorrect. – goodvibration May 21 '19 at 8:45
  • opps. ok. I have removed the suggestion. – Sanjay S B May 21 '19 at 8:49
  • Should I provide more information? I'm not sure what kind of information is helpful. – cysr214 May 21 '19 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.