Closed haydenyoung closed 3 years ago
Hey can you rerun your migrate command to pass the DEBUG=db:meta:interface
environment variable? Something like DEBUG=db:meta:interface truffle migrate --dry-run
. You should see more details about that GraphQL error; that'd be super helpful for us to diagnose the problem here.
Sorry about this!
Thanks @gnidan and apologies for the late reply.
I ran:
DEBUG=db:meta:interface truffle deploy --network kovan --reset --dry-run
but the only difference I see is:
Secp256k1 bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Keccak bindings are not compiled. Pure JS implementation will be used.
Otherwise, the output is identical.
Thanks @haydenyoung! Super helpful, we'll look into it
Thanks @cds-amal please let me know if you waant me to test anything else.
Slight correction on my post above:
db: {
enabled: false
}
should be:
db: {
enabled: true
}
Disabling the local db seems to fix the issue.
I just reproduced this here locally and will investigate. Thanks for the report @haydenyoung!
There is a fix for this problem (or at least part of it) in https://github.com/trufflesuite/truffle/pull/4198. I was only able to duplicate the "Cannot read property..." error once.
The fix for this is now released in Truffle v5.4.2 (see release notes). Thank you for trying out @truffle/db and letting us know about this problem!
Issue
When I issue the command truffle deploy --dry-run, the migration.sol contract deploys without issue but any subsequent contract fails with various error messages:
TypeError: Cannot read property 'contract' of undefined
GraphQLError: Syntax Error: Invalid number, expected digit but got: "f".
When skipping dry run, the contracts are deployed successfully.
Steps to Reproduce
Create a new project:
Configure Kovan testnet and enable Truffle db in truffle-config.js.
Enable testnet:
Enable truffle db:
Run:
truffle deploy --network kovan --reset --dry-run
The above will fail after the migrations deployment (it is also noticeably slow).
Expected Behavior
Dry run reports gas costs and completes without error.
Actual Results
Possible errors:
Environment
Distributor ID: Pop Description: Pop!_OS 20.10 Release: 20.10 Codename: groovy
Truffle v5.3.1 (core: 5.3.1) Solidity - 0.6.6 (solc-js) Node v12.19.0 Web3.js v1.3.5
nvm v12.19.0 npm 7.7.6