SafeTrace icon indicating copy to clipboard operation
SafeTrace copied to clipboard

Adding Fixed UI frontend and removed old unused files

Open cmalfesi opened this issue 4 years ago • 4 comments

cmalfesi avatar Apr 30 '20 15:04 cmalfesi

Thanks @cmalfesi. This feels like much progress, yet it's still not fully functional for me. Here's my report:

  • I want to help button on the homepage does not do anything
  • Login works well with Google integration 🙌
  • I then go to the Contribute tab, and I see I can I want to self report or View my results 👍
  • I follow the prompts to self report, I download my TakeOut from Google, and upload it, and the screen displays Your data has been successfully shared with SafeTrace API. but nothing displays
  • If I look at the logs from the enclave from the above operation I see:
May 02 13:58:38 ibm safetrace-app[12772]: Get User Key called inside enclave
May 02 13:58:38 ibm safetrace-app[12772]: Get User Key called inside enclave
May 02 13:58:38 ibm safetrace-app[12772]: thread panicked at 'no entry found for key', src/libcore/option.rs:1166:5
May 02 13:58:38 ibm safetrace-app[12772]: fatal runtime error: failed to initiate panic, error 5

and the server crashes and is automatically restarted. The JSON RPC server was able to respond:

0|index    | Message received
0|index    | { id: 'f3e90ff780',
0|index    |   type: 'AddPersonalData',
0|index    |   addPersonalData: { status: -1 } }

which the UI should parse and report something went wrong.

  • Also, when I self report, if I choose I have not been tested, the UI still requires me to enter a date for when the test was administered, which should only be required if I marked Positive or Negative but not if I have not been tested yet.

Thank you 🙏

lacabra avatar May 02 '20 19:05 lacabra

@lacabra I have done some progress on these points:

  • If you choose I have not been tested, now the next button works well
  • I found that the dates were sent as a string in the parsed son. I have converted those in a integer value.
  • I could not get more progress to process the results from findMatch, because again I found a problem with CORS.

Here I try to explain the problem:

  • When I try to use addPersonalData and/or findMatch with the the variable publicKey (got it from getClientKeys), I'm getting a CORS error.
  • If I use addPersonalData and/or findMatch with the the variable taskPubKey (got it from getEncryptionKey), both work well but findMatch returns Status -1.

We need to debug this with the help of the enclave server log.

cmalfesi avatar May 03 '20 23:05 cmalfesi

@cmalfesi

Tested the new changes. I confirm that the date field is now optional if I choose that I have not been tested.

When I submit my location data, the console shows that the UI is sending an empty array despite having uploaded a valid Google Takeout data. The operation succeeds in the enclave, though an empty array gets added to that user. I don't see any CORS error:

Screen Shot 2020-05-05 at 7 32 01 AM

lacabra avatar May 05 '20 13:05 lacabra

@lacabra (cc: @cankisagun @ainsleys ) I have updated the project. These are the issues done:

  • Fixed the parser of the result from the findMatch enclave endpoint
  • Show the results if it matches with positive contact
  • Added pictures
  • Added the rest Contribute information
  • The Home page is at the moment the main text of the Figma Contribute page.

cmalfesi avatar May 18 '20 01:05 cmalfesi