When action succeeds but voting failsMarch 30, 2020 at 2:28pm
How is the following possible?
I create an action (of my app) for voting as the permission to the action is assigned to the voting manager successfully.
Then I try to vote Yes for the action and get: "Action impossible. The action failed to execute. You may not have the required permissions." I however can successfully vote No.
I wonder, how it does happen that I can create an action but can't vote for it. Isn't the correctness of the action (no
require()s) checked when the action is created? (By the way, how is it checked? Is the EVM code executed in the browser before sending to the network to check if the action is correct?)
I assume that the EVM code executed in the browser before sending to the network, because when I have an exception in my EVM code, it is not allowed not only to vote for but even to create a vote for it. Right?
March 30, 2020 at 3:17pm
One way would be to skip the vote altogether and assign the permission to your account address. And then call the function directly with truffle console or truffle debug. You should be able to have more information on where it is failing.
Also making sure that you have error messages in your
April 3, 2020 at 12:52am
I have the same issue and found some very strange behavior connected to it. I have two vote buttons calling smart contract methods with two input arguments. Clicking any of them produces the aforementioned permission problem.
If I add another button calling a method with zero input arguments, it works if I use the new button before the others. I described the problem in detail in this issue: https://github.com/Michael-A-Heuer/ArborVote/issues/3
(Took me 4 hours to figure this out 😬)
Yes, I had the problem in the ArborVote app. I started from the /aragon-react-boilerplate and quickly got stuck with this error. Basically, I just renamed the app, added my smart contract and tried out some buidler plugins (gas reporter, solhint, coverage).
April 4, 2020 at 4:18pm
Hey , there was simply an error when the function was executed. If I add the following two lines at the beginning of the
voteFor(uint8 id, uint8 voteStrength)function, it executes successfully:
voters[msg.sender].joined = true;voters[msg.sender].voteTokens = INITIALVOTETOKENS;
April 6, 2020 at 8:13am