-
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.js does not work when building in vue production mode (likely any webpack production build) #2465
Comments
Could you please fill out the complete issue template and provide further details with it for reproducing this behavior? |
Hey @nivida, I looked into this issue more and was able to simplify the description above (edited). Thanks, |
I also think this issue is related to an issue I made earlier (although I'm not seeing these error messages I described in that issue anymore, and behavior seems slightly different) #2281 |
I have the same problem on It works fine in dev mode and throws And if I check |
@mjdietzx Have you found any solution to the problem? |
@lunochkin unfortunately no. I am using |
@mjdietzx I've tested the production build with version beta.49 and it worked for me. Did you have the time to test it with the latest version? |
@nivida, at least I can confirm that with beta.49 the production build works for me now. Thanks :) |
@nivida I met the same problem, the details are as follows:
The error returned is as follows:
It is strange that this error only appears when built for production (vue cli 3 / webpack build). I tried several versions and found this to be the case. |
@nivida I'm also encountering this issue for production react build using the latest |
Problem with beta.50 on vuejs. No problem in dev but in production, it doesn't work. |
Similar issue for me when trying to call
|
After upgrading to
|
Thanks for testing it @patitonar! This line is the bug. I will fix and release it asap. |
I'm facing the same issue as @patitonar provided with version I'm waiting for this to be fixed. For now, I've switched back to version |
Can you post your code? I used 1.0.0-beta.37 or this error. I didn't know what to do for one day. |
@whatTheHellDie I'm away from my machine right now, so can't share the snippet. But basically I was just trying to send a transaction on my contract using Downgrading to version Are you facing any problem with |
Using 1.0.0-beta.37 does not resolve the issue. I still get errors. |
Try using the following command: |
@nivida , is this already released? |
@devedse Yes it is live. Just use |
Description
async web3 methods are never firing callbacks when built for production (vue cli 3 / webpack build). this also includes contract methods:
everything works properly when running in development/test mode.
Expected behavior
This is when running my standard vue app https://cli.vuejs.org in development mode or locally:
npm run serve
ornpm run build --mode development
Actual behavior
This is when running my vue app after building for production
npm run build
Steps to reproduce the behavior
web3js
instanceweb3js.eth.net.getId().then(console.log).catch(console.error);
Error Logs
Not seeing any error logs. This is silently failing. Callbacks never triggered
Gists
Versions
web3.js:
everything over 1.0.0-beta.37
nodejs:
v11.6.0
browser:
all browsers
ethereum node:
metamask/infura. seems to effect all nodes (ie coinbase wallet, trust wallet)
The text was updated successfully, but these errors were encountered: