New errors since Survey123 Update

1305
12
12-12-2022 11:52 AM
RogerAsbury
Occasional Contributor

Getting a couple of new errors since the update on Dec. 6. The most obvious is when people open the survey and see:

errorinitializing.png

 

Which is pretty vague error, all things considered. 🙂 And it doesn't seem to affect anything. You can close this error, fill out the form, and it works just fine. But I'd like to fix whatever may be causing it.

Next, after filling out the form, people may (doesn't happen every time...) see the following error:

webhooktimeout.png

If you select show details it shows the URL to the webhook processing server and claims it timed out after five seconds. However, most of the time, the server processed the webhook just fine.

Additionally, it now seems that the webhook it being triggered twice per entry. 

Any ideas what may be causing these. I'm more concerned about the first error, as it shows up consistently and might be a deterrent those attempting to fill out the form.

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
Tags (3)
12 Replies
RogerAsbury
Occasional Contributor

Ehhh, Ignore the first error. It went away with a republish from Survey123 Connect. *shrug* It shall remain a mystery. 🙂

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos
ChristopherCounsell
MVP Regular Contributor

Maybe tied to this issue where '0' choice values are treated as null?

https://community.esri.com/t5/arcgis-survey123-questions/app-version-3-16-113-treats-zeros-as-nulls-...

0 Kudos
RogerAsbury
Occasional Contributor

Read that issue and found it quite interesting. However, while I do have some choice options in the affected survey, none are numeric. And, as noted, a simple republishing of the survey made the error go away. Which I guess is a solution without an answer. 🙂

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
jvarasanz
New Contributor III

I'm running into the same issue, so my webhook runs twice as you describe. The problem is that the webhook submits emails, thus, everything is duplicated and leading to a much bigger problem. 

Thanks for reporting this, since I didn't know how to explain what happened. 

Any additional guidance will be highly appreciated.

Javier

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi @RogerAsbury @jvarasanz - with regard to the webhook issue - due to concerns raised by other users regarding connectivity and lack of response issues during the webhook submission process, the webhooks now repeat if the webhook destination URL does not respond within 5 seconds.  It sounds like your webhook destinations are holding the submission connection open while processing – can you provide more details on your setup?  We would expect the webhook endpoint to close the connection as soon as the data was received.

0 Kudos
jvarasanz
New Contributor III

I've been looking a bit closer into this, and the webhook will always trigger twice. Thus, every action that runs in the background overlaps and duplicates all expected outputs such as email notifications, adding new rows to the feature service, file downloads, etc.

In summary, the webhook destination (in my case Azure) is not holding the submission, but rather taking a bit longer to process the request. I hope this makes sense, since running the code twice for a single submission is breaking all the logic before our complex workflows.

Thanks for your patience.

Javier

0 Kudos
jvarasanz
New Contributor III

Happy 2023!

I've noticed a bit of improvement, but sometimes the survey takes longer than expected to submit, thus causing the webhook to trigger twice.  In this scenario, the webhook is received and triggers subsequent actions on my end even before the webform ends the submission. Let me know if you need any additional information.

Thanks,

Javier 

0 Kudos
SuryaRathanlal
New Contributor

Hi Javier,

We've also been experiencing the same. It happens to our Power Automate webhook (which usually takes few ms) and also our Custom API webhook. It is not very consistent but happens at random times which is causing duplicates to our workflows. Could you please share what you did to overcome the duplicate submissions.

Thank you!

0 Kudos
jvarasanz
New Contributor III

Good afternoon.

I'm relying heavily on Azure Portal and ended up removing all the code from the function tied to my Webhook to only retrieve the payload and post it to a query under my storage account. I then used a query trigger to read the payload posted to that query container and process the records as they come in. The end result is a much faster response from Azure in regards to the submissions from Survey123. The performance of the query trigger, on the other end, is pretty good and responsive, so no issues since then.

I hope this helps, although I'm not sure if you'll be able to integrate a similar flow into Power Automate.