Hi all,
We're facing an error in Survey123, specifically when trying to add attachments/photos to a record opened from the Inbox using the field apps (both desktop and mobile versions). New records can be created and submitted with this form (including pictures), attributes can be edited from the inbox, but pictures cannot be uploaded from the inbox. Only shows a basic "Send Error Surveys not sent: 1" message. The S123 logs show an error code 10500, but so far we haven't been able to find what's causing it.
For context, this is happening specifically in an Enterprise 11.2 environment. Both the form and the survey have been recreated and tested, the error is still reproduced. However, on another Enterprise environment or AGOL the error does not occur, using the same form. It's quite a simple form, so the issue must be within this one Enterprise environment.
Any ideas of what we should be looking at? So far the portal/server logs haven't given us many clues.
Thanks
This might be a long shot, but what about the underlying PostgreSQL logs? The ArcGIS Server logs will only show log entries from the ArcGIS Data Store service, but not the underlying PostgreSQL database the data store runs off of. I've found and resolved multiple S123 issues by looking at the PostgreSQL logs directly.
The location should be here: C:\arcgisdatastore\logs\machine name\database
Ryan, that's a good suggestion. I went into those logs and found this error message (it's the only one that I thought was relevant):
ERROR: "[service name]" is not a table or materialized view
STATEMENT: CREATE INDEX CONCURRENTLY [field name]_Index ON db_1966q.hsu_dqthc.[service name] USING btree([field name] ASC) WITH (fillfactor='75')
I'm not sure what to make of it at this time. Replaced service and field names with [generic tags] like this.
Thanks
Hmm, I'm not sure if that is related to your issue or not. What I'd recommend doing is try and correlate this error message when receiving the error in S123. So if you can, try and submit a S123 form that will result in an error, and then check the log again and see if you see this same error message at the same time you submitted the S123 form.
If you receive the same log message at the same time you submitted the S123 form, then that error is probably related. Unfortunately even if it is related, I'm not sure what that means as far as fixing it, but at least it would give you a little more information to work with.
For sure, will try to sit with the owner of the survey to run another test and see if they're related. Still I kept digging based on that first error message and it looks like there's a problem with the view layer that's created by S123 when publishing the service. On the overview page for this layer, I get this error message as well:
Unable to load https://myportalname/server/rest/services/Hosted/servicename_results/FeatureServer/0/metadata status: 500
That's a metadata error, but still both errors are pointing to the same service. Will continue exploring that avenue for the moment. Posting this update here in case someone else has encountered it before.
Thanks again
Can you open the developer console in AGOL or Survey123 site and check for network messages when adding an attachment via the web apps or data tab? I'd check the settings of the hosted feature layer and see for any differences between the envs.