Open NtTestAlert opened 1 month ago
In my case it was a problem where FungibleToken (that is a dependency of the updated contract) had incorrect address in flow.json That was the only problem - so re-reading .cdc files 10 times to find what might be improperly migrated was not helpful.
Sidenote: Since it is a built-in contract, and one the migrator is well aware of, it should not be required to be included in the deployments in flow.json, IMHO.
Mostly a UX problem:
Additional confusion may be due to the fact that some errors - such us "cannot read contract code" do cause an error - and a fatal one at that. But I suppose that is a cli (or flowkit) error not a state-migrator error.
The state migrator used to report errors (usually, but not always, with helpful information). It no longer does that. Also, it now silently hides errors - if a contract failed to update, nothing is printed to the console about it, and the process exits with non-error exit code
The state file (sqlite) is patched, and all contracts that succeeded to update are migrated. But those that failed do not cause emulator startup errors. You will only find out once you try to interact with said contracts in a transaction/script.
This is extremely frustrating, especially since the errors might be related to flow.json configuration, not cadence code problems (legacy/stable-cadence code might be perfectly fine)