trufflesuite / ganache-ui

Personal blockchain for Ethereum development
https://www.trufflesuite.com/ganache
MIT License
4.67k stars 806 forks source link

blank screen after click on contract (ChecksumAddress & undefined input) #1315

Closed gpersoon closed 4 years ago

gpersoon commented 5 years ago

When following the tuturial https://paulrberg.com/post/2018/12/30/upgradeable-smart-contracts and clicking on a deployed contact in Ganache I get a blank screen and the user interface of Ganache isn't usable anymore.

Expected Behavior

The screen shouldn't be blank but should show an error message. The error shouldn't occur anyway.

Current Behavior

In the console I see the following error: C:\Program Files\WindowsApps\Ganache_2.0.1.0_x64__...react-dom.production.min.js:198 TypeError: Cannot read property 'replace' of undefined at ChecksumAddress._this.toChecksumAddress.address [as toChecksumAddress] (C:\Program Files\WindowsApps\Ganache_2.0.1.0x64... checksum-addresses\ChecksumAddress.js:34:24)

Possible Solution

Probably the entry value for the function ChecksumAddress is undefined. The function should check for an undefined value. See: src\renderer\components\checksum-addresses\ChecksumAddress.js

The following code (based on the function ChecksumAddress) gives a comparable error message:

address = undefined
address = address.replace("0x", "").toLowerCase();

Steps to Reproduce (for bugs)

Follow https://paulrberg.com/post/2018/12/30/upgradeable-smart-contracts Upto and including the "zos push" Add the project to ganache and have a look at the contracts. Click on the contract Note (address 0xb3e1bCdaF6F77bb579F8A1721A6Ee7F2074D5386) Then the screen turns blank

Context

Your Environment

jallen-dev commented 5 years ago

I encountered the same blank screen issue in v2.0.2-beta.0 on Mac, but only when doing Quickstart. If I create a new workspace and truffle migrate --compile-all --reset it works fine.

Minimal steps to reproduce:

  1. truffle init
  2. Add a basic contract (SimpleStorage.sol)
  3. Launch Ganache, choose Quickstart, go to Contracts, add the project, save and restart
  4. truffle migrate
  5. Click on the contract
gregory-latinier commented 5 years ago

I tried your solution on Kubuntu 19. I still have this error too. I used the GLDToken contract on this tutorial : https://docs.openzeppelin.com/contracts/2.x/tokens

Any luck solving this ?

SvenMeyer commented 4 years ago

Looks like as if it is still the same error in 2.1.2 , also on Linux - https://github.com/trufflesuite/ganache/issues/1616 Luckily at least the work around not to use 'Quickstart' helped to avoid that problem.

davidmurdoch commented 4 years ago

Should be fixed in https://github.com/trufflesuite/ganache/releases/tag/v2.3.0! Please let me know if you are still experiencing problems!