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

TypeError when viewing deployed contracts #1313

Closed
arxenix opened this issue Jun 3, 2019 · 0 comments · Fixed by #5332
Closed

TypeError when viewing deployed contracts #1313

arxenix opened this issue Jun 3, 2019 · 0 comments · Fixed by #5332

Comments

@arxenix
Copy link

arxenix commented Jun 3, 2019

I deploy a contract with truffle migrate --reset, click on the contracts tab in Ganache, click on one of the deployed contracts, then I get the error below. I believe it is because my truffle contract .json only contains fields for contractName and bytecode, but Ganache is trying to parse additional fields aswell. If this info is not available, Ganache should not attempt to display it.

PLATFORM: win32
GANACHE VERSION: 2.0.1

EXCEPTION:

TypeError: Cannot read property 'id' of undefined
    at TruffleContractDecoder (D:\WindowsApps\Ganache_2.0.1.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\interface\contract-decoder.js:61:41)
    at Object.forContract (D:\WindowsApps\Ganache_2.0.1.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\truffle-decoder\dist\interface\index.js:28:12)
    at Object.getContractState (D:\WindowsApps\Ganache_2.0.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\truffle-integration\decode.js:13:34)
    at process.<anonymous> (D:\WindowsApps\Ganache_2.0.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\truffle-integration\index.js:76:31)
    at emitTwo (events.js:125:13)
    at process.emit (events.js:213:7)
    at emit (internal/child_process.js:768:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

APPLICATION LOG:

T+39818ms:    >   "method": "eth_unsubscribe",
T+39818ms:    >   "params": [
T+39818ms:    >     "0x1"
T+39818ms:    >   ]
T+39818ms:    > }
T+39818ms: eth_unsubscribe
T+39818ms: eth_unsubscribe
T+39822ms:    > {
T+39822ms:    >   "jsonrpc": "2.0",
T+39822ms:    >   "id": 14,
T+39822ms:    >   "method": "eth_unsubscribe",
T+39822ms:    >   "params": [
T+39822ms:    >     "0x2"
T+39822ms:    >   ]
T+39822ms:    > }
T+39826ms:  <   {
T+39826ms:  <     "id": 13,
T+39826ms:  <     "jsonrpc": "2.0",
T+39826ms:  <     "result": true
T+39826ms:  <   }
T+39828ms: eth_unsubscribe
T+39831ms:    > {
T+39831ms:    >   "jsonrpc": "2.0",
T+39831ms:    >   "method": "eth_unsubscribe",
T+39831ms:    >   "params": [
T+39831ms:    >     "0x2"
T+39831ms:    >   ],
T+39831ms:    >   "id": 1559601588232
T+39831ms:    > }
T+39831ms: eth_unsubscribe
T+39835ms:    > {
T+39835ms:    >   "jsonrpc": "2.0",
T+39835ms:    >   "method": "eth_unsubscribe",
T+39835ms:    >   "params": [
T+39835ms:    >     "0x3"
T+39835ms:    >   ],
T+39835ms:    >   "id": 1559601588232
T+39835ms:    > }
T+39838ms:  <   {
T+39838ms:  <     "id": 14,
T+39838ms:  <     "jsonrpc": "2.0",
T+39838ms:  <     "result": true
T+39838ms:  <   }
T+39840ms:  <   {
T+39840ms:  <     "id": 1559601588232,
T+39840ms:  <     "jsonrpc": "2.0",
T+39840ms:  <     "error": {
T+39840ms:  <       "message": "Subscription ID 0x2 not found.",
T+39840ms:  <       "code": -32000,
T+39840ms:  <       "data": {
T+39840ms:  <         "stack": "Error: Subscription ID 0x2 not found.\n    at SubscriptionSubprovider.eth_unsubscribe (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\subproviders\\subscriptions.js:77:8)\n    at SubscriptionSubprovider.handleRequest (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\subproviders\\subscriptions.js:133:12)\n    at next (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\index.js:116:18)\n    at DelayedBlockFilter.handleRequest (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\lib\\subproviders\\delayedblockfilter.js:31:3)\n    at next (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\index.js:116:18)\n    at RequestFunnel.handleRequest (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\lib\\subproviders\\requestfunnel.js:32:12)\n    at next (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\index.js:116:18)\n    at Web3ProviderEngine._handleAsync (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\index.js:103:3)\n    at Timeout._onTimeout (D:\\WindowsApps\\Ganache_2.0.1.0_x64__zh355ej5cj694\\app\\resources\\app.asar\\node_modules\\ganache-core\\node_modules\\web3-provider-engine\\index.js:87:12)\n    at ontimeout (timers.js:469:11)\n    at tryOnTimeout (timers.js:304:5)\n    at Timer.listOnTimeout (timers.js:264:5)",
T+39840ms:  <         "name": "Error"
T+39840ms:  <       }
T+39840ms:  <     }
T+39840ms:  <   }
T+39842ms:  <   {
T+39842ms:  <     "id": 1559601588232,
T+39842ms:  <     "jsonrpc": "2.0",
T+39842ms:  <     "result": true
T+39842ms:  <   }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant