Hello,
one of the enumerators get the error "Generic Exception Error: Unauthorized (401)" when trying to submit.
Might be due to the fact that the form he/she is trying to upload is no longer visible to the configured QR code and/or the version of the form has changed (and it was not refreshed before collecting data)?
Is there anything one can do to fix the error?
Thank you!
Hi @alfonso,
Based on my experience, the "Generic Exception Error: Unauthorized (401)" usually happens when there is a problem with the form's visibility or version. It seems the enumerator might be trying to submit a form that has been removed or updated without a refresh.
To fix this issue, please try these :
- Make sure the form is still visible and accessible with the QR code.
- Check that the enumerator is using the latest version of the form. They may need to refresh or re-download it.
1 Like
There can be two reasons of "Unauthorizized (401)" error: 1) App user no longer has access to the Form. 2) App User's access has been revoked.
For the first one, fix is just to add the access back by going to the Project > Form Access page.
For the second cause, fix is a tricking one. Once App User's access has been revoked, there is no way to undo that. Now if you have submissions on the device and really want them to be sent to the server, you can perform following steps:
- Create a new App User / QR Code
- Give that new App User access to the Form
- Share the QR Code with the enumerator
- Import the new QR Code on the device
- Go to the Settings > Server > copy the URL
- Switch to the old project
- Go the the Settings > Server > paste the URL
- Go to "Ready to send", select the submissions to be sent, tab "Send Selected".
Note: Step 1 & 2 needs to be performed on the Central. Step 4-8 to be performed on the Collect.
PS: I don't think publishing a new version of the Form will cause 401 error. Submissions created with old Form definition will still be sent to the server, there are few caveats though, you can read the details at https://docs.getodk.org/central-forms/#updating-forms-to-a-new-version