Survey123 - Receiving a lot of 401 Unauthorized errors

2394
13
02-28-2019 12:49 PM
Brian_Laws
Occasional Contributor

We have a survey (developed in Survey123 Connect) that writes data directly to a related table in our SDE enterprise database.  The application has  been working  for approximately a year.  Today,  one of our field crew stopped by our office as he was receiving this error when trying to submit a survey on his tablet:

Survey123 error 401 unauthorized from submitting a survey

Several of us tested the survey with our different accounts and devices, and received the same error.  A couple of weeks ago I made a change to this survey (added an additional choice to a question) and republished this survey.  Today was the first time our field worker had tried to use it.  Assuming this might be the cause of the issue I changed the survey back to the way it was (removed the new choice) and attempted to republish and then received this error:

Survey123 error 401 unauthorized from publishing a survey

I became curious and was wondering if I could replicate the creation of this survey from an existing feature service.  The attempt immediately returned  this error:

Survey123 error 401 unauthorized from creating a survey

My co-workers and I tried some other troubleshooting ideas and found  we can submit surveys that write to a service if it's hosted on ArcGIS Online, and we can create surveys from feature services that are hosted on ArcGIS Online.  I downloaded the Survey123ConnectClassic and Survey123Classic apps to see if the newer versions might be our issue. Using the same workflow,  I received  the same errors every step of the way.  We also looked at editing feature attributes directly in a web map on ArcGIS Online as well as in Collector and had no errors there.  We also were able to publish new services to our server from ArcMap with no errors as well.  It appears if we try to do anything with Survey123 where the application is accessing our SDE enterprise database on our Server site, we receive this 401 Unauthorized error.  We checked  the existing permissions on the table and related feature dataset and classes and all were set up as before when the application was working. 

 

My colleagues and I spent most of our day searching for causes and troubleshooting the issue. We had no success in finding a remedy for this error.  We are hoping the GeoNet community can provide help. Our enterprise SDE database, ArcGIS for Server and our webadaptor are all at version 10.4  We are using ArcMap 10.6 and Pro 2.3.1.  All our office personnel run Windows 10 and our field crews are using Windows 10 ruggedized tablets and our server setup uses ADFS.

0 Kudos
13 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Brian,

The '401 Unauthorized' is a message from the ArcGIS Server hosting the Feature Service.  As a diagnostic, are you able to edit the feature service from the Map Viewer or another application (if you can, can your field worker)?  From the message, it appears that a setting may have changed on your ArcGIS Server.

0 Kudos
Brian_Laws
Occasional Contributor

Hi James,

 

Yes we did test to see if we could edit with other applications.  Not knowing where the error was coming from we wanted to see if we could just do simple edits to the table, so I brought the related table directly from our SDE Enterprise database into ArcMap and was able to edit attributes in the table without any issues.  I then created a brand new feature service hosted on our ArcGIS Server of just the feature class and its related table, brought it into an ArcGIS Pro project and was able to edit attributes in the related table there also.  I also created a new web map including this new feature service and was able to add a new record into the related table using the Collector app successfully. 

 

Then just to see what would happen I added the Survey123 custom URL scheme we have been using for our previously working survey into the custom popup of this new web map, called out to the survey and got the 401 Unauthorized error again when I tried to submit.  Lastly I went to Survey123 Connect and tried to create a new survey based off of this new feature service and got the 401 Unauthorized error again.

0 Kudos
RachelS
Occasional Contributor III

Hi Brian,

How did you resolve this?

I'm now getting 401 Unauthorized error when I try to publish existing forms.

0 Kudos
Brian_Laws
Occasional Contributor

Hi Rachel,

We never found a solution to this problem.  Once we started encountering this issue we then started saving our survey data to a hosted feature service on ArcGIS Online and would append our related table on SDE on a regular basis.

0 Kudos
MariaAndreoudi
New Contributor III

Hi!

I am also getting the same error message when I try to republish an existing form.

MariaAndreoudi_0-1635863438920.png

I have recently upptaded to the latest version of survey 123 connect (version 3.13.239) and it is the first time I am trying to re-publish my form with this version.

What can be the problem? Can you please provide some guidance?

0 Kudos
ZacharySutherby
Esri Regular Contributor

Hello @MariaAndreoudi @RachelS

This is a known issue with the 3.13 release of ArcGIS Survey123 and IWA ArcGIS Enterprise organizations. We have Esri Technical Support logging a BUG for this now, please reach out to Technical Support and they will be able to attach you to the defect. 

Thank you,
Zach
GavinCollins1
Esri Contributor

Hi @ZacharySutherby  can you share the BUG number for this please?

Thanks,

Gavin

*Edit*

BUG-000144672

MariaAndreoudi
New Contributor III

Thanks for your response.

Can I install the previous version of survey123 connect? How do I do this?

0 Kudos
Brian_Laws
Occasional Contributor

Hi Maria,

We started seeing this issue over a month ago when publishing a survey that referenced a hosted feature service from our Enterprise Portal, version 10.8.1.  In working with Esri Technical Support we did find that if I reverted to a previous version of Survey123Connect that I could publish without the 401 Unauthorized error.  Unfortunately I had a really old version of Connect (3.11.123) and it doesn't really help me with another issue we are having with Survey123 and Enterprise Portal with IWA.  We were told by the Esri tech that if we upgraded to Enterprise 10.9.1 that it resolved the 401 Unauthorized error, but we just upgraded to 10.9.1 yesterday and I'm still getting the error. 

Anyway, if you can find an install file for an older version of Survey123Connect you can uninstall the new version and then install the old version.

0 Kudos