Open shanshi opened 3 years ago
Hi @shanshi we think the issue may be that you are on an older version of Truffle. What is holding you back from upgrading your version? Node 8 has reached end of life -- can you upgrade that? Perhaps we can help figure that out if you can share a bit more about the versions you are using. Thanks!
Hi @fainashalts, thanks for the prompt reply. One of the things that are holding us back from upgrading is the fact that the project uses zos library. We would have to change it for Open Zeppelin SDK in order to be able to upgrade Node and then Truffle.
So as you can imagine, it is a big deal of a change in a large project, and it is uncertain if we break anything else by doing these upgrades.
Is there something else I could do about the error with Truffle? Thanks in advance.
Sorry @shanshi, I'm not sure how much we can do if you can't update Truffle and Node. There are a number of bugs that we have fixed since the version that you are using. As a last resort you could try various old versions of Truffle even though that is not a very fun solution. When was the last time this worked? What changed to make it break?
Hi @eggplantzzz, thanks for your reply. I'm afraid that updating Truffle and Node isn't a viable option, at least not for now (rest assured that we want to but it's not the right time).
I tried a few other versions of Truffle (both older and newer), and I had the same problem (I can't remember which versions right now, I'm so sorry). I also tried on a virtual machine with Ubuntu 20.04 installed, and the same version of Truffle that I now have installed on my Mac, but I came across some different errors (i.e. it said the the transaction was not found, even though it exists and the hash was copied directly from Ganache).
I would say that it used to work in the Ubuntu virtual machine I mentioned before, but not all the time. I had a bunch of different errors, but none of them looked like the one I reported. On my Mac, it never worked, no matter what I did.
In regards of what changed to make it break, honestly I'm not really sure. The environment changed (from Ubuntu to Mac), but it's not clear if this is enough to make it break. Besides, there have been many changes in the contracts' code, but again I don't think that this causes the problem because today I had to make changes in a really old branch, and when trying to debug a transaction I had the same error I reported.
I'm just wondering if Truffle works the same way in every operating system, or if there are subtle differences that make it work completely different and are error-prone.
So sorry about this. I can't think of anything actionable here, since it'd be similarly unreasonable for Truffle to go back to supporting Node v8.
I'm just wondering if Truffle works the same way in every operating system, or if there are subtle differences that make it work completely different and are error-prone.
Once in awhile we get differences related to operating system, but usually not for Linux vs. Mac... usually only Windows causes problems. Certainly any OS-related Truffle problem is a Truffle bug, and we try to treat that as such.
We'll leave this issue open for now in case there's something we can do about it in the future.
Again, sincere apologies that you're in this tight spot with this issue. ☹️
Hi @gnidan, thanks for your reply. I understand that this is a tricky situation and it may be particular for this project.
A few weeks ago I gave it a shot again and I tried to make it work (kinda). Let's say that my succeed rate was about 40%. Regardless, I would like to share the steps of my experiment in case it works for someone else:
nvm install node
nvm use 15
npm install truffle -g
npm install ganache-cli -g
ganache-cli --gasLimit 0xfffffffffff -i 1564754684494 --accounts 500 --defaultBalanceEther 100000000000000000 --port 8545
nvm use 8
npx truffle migrate --network development --reset
npx truffle test
nvm use 15
truffle debug <tx_hash>
These steps allowed me to debug some transactions but not all of them. Hope this helps.
Issue
When I try to debug a transaction, I get the following error:
TypeError: Cannot read property 'variables' of undefined
.Steps to Reproduce
rm zos.dev-*.json; rm -r build/contracts;
npx truffle migrate --network development --reset
npx truffle test
truffle debug <tx_hash>
Expected Behavior
Being able to debug the transaction.
Actual Results
Environment
truffle version
): Truffle v5.0.26 (core: 5.0.26) (can't upgrade because of project's dependencies)node --version
): v8.17.0npm --version
): 6.13.4FWIW: