I am working with a configured a GeoForm which includes the ability to submit attachments.
Recently, attachments are failing to load, throwing an error when I submit a GeoForm entry.
What could be causing this?
Here's some relevant variables:
Solved! Go to Solution.
I would like to point out that:
Hi Jason Matney,
A few questions/ troubleshooting steps to narrow the issue down.
How large are the files that you are uploading as attachments? Are you able to successfully upload the attachments through a rest call? ArcGIS REST API
If you monitor the request using web debugging tools, https://community.esri.com/groups/cats/blog/2017/05/04/monitoring-web-service-requests-from-web-apps.... If so, is there an error message that you are receiving from the add attachments request?
Take a look at these items, or try contacting tech support to have someone help narrow down what is causing the issue.
-Kelly
Hi Kelly,
Thanks for the assistance. I worked with tech support and they're in the process of diagnosing the issue.
How large are the files that you are uploading as attachments? between 70 kb and 3 mb
Are you able to successfully upload the attachments through a rest call? sometimes yes, sometime no.
If so, is there an error message that you are receiving from the add attachments request? Yes, the error is a No 'Access-Control-Allow-Origin' error
In the meantime, I believe I've isolated the issue - Stored Credentials, and the :6443 port.
Currently, my Feature Service is stored without the :6443 port.
This is because when I do include the port number, the option to store credentials is not available.
Here's the thing - when I add a secure service with a port number but without stored credentials, then publish a GeoForm based on this service, attachments load successfully.
So the problem is that the storing of credentials without the 6443 port number is preventing the REST servicing from accessing the addAttachment operation.
Why might this be happening?
Thank you - J
Hi Jason.
It sounds like here is an issue with how your web server is configured where your web adapter is installed. I'll check on the support case.
Check to see what the maximum upload size is on your web server to see if this is causing the issue. If you can only upload small files, a limitation on the web server may be causing the issue.
The No 'Access-Control-Allow-Origin' error may also indicate an issue with CORS on the web server. Here is some information on CORS and how to enable on a webserver: https://enable-cors.org/server.html
-Kelly
Thank you - After working with tech support, we determined that file size is a significant variable in influencing the chance of attachment upload failure. Files which are large enough to be transfer-encoded 'chunking' fail to upload (around > 3mb).
I will be sure to look into CORS , FYI the support case is Esri Case #01957368
Full error image - only attachments which are transfer-encoded as chunked fail with the No 'Access-Control-Allow-Origin' header error.
Hey Kelly Gerrow
We're running into this in images captured via survey123. It causes the entire survey to become locked and unable to edit or submit. We're talking 100KB images (jpg) files that are taken in the survey...shouldn't be an issue but when I test the images out (obtained from the users devices) ArcGIS Online fails to upload the file. When I submit the file directly to the server service that is hosting the feature service it works fine, so the issue is clearly with the internal proxy.
The issue is that we can't use a custom proxy for this, survey123 requires AGO afaik. What can we do to work around this issue? I've already tried communicating with esri support on this and have escolated the issue as it's affecting around 50 people in our organization. So far though, the bug is still marked as "New" and from the looks of it no plans to fix.
HI Gregg,
Sorry for the late reply. This bug is being investigated for a fix in an upcoming release. BUG-000107195: ArcGIS Online Utility Proxy fails to include an acce..
keep an eye out for the list of issues addressed in the next release.
-Kelly
Kelly Gerrow Great news that the bug is being investigated! I reported an issue through a support case #02127148 that led to that bug being cited, back in June 2018.
I'm really glad this is getting fixed. This has been a huge headache for me the last 6 months. Random images just won't submit in surveys and the survey's completely fail to submit because of this, and there's no solution so far...users can't just "save the image as a different format" since they don't know which image is failing. And getting users to email the images/logfiles and diagnosing the issue is really cumbersome. So glad a fix is on the way!