Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Windows Subsystem for Linux - RPC Error when sending transaction #531

Closed
0xTimepunk opened this issue Jan 15, 2020 · 6 comments
Closed

Windows Subsystem for Linux - RPC Error when sending transaction #531

0xTimepunk opened this issue Jan 15, 2020 · 6 comments

Comments

@0xTimepunk
Copy link

Describe the bug

I have a development environment setup in windows 10 using Windows Subsystem for Linux.
When I execute a send transaction using my Dapp I get the following error in the console:

MetaMask - RPC Error: Error: [ethjs-rpc] rpc error with payload {"id":283255458009,"jsonrpc":"2.0","params":["0xf8b2018504a817c8008303b5d594254dffcd3277c0b1660f6d42efbb754edababc2b82012cb84406ca6af6000000000000000000000000141f5fca84cc82ef0a6751241019471731289456af0cebd27bd02fd316270eed31448fb17177fa8d32aa861b4d9a6c7b0d163bf68602df532bcf12a077aa2b78af66efc28bd279e9398e79b58cc3c135cd611711f6016ed3035f51f1a003e5a85e095301d236e4931d8954187c454353085fe126cd70db139ef8f9ecb3"],"method":"eth_sendRawTransaction"} [object Object]

The problem is not with the Dapp as I am able to make the transactions just fine in a separate Ubuntu Virtual Box environment.
The problem seems to be related with ganache-cli (which is installed on WSL), because if I use ganache-gui, which is installed in Windows 10, everything works fine.
Metamask custom RPCs are configured with port 8545 for ganache-cli and 7545 for ganache-gui.

To Reproduce
Install

  • WSL in Windows 10 with Ubuntu
  • node lts using nvm
  • latest yarn
  • global ganache-cli and truffle
  • build essentials

Then

  • configure a dapp project in VSCode and launch it
  • try to send a transaction using metamask (custom rpc - http://127.0.0.1:8545)
  • verify the error I get above.

Then (to try without error)

  • install ganache-gui on windows side normally
  • configure your truffle-config with a second network and deploy contracts there
  • configure a second custom rpc on another port (e.g 7545)
  • You can send transactions normally.

Expected behavior

The transactions proceed without any error on ganache-cli installed and launched in WSL

Screenshots

image

System details

Windows 10 with Windows Subsystem for Linux
Metamask 7.7.2
Latest Google Chrome or Brave
Ganache-cli 6.8,1 (in WSL)
Ganache-gui 2.1.2 for Windows

@davidmurdoch
Copy link
Member

Confirming that I can reproduce this issue running [email protected] on Windows under WSL and Powershell.

[email protected] works as expected.

[email protected] also fails.

We are working on a solution now.

@nicholasjpaterno
Copy link
Contributor

@J-Mars Thanks for reporting this issue! I'm on Linux and can confirm that this is an issue on all versions of ganache-cli after 6.7.0 (ganache-core: 2.8.0) and we are working on a fix now! In the meantime, v6.7.0 is working correctly and should enable you to continue testing your dApp!

@0xTimepunk
Copy link
Author

Thank you very much!

@nicholasjpaterno nicholasjpaterno transferred this issue from trufflesuite/ganache-cli-archive Jan 15, 2020
@nicholasjpaterno nicholasjpaterno self-assigned this Jan 15, 2020
@davidmurdoch
Copy link
Member

@nicholasjpaterno and I have tracked down the issue and have the fix almost ready now. In the meantime, you can start ganache with ganache-cli --network_id 1 and ganache will now permit the metamask signed transaction. Sorry for the headache this has caused; I hope to get a hotfix out to fix this in the morning!

@0xTimepunk
Copy link
Author

Okay, so changing to id 1 fixes the issue temporarily.

Thanks

@nicholasjpaterno
Copy link
Contributor

Fixed in PR: #532

You can use this now with the latest release https://github.com/trufflesuite/ganache-cli/releases

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants