trufflesuite / ganache-ui

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

System Error when running Ganache 2.1.1 on win32 #1466

Open hiebie22 opened 5 years ago

hiebie22 commented 5 years ago

PLATFORM: win32 GANACHE VERSION: 2.1.1

EXCEPTION:

Error: EPERM: operation not permitted, rename 'C:\Users\eric.hieb\AppData\Roaming\Ganache\default\ContractCache.476577189' -> 'C:\Users\eric.hieb\AppData\Roaming\Ganache\default\ContractCache'
    at Object.fs.renameSync (fs.js:772:18)
    at writeFileSync (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\write-file-atomic\index.js:124:8)
    at LocalStorage.setItem (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\node_modules\node-localstorage\LocalStorage.js:188:7)
    at JsonStorage.setToStorage (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\main\types\json\JsonStorage.js:72:20)
    at JsonStorage.set (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\main\types\json\JsonStorage.js:78:12)
    at ContractCache.addTransaction (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\main\types\contracts\ContractCache.js:95:22)
    at TruffleIntegrationService.<anonymous> (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\main\main.js:214:33)
    at emitOne (events.js:115:13)
    at TruffleIntegrationService.emit (events.js:210:7)
    at ChildProcess.child.on.message (C:\Program Files\WindowsApps\Ganache_2.1.1.0_x64__zh355ej5cj694\app\resources\app.asar\src\common\services\TruffleIntegrationService.js:66:14)
    at emitTwo (events.js:125:13)
    at ChildProcess.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+0ms: eth_unsubscribe
T+0ms: eth_unsubscribe
T+7ms: eth_unsubscribe
T+419ms: Starting server (version 2.1.1) with initial configuration: {"gasLimit":6721975,"gasPrice":20000000000,"hardfork":"petersburg","default_balance_ether":100,"hostname":"127.0.0.1","locked":false,"network_id":5777,"port":7545,"total_accounts":10,"unlocked_accounts":[],"verbose":false,"vmErrorsOnRPCResponse":true}
T+600ms: Ganache started successfully!
T+600ms: Waiting for requests...
T+619ms: eth_getCode
T+619ms: eth_subscribe
T+632ms: eth_getLogs
T+636ms: eth_subscribe
T+643ms: eth_getCode
T+14200ms: net_version
T+14216ms: eth_accounts
T+14250ms: eth_getBlockByNumber
T+14262ms: eth_accounts
T+14285ms: eth_getBlockByNumber
T+14294ms: eth_getBlockByNumber
T+14304ms: eth_getBlockByNumber
T+14322ms: eth_estimateGas
T+16222ms: eth_getBlockByNumber
T+16226ms: eth_blockNumber
T+16238ms: eth_sendTransaction
T+16462ms:   Transaction: 0x0bbb95e8e5917455f669983910a89544c5de8b5b4ed61e0ad1f3be68126879a0
T+16462ms:   Contract created: 0x36c6aaeea50a9c5ddfc9729426442de0899c71e0
T+16462ms:   Gas usage: 263677
T+16462ms:   Block Number: 1
T+16468ms:   Block Time: Mon Oct 28 2019 17:02:33 GMT-0600 (Mountain Daylight Time)
T+16473ms: eth_getBlockByNumber
T+16481ms: eth_getTransactionReceipt
T+16485ms: eth_getCode
T+16532ms: eth_getTransactionByHash
T+16539ms: eth_getBlockByNumber
T+16546ms: eth_getBalance
T+16598ms: eth_getBlockByNumber
T+16606ms: eth_getBlockByNumber
T+16614ms: eth_sendTransaction
T+16660ms:   Transaction: 0x127fffa43895837ab3b65078e88a7ec8def290f6695b187a1ea725fb6e8ffbee
T+16660ms:   Gas usage: 42023
T+16660ms:   Block Number: 2
T+16660ms:   Block Time: Mon Oct 28 2019 17:02:34 GMT-0600 (Mountain Daylight Time)
T+16666ms: eth_getBlockByNumber
T+16759ms: eth_getTransactionReceipt
T+16777ms: eth_getBlockByNumber
T+16800ms: eth_accounts
T+16900ms: eth_getBlockByNumber
T+16900ms: eth_getBlockByNumber
T+16924ms: eth_getBlockByNumber
T+16935ms: eth_estimateGas
T+17021ms: eth_getBlockByNumber
T+17030ms: eth_blockNumber
T+17040ms: eth_sendTransaction
T+17051ms:   Transaction: 0x34be4faefdd0e7abdbf1160899ce1f70a56a8a7a5c944d56e96f65a1e105488c
T+17051ms:   Contract created: 0x78a387c1b570288d2fc3d3532702f09fbf4a27d0
T+17051ms:   Gas usage: 323614
T+17051ms:   Block Number: 3
T+17062ms:   Block Time: Mon Oct 28 2019 17:02:34 GMT-0600 (Mountain Daylight Time)
T+17071ms: eth_getBlockByNumber
T+17085ms: eth_getTransactionReceipt
T+17091ms: eth_getCode
T+17116ms: eth_getTransactionByHash
T+17124ms: eth_getBlockByNumber
T+17134ms: eth_getBalance
T+17146ms: eth_getBlockByNumber
T+17162ms: eth_getBlockByNumber
T+17171ms: eth_sendTransaction
T+17226ms:   Transaction: 0x9ec6f61f9ae6cd96566c82c076f5ec2014460915824e5c81733a76d0b52a8cd4
T+17226ms:   Gas usage: 27023
T+17235ms:   Block Number: 4
T+17235ms:   Block Time: Mon Oct 28 2019 17:02:34 GMT-0600 (Mountain Daylight Time)
T+17241ms: eth_getBlockByNumber
T+17255ms: eth_getTransactionReceipt
wbt commented 5 years ago

I just encountered this using Ganache v2.1.2 on the same platform, same as OP through the JsonStorage.set lines. (Different username and workspace name as well.)

wbt commented 5 years ago

@hiebie22, do you have any automated backup solution reading your AppData\Roaming\Ganache\ folder?

wbt commented 5 years ago

@hiebie22, do you have any automated backup solution reading your AppData\Roaming\Ganache\ folder?

Update: Nevermind, I used to and thought that might be the cause. However, even after excluding that folder from backup, I encountered the same issue again.

wbt commented 4 years ago

It looks like the issue persists in Ganache 2.3.0.