truffle migrate --network kovan
Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.
Starting migrations...
======================
> Network name: 'kovan'
> Network id: 42
> Block gas limit: 12499988 (0xbebc14)
1_upgrade1.js
=============
Deploying 'Master'
------------------
/Volumes/Untitled/kai/xingtu/org/contract/node_modules/graceful-fs/polyfills.js:299
if (cb) cb.apply(this, arguments)
^
Error: Unable to update lock within the stale threshold
at /Volumes/Untitled/kai/xingtu/org/contract/node_modules/proper-lockfile/lib/lockfile.js:136:25
at callback (/Volumes/Untitled/kai/xingtu/org/contract/node_modules/graceful-fs/polyfills.js:299:20)
at FSReqCallback.oncomplete (fs.js:169:5)
transaction hash: 0x3fa8b79dde5fba669f585ffc1eb14e8cc665d7137a463a9187a185e494c7bf1e
⠴ Blocks: 1 Seconds: 12
C:...\npm\node_modules@openzeppelin\truffle-upgrades\node_modules\graceful-fs\polyfills.js:299
if (cb) cb.apply(this, arguments)
^
Error: Unable to update lock within the stale threshold
at C:...\npm\node_modules@openzeppelin\truffle-upgrades\node_modules\proper-lockfile\lib\lockfile.js:136:25
at callback (C:...\npm\node_modules@openzeppelin\truffle-upgrades\node_modules\graceful-fs\polyfills.js:299:20)
at FSReqCallback.oncomplete (fs.js:169:5)
@redbeard Does this happen consistently every time you run it?
Can you run your migrations with DEBUG='@openzeppelin:*' in your environment? This should enable debug logging and could help identify the root of the error.
I am facing the same issue - it works ok when I deploy to ganache, but maticTestnet or bsc testnet give the same error code.
/Users/rondras/Documents/GitHub/srewoa/node_modules/graceful-fs/polyfills.js:295
if (cb) cb.apply(this, arguments)
^
Error: Unable to update lock within the stale threshold
at /Users/rondras/Documents/GitHub/srewoa/node_modules/proper-lockfile/lib/lockfile.js:136:25
at callback (/Users/rondras/Documents/GitHub/srewoa/node_modules/graceful-fs/polyfills.js:295:20)
at FSReqCallback.oncomplete (fs.js:184:5)
I am using a Mac, so it cannot be a windows issue...
Thanks for any help,
rondras
Update: I tried to deploy to Rinkeby (using Infura) and it works normally.
So I guess there is a problem with Goerli or some configurations for Goerli are not setup properly. Here's my setup for Rineky
============
rinkeby: {
provider: () => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${infuraKey}`),
network_id: 4,
gas: 5500000,
confirmations: 0, // # of confirmations to wait between deployments. (default: 0)
timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: true // Skip dry run before migrations? (default: false for public nets )
}
==========
And here's my setup for Goerli (using Alchemy)
Update: after 1 successful run the migrate (deploy a proxy contract, transfer owner to a gnosis safe, prepareUpgrade a V2 implementation contract), I try to run again (using truffle migrate --reset), it fails and shows the same error
This error means that the lockfile has become stale. We never see this happen, but there might be an issue with Truffle that is causing it. In this case you have to manually delete the lockfile from the file system, it is a file with a name like *.lock in the .openzeppelin directory.