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

issue accessing data decrypted at project level #134

Closed
SpikeLewis opened this issue Apr 7, 2022 · 11 comments
Closed

issue accessing data decrypted at project level #134

SpikeLewis opened this issue Apr 7, 2022 · 11 comments
Assignees
Labels
question ask us anything

Comments

@SpikeLewis
Copy link

Problem

I'm trying to use RuODK but having trouble accessing the data that has been encrypted at the project level. sorry if im missing something obvious.

Reproducible example

# insert reprex here
Session Info
# utils::sessionInfo()
@SpikeLewis SpikeLewis added the bug an unexpected problem or unintended behavior label Apr 7, 2022
@florianm florianm added question ask us anything and removed bug an unexpected problem or unintended behavior labels Apr 8, 2022
@florianm
Copy link
Collaborator

florianm commented Apr 8, 2022

What functions did you use?
Encryption is not supported in the OData and RESTful API endpoints, so https://docs.ropensci.org/ruODK/reference/odata_submission_get.html or https://docs.ropensci.org/ruODK/reference/submission_get.html won't work, but you can use https://docs.ropensci.org/ruODK/reference/submission_export.html (the CSV.ZIP export). Does the latter work for you?

FYI we're working on a vignette explaining encryption a bit better: #112

@SpikeLewis
Copy link
Author

SpikeLewis commented Apr 12, 2022 via email

@florianm
Copy link
Collaborator

Could you provide a reprex please? At least answer my question above re which function?

Status 400 is an authentication error, so it points to a wrong credential or maybe a lack of permissions of that account in ODK Central.

@SpikeLewis
Copy link
Author

SpikeLewis commented Apr 13, 2022 via email

@yanokwa
Copy link

yanokwa commented Apr 14, 2022

I've confirmed that there is an issue with @SpikeLewis's passphrase. It works when exporting directly from Central, but not with ruODK. I will continue to investigate to see if we can get a repro.

@SpikeLewis
Copy link
Author

SpikeLewis commented Apr 14, 2022 via email

@yanokwa
Copy link

yanokwa commented Apr 19, 2022

I've now tried a project with 3000 forms with no success. I'm now thinking it might be a network issue with OP's connection.

@florianm
Copy link
Collaborator

Thanks both for the troubleshooting. Looking at the code for submission_export, there are some limitations in ruODK:

  • Only the first encryption key is used
  • If the server throws an internal server error (HTTP status 500), ruODK terminates the export as not to exhaust server memory: https://github.com/ropensci/ruODK/blob/main/R/submission_export.R#L183-L188 - seeing you've got a different error caught in the next command (stop_for_status) tells me we're not getting a HTTP status 500, so the encryption key seems to have worked.

@SpikeLewis some more diagnostic questions:

@florianm
Copy link
Collaborator

@SpikeLewis did you get to investigate this further?

@SpikeLewis
Copy link
Author

SpikeLewis commented May 3, 2022 via email

@florianm
Copy link
Collaborator

florianm commented May 3, 2022

Brilliant, thanks for the detailed answers!
Seeing the same ruODK code worked on different forms and occasions I doubt there's a bug in there. However, we are always at the mercy of the internet pigeons flying straight and true.
I'm closing this issue with the most likely cause being network timeouts. If the pigeons start missing home again feel free to re-open this issue or create a new one!

@florianm florianm closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question ask us anything
Projects
None yet
Development

No branches or pull requests

3 participants