Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Fixed UI frontend and removed old unused files #77

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

cmalfesi
Copy link
Contributor

No description provided.

@lacabra lacabra self-requested a review May 2, 2020 18:35
@lacabra
Copy link
Contributor

lacabra commented May 2, 2020

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 🙏

@cmalfesi
Copy link
Contributor Author

cmalfesi commented May 3, 2020

@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.

backend/app/.env Outdated
@@ -1,5 +1,5 @@
COMPOSE_CONVERT_WINDOWS_PATHS=1
PORT=4080
MONGOURI=mongodb://mongo/safetrace
MONGOURI=mongodb://localhost:10975/safetrace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmalfesi This change breaks my local install. If you change a parameter like this that requires a different setup, I would ask to document what else needs to be changed, otherwise it becomes problematic as we are troubleshooting one thing, we break another one. Thanks! 🙏

# app:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, uncommenting this section breaks my local installation.

@lacabra
Copy link
Contributor

lacabra commented May 5, 2020

@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

@cmalfesi
Copy link
Contributor Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants