Problem with decryptTaskResult, only in React app

Hi,

I’m having an issue with decryptTaskResult that looks like https://github.com/enigmampc/enigma-contract/issues/154#issuecomment-537087156

I only have this issue with the React frontend, not with the Mocha tests.

Here’s the code : https://github.com/guix77/enigma-secret-access-control/blob/f10fe04507b8ae2d9eb73b8cffc3b0b20c828f16/client/src/components/ReadSecretMessages.js#L87

Here’s the equivalent Mocha test which works perfectly fine: https://github.com/guix77/enigma-secret-access-control/blob/f10fe04507b8ae2d9eb73b8cffc3b0b20c828f16/test/test_secret_access_control.js#L145

Any idea ?

1 Like

Thanks for posting, @guix – I’ve opened an issue.

This issue is being tracked here:

with a possible solution in the second half of this comment:

@guix, let me know if that fixes your issue

But my hunch is that what you are seeing is the manifestation of another issue. The fix should address the manifestation, but I am not 100% positive that it will address the underlying issue. Try it and let us know what happens.

If it does not solve your issue, please attach a snapshot of the network console (try to look for something that looks like an error around the same time that you see the error on the browser console).

I pulled the new Docker images but the problem I now have is that I generated the project with the old discovery init on August 1st and I get an exception occurred while trying to unpack DeploySecretContract RPC Error: incorrect header check like in Unable to migrate secret contract

I did not upgrade discovery-cli yet though.

The problem is that I really would like to avoid to start from scratch again, given the considerable amount of time already invested in the project. Also, my issue might not be related at all with this, so it’s another reason to come back to the old version for now.

Why would it work in Mocha and not in React ? There must be something else that should be fixable.

[edit] New problem : some of the Docker images I used on August 1st are not available any more and I removed them to install the new ones…

Took me 3 hours but I did want so bad to finish this, that I upgraded the project from the old stack to the latest one (Docker :latest images, discovery-cli and whole project updated following new discovery init rules).

:develop Docker images are not working for me, here are some logs FYI : https://gist.github.com/guix77/f458b1733eaeccfa7c64a033a0d7d986

I’m staying on :latest, although my issue of decryptTaskResult with React is not gone. At least I’ve not ruined all my work and it can be installed now by others with the current :latest Docker images :slight_smile:

Here’s a gist of the network console and also the frontend logs: https://gist.github.com/guix77/ffface5abb6b6a329fda4ca1cb68fb08

Problem solved for me. I forgot to getTaskResult before decryptTaskResulthttps://github.com/guix77/enigma-secret-access-control/commit/1f1e0019a608626a272f71e6ffb6370f649a00bc

1 Like

That’s great, @guix!