Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MetaMask - RPC Error #15

Open
BlackH3art opened this issue Dec 18, 2021 · 6 comments
Open

MetaMask - RPC Error #15

BlackH3art opened this issue Dec 18, 2021 · 6 comments

Comments

@BlackH3art
Copy link

Hey Gregory,

I'm running to an issue in 2:23:30 of this tutorial, when it comes to test staking.
After I approve spending token, metamask shows me an error:

image

And after I confirm that in MetaMask console displays me this error:

image

I was writing all the contract code on my own (TokenFarm.sol), but then I just copied this from repository, compiled it, and still running to the same issue.

Any idea about how to fix this error?

@Jbry123
Copy link

Jbry123 commented Dec 21, 2021

going through this issue as well, one of the transactions worked, but now it's just doing this. I read that you can delete the json from the contracts and recompile them

@Jbry123
Copy link

Jbry123 commented Dec 21, 2021

i solved it by clearing the json, truffle compiling, and connecting ganache by adding the truffle config file to ganache's desktop app

@Juleshaydn
Copy link

i solved it by clearing the json, truffle compiling, and connecting ganache by adding the truffle config file to ganache's desktop app

Which json are you clearing?

@jmpf2018
Copy link

I have a similar issue, but the message is different:
image
Can anyone help me?

@jatinmehrotra
Copy link

@jmpf2018 did you solved the issue? i am also facing the same error

@jeffmega
Copy link

I have a similar issue, but the message is different: image Can anyone help me?

Hi,
I had the same problem, it was to do with a time out. Try changing the stake method to async like this:-

stakeTokens = async (amount) => {
this.setState({ loading: true })
await this.state.daiToken.methods.approve(this.state.tokenFarm._address, amount).send({ from: this.state.account })
await this.state.tokenFarm.methods.stakeTokens(amount).send({ from: this.state.account })
this.setState({ loading: false })
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@jeffmega @Jbry123 @jmpf2018 @jatinmehrotra @Juleshaydn @BlackH3art and others