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

not displayed the list of candidates after all installations #21

Open
antonyhudson opened this issue Mar 19, 2019 · 13 comments
Open

not displayed the list of candidates after all installations #21

antonyhudson opened this issue Mar 19, 2019 · 13 comments

Comments

@antonyhudson
Copy link


What may be the problem, restarting the browser does not help?

@malavancs
Copy link

I'm also facing the same issue

@antonyhudson
Copy link
Author

And how did you fix it?

@malavancs
Copy link

The problem is account returned from metamask was null. To avoid this issue,
Add this line after
ethereum.enable(); when creating web3 object.

@PlanCZero
Copy link

Hi @malavancs
Can you explain more about this?
ethereum.enable();
Some other browser has reported Uncaught ReferenceError: ethereum is not defined but it work on chrome.

@vigneshmohan10
Copy link

where ..

The problem is account returned from metamask was null. To avoid this issue,
Add this line after
ethereum.enable(); when creating web3 object.

where to add etherreum.enable()

@malavancs
Copy link

@Vignesh1010

On index.js

initWeb3: function() {
// TODO: refactor conditional
if (typeof web3 !== 'undefined') {
// If a web3 instance is already provided by Meta Mask.
App.web3Provider = web3.currentProvider;

etherreum.enable();
web3 = new Web3(web3.currentProvider);
} else {
// Specify default instance if no web3 instance provided
App.web3Provider = new Web3.providers.HttpProvider('http://localhost:7545');
etherreum.enable();
web3 = new Web3(App.web3Provider);
}

@jkariscodes
Copy link

etherreum.enable();

This has worked in my case. Thanks @Vignesh1010
image

@officialfrancismendoza
Copy link

officialfrancismendoza commented May 29, 2019

I am not able to see candidates, despite using ethereum.enable(). What are other possible causes for this?
initWeb3: function() { // TODO: refactor conditional if (typeof web3 !== 'undefined') { // If a web3 instance is already provided by Meta Mask. App.web3Provider = web3.currentProvider; ethereum.enable(); web3 = new Web3(web3.currentProvider); } else { // Specify default instance if no web3 instance provided App.web3Provider = new Web3.providers.HttpProvider('http://localhost:7545'); ethereum.enable(); web3 = new Web3(App.web3Provider); } return App.initContract(); },
image

@malavancs
Copy link

etherreum.enable();

This has worked in my case. Thanks @Vignesh1010
image

Btw It was me to thank :(

@dyttokaa
Copy link

Screenshot 2019-06-24 at 01 43 19

That's all i can see... cant define the problem... help please

@malavancs
Copy link

malavancs commented Jun 24, 2019

Check for console logs. Make sure you've added

initWeb3: function() {
// TODO: refactor conditional
if (typeof web3 !== 'undefined') {
// If a web3 instance is already provided by Meta Mask.
App.web3Provider = web3.currentProvider;

etherreum.enable();
web3 = new Web3(web3.currentProvider);
} else {
// Specify default instance if no web3 instance provided
App.web3Provider = new Web3.providers.HttpProvider('http://localhost:7545');
etherreum.enable();
web3 = new Web3(App.web3Provider);
}

@bongi23
Copy link

bongi23 commented Jul 1, 2019

I had a similar issue, caused by web3.eth.getCoinbase returning null account, I solved following these steps:

  • Click on the Metamask extension
  • Click on the coloured circle in the upright corner of the pop-up
  • Settings > Security & Privacy > Privacy mode > disable it

@MhamedBendenia
Copy link

For those who etherreum.enable(); doesn't work, try window.ethereum.enable(); it worked for me.

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

9 participants