question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Decoding Error when running Ganache 2.1.2 on win32

See original GitHub issue

PLATFORM: win32 GANACHE VERSION: 2.1.2

EXCEPTION:

UnknownBaseContractIdError: Cannot locate base contract ID 170$ of contract$ SIMPLEToken (ID 143)
    at vars.concat.linearizedBaseContractsFromBase.map (C:\Program Files\WindowsApps\Ganache_2.1.2.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\allocate\storage.js:164:19)
    at Array.map (native)
    at allocateContract (C:\Program Files\WindowsApps\Ganache_2.1.2.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\allocate\storage.js:161:61)
    at Object.getStorageAllocations (C:\Program Files\WindowsApps\Ganache_2.1.2.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\allocate\storage.js:29:23)
    at TruffleContractDecoder.<anonymous> (C:\Program Files\WindowsApps\Ganache_2.1.2.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\interface\contract-decoder.js:117:47)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Program Files\WindowsApps\Ganache_2.1.2.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\interface\contract-decoder.js:4:58)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Used Smart Contract:

pragma solidity ^0.5.0;

import "/openzeppelin-solidity/contracts/token/ERC721/ERC721Full.sol";
import "/openzeppelin-solidity/contracts/ownership/Ownable.sol";

contract SIMPLEToken is ERC721Full, Ownable{

  struct VTInfo {
    string vtid;
  }
  
  VTInfo[] public vtinfos;
  
  function getVTInfo(uint256 tokenId) public view returns(string memory vtid) {
    VTInfo memory _vtinfo = vtinfos[tokenId];
    vtid = _vtinfo.vtid;
  }

  constructor() 
  ERC721Full("SIMPLE", "SMPL")
  public {}
  
  function mint(address to, uint256 tokenId) public onlyOwner {
   _mint(to, tokenId);
  }

  function Xmint(address to, string memory _vtid) public onlyOwner{
    VTInfo memory _vtinfo = VTInfo({vtid: _vtid});
    uint _tokenId = vtinfos.push(_vtinfo) -1;
    mint(to, _tokenId);
  }

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
ghostcommented, Apr 14, 2021

still an issue in 2.5.4. I’m new to development, simple contracts, always getting this error…4/5 times. Go to the contract page to view the contract state:

UnknownBaseContractIdError: Cannot locate base contract ID 1907$ of contract$

Am I supposed to deploy all the base contract intefaces, openzeppelin and such? I wouldn’t think so as they should all get compiled together…

Usually then followed by this trying to reload things on the page where you put your truffle.config file.

PollingBlockTracker - encountered an error while attempting to update latest block:

Then back on main page, all the accounts have 0 eth like they are not loading as well. Ganache just goes into a downward spiral.

Very frustrating, cannot get a solid session going - have to kill ganache and restart, update private keys everywhere, redeploy, update contract addresses again everywhere in my dapps. Any tips/help would be greatly appreciated

2reactions
ndroocommented, May 5, 2021

+1 to the above. No idea why this is occurring, but it’s hard to tell the difference between real issues and ganache issues with bugs like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decoding Error when running Ganache 2.5.4 on win32 #3036
It was working before, and I was just doing some simple development (running tests and recompiling), but every once and a while, Ganache...
Read more >
ConsenSys/truffle - Gitter
Hi, I am having issue swapping back DAI tokens to ETH with uniswap interface, I am getting this error "Dai/insufficient-allowance" on the transaction ......
Read more >
Ganache Install File System Error Solution Windows 10
Solve File System Error while Installing Ganache in Windows 10. Use Add-AppxPackage -Path .\ Ganache -2.4.0-win-x64.appx command to Install ...
Read more >
Compare Versions | @lockswap/core | npm | Open Source Insights
We found errors while resolving dependencies that may result in an incomplete or inaccurate dependency graph. Show details. Errors found while resolving some ......
Read more >
Trouble installing Ganache-UI - Shoots out an error that ...
I was able to install a previous release of Ganache through a .exe file. Apparently, the .appx installers are having problems on Windows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found