What could be causing Attachments to fail in a GeoForm submission?

1392
12
Jump to solution
06-14-2017 08:00 AM
JasonMatney
New Contributor III

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: 

  • The feature service for the GeoForm is hosted on an ArcGIS Server instance that inhabits one virtual machine, while the backend database (SQL Server) inhabits another virtual machine. The speak to each other over an open port number. Both virtual machines have > 10 GB of free disc space, plenty of free RAM, and no background processing eating up CPU %.
  • I recently secured the REST service produced by ArcGIS Server. This means that ArcGIS Admin is using a CA-signed certificate in order to enable HTTPS.
  • The error seems more likely to be thrown in response to attempting to upload an image rather than a Word document. Also, clicking 'Retry' over and over sometimes will result in the image file successfully attaching.
1 Solution

Accepted Solutions
JasonMatney
New Contributor III

I would like to point out that:

  • this issue is caused by a known BUG: 
    • BUG-000107195: ArcGIS Online Utility Proxy will fail to include an access-control-allow-origin header when attaching certain files to secure feature services which have been added to ArcGIS Online with stored credentials.
     
  • this issue was resolved by using a Custom Proxy on a locally-hosted service: Use proxy—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers  

View solution in original post

12 Replies
KellyGerrow
Esri Frequent Contributor

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

0 Kudos
JasonMatney
New Contributor III

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

0 Kudos
KellyGerrow
Esri Frequent Contributor

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

JasonMatney
New Contributor III

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

JasonMatney
New Contributor III

Full error image - only attachments which are transfer-encoded as chunked fail with the No 'Access-Control-Allow-Origin' header error.  

GreggRoemhildt
Occasional Contributor III

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.

0 Kudos
KellyGerrow
Esri Frequent Contributor

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

ElliottPlack__SHA_
New Contributor II

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. 

0 Kudos
GreggRoemhildt
Occasional Contributor III

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!

0 Kudos