-
Notifications
You must be signed in to change notification settings - Fork 5k
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
web3.min.js v1.2.2: Uncaught ReferenceError: regeneratorRuntime is not defined #3155
Comments
Thanks for opening this issue! We have fixed this in PR #3062. I couldn't reproduce this issue with the following steps:
<!DOCTYPE html>
<html>
<head>
<title>
dapp example
</title>
<script src="./node_modules/web3/dist/web3.min.js">
</script>
<script>
var web3 = new Web3(new Web3.providers.HttpProvider('https://rinkeby.infura.io/'));
web3.eth.getTransaction('0xd540f813d46953f5bf7c0b3797572ff6b73eee0eeadfac071baee0da9a7a9b5a').then(console.log);
</script>
</head>
<body></body>
</html>
Response:
|
@nivida I'dont understand your questions:
|
Now I was able to reproduce your issue. It's only on sending of a transaction and is a bug in our build pipeline. It doesn't add the required This:
is missing here. Sorry for the confusion! I thought it's more a general issue with the async/await handling of web3.js. |
@gpersoon Thank you for your workaround. Including the polyfill.min.js did work for me.... after a lot of pain with 1.22 and some versions before. Looking forward to a new release of web3.js. |
Description
Error "Uncaught ReferenceError: regeneratorRuntime is not defined" occurred when calling a smart contract function. The error shows in the developer console.
Expected behavior
No error
Note: with a browserified version of web3.js 1.2.1 this error doesn't occur
Actual behavior
An error is shown in the developer console
Workaround
A workaround is to include polyfill.min.js:
Steps to reproduce the behavior
Use chrome and metamask on rinkeby network to load following html page:
The deployed smart contact is an ERC777 contract.
Error Logs
8inpage.js:1 Uncaught ReferenceError: regeneratorRuntime is not defined
at web3.min.js:1
at n (web3.min.js:1)
at web3.min.js:1
at Array.forEach ()
at Object.callback (web3.min.js:1)
at MetamaskInpageProvider. (web3.min.js:1)
at u (inpage.js:1)
at MetamaskInpageProvider.a.emit (inpage.js:1)
at a. (inpage.js:1)
at u (inpage.js:1)
Gists
Versions
The text was updated successfully, but these errors were encountered: