MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.84k stars 4.83k forks source link

Recently events from solidity are not firing on Chrome, but working fine on firefox and Brave. #2952

Closed kevinstotz closed 6 years ago

kevinstotz commented 6 years ago

I have a contract running on Ropsten and the events show up in Brave and Firefox, but nothing in Chrome. This is a recent issue. This seems odd.

solidity contract MyLife is Owned, Accounting {

event FeePaid(address indexed _from, bytes32 _sentence);

}

function payForEntry(bytes32 sentenceHash) onlyBy(msg.sender) public payable { FeePaid(msg.sender, sentenceHash); }

JS.

let c = web3.eth.contract(_this.data.contract.abi, _this.data.contract.address) let cI = c.at(_this.data.contract.address) cI.FeePaid({},{address:_this.data.contract.address}).watch(function (error, result) { if (!error) { console.log("Good" + result) } else { console.log(error) } })

uxdxdev commented 6 years ago

I'm also having this issue. I have an Ethereum node running locally, Chrome does not have MM installed and is getting the currentProvider data directly from localhost:8545, Firefox has MM installed. The contract is called to create an event from Firefox, which triggers MM for the GAS payment. Chrome is connected to the node and can receive the event data, but in Firefox MM does not propagate the event data to the application. However the callback is triggered when the event is called.

createEvent: function() {

    Contract.deployed().then(function(contractInstance) {

      contractInstance.createRandomEvent("test_input", {from:account}).then(function(result){
        console.log("called createRandomEvent() function ");
      });
    });
  }

Firefox MM console logs

screen shot 2018-01-14 at 01 54 46
kevinstotz commented 6 years ago

I am not sure why..but it's working again.

halgurdh commented 6 years ago

I have the same issue, when i try it in incognito mode it works, but when i try normal, it doesn't

bdresser commented 6 years ago

@halgurdh are you still experiencing this issue? and you're saying it works fine in firefox & incognito chrome, but not regular chrome?

halgurdh commented 6 years ago

@bdresser not anymore, I think it was something else that wasn't working which didn't fire the events. Its works now.