-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Failing to load parent form with a CORS issue on 'jr://' resources #5061
Comments
Hello @Yann-J, Are you facing the same problem with (static) pull data? If you do, you'd rather open the issue on the enketo repo. But yes, |
Good question @noliveleger indeed I had not tried. Just did a quick experiment using this form and can confirm that Is there an easy way for me to check that the dynamic data attachment job has worked and see the generated XML? |
OK, doing some further digging, here are some more details:
I'm not entirely sure how the Contrasting this to when I load the preview in the Kobotoolbox UI, where the links point to kpi snapshot URLs rather than kobocat URLs: This time the manifest includes a friendlier I don't know if all that is expected, but could this odd |
@Yann-J, thanks for the super detailed investigation. |
@Yann-J We could not reproduce the error on our server. You can give it a try with exact same project and let us know if you do face the same error, but from my test, I'm able to load the form in EE and preview without any problem. |
OK thanks @noliveleger , I'm sure it's something to do with my own server setup... everything else seems to work fine so I think the setup is generally fine, but there might be some configuration I don't fully understand... |
Hello @Yann-J, as you may already know, due to the small size of our team and large volume of users, we cannot provide support or guidance via GitHub issues. Especially with custom setup. You may search for help on our community forum. |
Description
Steps to Reproduce
The form displays correctly in the preview window:
including pulling data from the parent form:
But NOT when opening the published enketo link
Expected behavior
Form should load correctly
Actual behavior
The published Enketo form (here), throws a
Failed to load parent_form.xml
error:Looking at the browser console, I can see that all network calls succeed, but an error is raised that seems to block the loading of the resource, throwing this error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at jr://file/parent_form.xml. (Reason: CORS request not http).
Looking at the source XML of the form as downloaded from Kobocat, I can indeed see that the resource URI is
jr://
:I do not know what these
jr://
resource URIs are, but these don't seem to be expected, since indeed browsers will appropriately block these for violating CORS...Additional details
Using the following docker images on our own infra:
I would appreciate some guidance troubleshooting this...
jr://
URIs expected?When inspecting the browser logs while loading the preview, I can see that this is references as a separate media URL in the form definition downloaded from Enketo, and there is a separate http call to download the linked
parent_form.xml
, which is going through without any CORS issue...Many thanks! 🙏
The text was updated successfully, but these errors were encountered: