Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOMException Failed to execute 'postMessage' on 'Window' #6080

Closed
bicep opened this issue Jan 31, 2019 · 25 comments
Closed

DOMException Failed to execute 'postMessage' on 'Window' #6080

bicep opened this issue Jan 31, 2019 · 25 comments

Comments

@bicep
Copy link

bicep commented Jan 31, 2019

I'm aware of #1280 (I'm running local server on port 3000) and #5333 (I'm not so sure what this is but it was fixed?). Apologies in advance if this was covered already, I cant seem to find it.

Describe the bug
A clear and concise description of what the bug is.

I've set up web3 so that I'm using the latest version of web3 (1.0.0 beta 43) that sets the provider from the metamask's web3.

const provider = window.web3.currentProvider; provider.enable(); const web3 = new Web3(provider);

I've currently deployed a contract on Rinkeby and am trying to get a simple public variable called manager using contract.methods.manager.call(), but I'm getting this DOMException in Chrome:

screen shot 2019-01-31 at 12 01 47 am

@YukiOta
Copy link

YukiOta commented Jan 31, 2019

I have a same issue... Any solutions for this?
I posted stack exchange here

@phamhieu
Copy link

I fixed this issue by running npm install. I'm using web3:1.0.0-beta.37

@chentschel
Copy link

Same issue with web3@beta.41 .Solved installing web3:1.0.0-beta.37

@YukiOta
Copy link

YukiOta commented Feb 1, 2019

Solved by installing web3:1.0.0-beta.37

Thank you so much!
@phamhieu @chentschel

@serapath
Copy link

serapath commented Feb 28, 2019

Not sure, but i have the same issue https://play.ethereum.org/play-editor/
It seems to work when running on localhost during development with a dev server.

The error happens when you DEPLOY the contract

Any clue what this is about?

@ninabreznik
Copy link

Any news about how to resolve this issue?

@ninabreznik
Copy link

screenshot_2019-03-03_07-05-05
screenshot_2019-03-03_07-03-41

@szerintedmi
Copy link

Getting the same with beta47 :(

@ninabreznik
Copy link

I also get this now with another Dapp. First Dapp uses ethers.js and the second one web3.js :(

@willfsays
Copy link

Also hitting this issue with 1.0.0-beta.48 when attempting to perform a web3.currentProvider.send({ method: 'personal_sign', params: params, from: _account});

@Philipid3s
Copy link

Same issue with 1.0.0-beta.48 - solved by installing the beta.37

@nicholaspai
Copy link

also resolved this by switching from beta.48 to beta.37

@arnigudj
Copy link

arnigudj commented Mar 14, 2019

same here, resolved this by switching from beta.48 to beta.37... hoping that this will be resolved in beta.49

@kumavis
Copy link
Member

kumavis commented Mar 19, 2019

Opened an issue on web3.js with live reproduction demo web3/web3.js#2528

@kumavis
Copy link
Member

kumavis commented Mar 19, 2019

@wfoster232 this does not look correct, from should be encoded in the params

web3.currentProvider.send({ method: 'personal_sign', params: params, from: _account});

@kumavis
Copy link
Member

kumavis commented Mar 19, 2019

conclusion from #6262 (comment):

for web3@1.0.0-beta.38 the web3.eth.personal.sign requires a 3rd parameter, a password string (unused in metamask)

if you were using a callback before, it accidently includes the callback in the params in place of the password string. the callback is not json serializeable, thus throwing the error.

@kumavis
Copy link
Member

kumavis commented Mar 19, 2019

based on comments above, sounds like there are some additional issues (error on deploy, etc)

@jamesmorgan
Copy link

Ye I get this using Nuxtjs and metamask - any ideas? Will try to downgrade to 1.0.0-beta.37

@nickgeoca
Copy link

Have tried 1.0.0-beta.37 and other versions, even re-cloning and rebuilding the server, but keep getting the same errors.

  try { c = await MyContract.deployed(); } catch (e) {console.log(e);}

Firefox error

TypeError: "this.provider.sendAsync is undefined"
                   sendAsync contract.js:24
                   sendAsync requestmanager.js:80
                   get property.js:116
                   detectNetwork contract.js:512
                   Promise es6.promise.js:177
                   detectNetwork contract.js:503
                   deployed contract.js:451
                   _callee5$ TokenPollInterface.js:119

Chromium error

Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': function (err, result) {
if(result && result.id && payload.id !== result.id) return callback(new Error(...<omitted>... } could not be cloned.

@ldub
Copy link

ldub commented Apr 29, 2019

Also getting this error when using web3.eth.net.getId() or web3.eth.getBlockNumber() on 1.0.0-beta.48. Downgrading to 1.0.0-beta.37 does fix it but using an old version isnt a viable solution. It would be great to see an explanation of this issue.

In my setup, this error only occurs after I run a --mode production webpack build. when running with webpack-dev-server --mode development, this error doesnt happen.

@tomsoft1
Copy link

Same issue here, any news....?

@W3stside
Copy link

beta.37 is consistently the most stable Web3 beta. Though it still has the memory leak from #1648

@einaralex
Copy link

I was using web3beta.48 when I ran into this problem, it worked to downgrade to beta.37. Now I upgraded to beta.55 and that works.

@Kapn
Copy link

Kapn commented Jul 17, 2019

I ran into this problem running beta.55. I downgraded to beta.37 as suggested above and everything is good to go now.

@danfinlay
Copy link
Contributor

Closing as this currently sounds like it was a web3.js issue which is likely even resolved by now. Please let us know if it's not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests