4

I am trying to connect Ganache GUI to my WSL2 terminal in Intellij but I randomly encountered a new problem. I find that I cannot specify the hostname of the server other than 0.0.0.0 - All Interfaces which doesn't work with WSL 2 terminal. I need to specifically be able to select the WSL2 hostname for it to work.

enter image description here

enter image description here

I've tried

  1. Restarting Ganache
  2. Restarting Computer
  3. Creating new Project in Ganache
  4. Restarting new Project in Ganache
  5. Uninstalling and Reinstalling Ganache

9 Answers 9

1

I find my ganache data locator this directory(mac).

/System/Volumes/Data/Users/junwang/Library/Application Support/Ganache

you can remove this Ganache directory and then Reinstalling Ganache.

1

Seems like your ganache files may be corrupted. I'd recommend uninstalling ganache, and deleting associated files with it. These files should be in your appdata folder. In windows search (magnifying glass at the bottom in your toolbar), search for %appdata% this should open up file explorer with the location Local Disk (C:) > Users > your_username_here > AppData > Roaming. From there look for the Ganache folder and delete it. Afterwards, try to reinstall ganache and see if it resolves the issue.

1

I tried something that worked for me -

if on windows, close ganache, head to %appdata% and then delete the Ganache folder.

Restart ganache and it should work as before from here..

0

I randomly uninstalled and reinstalled a 2nd time and it seems that I can get the dropdown for all networks if I start a new project. The old project seems corrupted so I ended up deleting it and restarting my project.

I'm not sure what exactly happened.

0

in my case, same problem was because my ip local address was automatically changed. So, I'm turn back old configuration, and turn off automatic dhcp.

0

Similar to Hunab Ku I had to change my adapter IP address back to what was previously set in order to get Ganache working again.

I tried uninstalling, deleting projects, etc to no avail.

You can get the previous IP Ganache is trying to use by turning on the logging feature in the Advanced menu of the Ganache GUI. Then try to create a new project to generate a log file. Mine looked like:

[2021/08/15 08:56:28.703] - Starting server with initial configuration: 
{"gasLimit":6721975,"gasPrice":20000000000,"hardfork":"muirGlacier","hostname":"172.23.16.1","port":7545,---

I set my adapter back to that IP address and it worked. Looks like this issue has been logged on the Github project as well: https://github.com/trufflesuite/ganache/issues/2986?_pjax=%23repo-content-pjax-container

0

On OSX go to Application Support in your Library folder and delete the Ganache folder, restart Ganache and you're up and running.

0

I've been able to solve this issue by just resetting Ganache app from its settings:

Resetting Ganache app

0

Ganache GUI is working fine you just need to set up to 0.0.0.0 - All Instances and insert your specific WSL to windows IP Address in your connection in your app.

to find that ip address use this command (bash command)

grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'

and use that IP to write your RPC URL for WSL based connection like this

let provider = new ethers.providers.JsonRpcProvider(http://172.19.192.1:7545);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.