truffle-box / react-auth-box

Truffle, Webpack, React, Redux boilerplate with routing and authentication via a smart contract.
https://truffle-box.github.io/
MIT License
176 stars 66 forks source link

Login doesn't work #28

Closed varvarasd closed 6 years ago

varvarasd commented 6 years ago

I've sign up and login button doesn't do anything. Is there anything I'm missing? I've added a random name on signup and nothing happens when I click login. I do get the popup from MetaMask to submit the transaction once I click signup, i submit then nothing happens and login doesn't do anything...

Any suggestions are greatly appreciated. Many thanks

elie222 commented 6 years ago

Yes, there's an error in the console:

errors.js:35 Uncaught (in promise) Error: Failed to fetch
    at Object.InvalidResponse (errors.js:35)
    at requestmanager.js:86
    at inpage.js:9909
    at completeRequest (inpage.js:9960)
    at inpage.js:683
    at replenish (inpage.js:1203)
    at iterateeCallback (inpage.js:1193)
    at inpage.js:1168
    at inpage.js:9837
    at inpage.js:9933

This is the culprit line:

authentication.deployed().then(function(instance) {
elie222 commented 6 years ago

I finally got it working once I set up metamask locally correctly.

varvarasd commented 6 years ago

Yes. I've restarted the browser and the truffle develop session and works fine. I'm suspecting the metamask needs to synchronize with the truffle to work. Cheers