"Cannot read property '0' of null" error when trying to open survey in web browser

6071
18
Jump to solution
03-06-2019 02:46 PM
ChristinaHoddinott1
Occasional Contributor

I just published a survey from Connect and when I tried to open it in my web browser this is what I get. Everything seemed to be working fine in Connect, so I don't know why this would happen. Anybody know? Attached is my xls form.

Edited to add that the survey works just fine when accessed from the app. It just doesn't work in the web browser.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JohnathanHasthorpe
Esri Regular Contributor

Please can you retest this survey after clearing your browser cache - I believe this issue was fixed in the last release. See the published version of your survey: https://survey123.arcgis.com/share/ac9c8bb3958c4fbe98ecb0c0fe49b7f1 which is working for me.

View solution in original post

18 Replies
JohnathanHasthorpe
Esri Regular Contributor

Please can you retest this survey after clearing your browser cache - I believe this issue was fixed in the last release. See the published version of your survey: https://survey123.arcgis.com/share/ac9c8bb3958c4fbe98ecb0c0fe49b7f1 which is working for me.

JoeBryant1
Occasional Contributor III

We are also getting a version of this error when using a browser (Chrome and Explorer), but not when using the App.

"Failed to submit - Cannot set property 'z' of null".

We have cleared our cache and restored the stock style formatting, but this did not resolve the issue.

FYI: The feature layer we based our form on is a related table to a point feature layer. Neither the related table, nor the parent point feature layer have Z values enabled. There is not a geopoint question in the form. The only question in the form that points to a field in the parent (point) feature layer is a hidden field for the GUID that the relate is based on.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Joe,

This error sounds different than the one described in the rest of this post.  Can you file an Esri Support ticket to troubleshoot this?

0 Kudos
ChelseaRozek
MVP Regular Contributor

Hi Joe Bryant‌, did you find a solution to this with ESRI Support? I'm experiencing the same issue.

0 Kudos
JoeBryant1
Occasional Contributor III

Update: ESRI Support has officially logged this as a bug:

#BUG-000126543 Submitting a survey from Survey123 for ArcGIS (website) would give a "Failed to submit -Cannot set property 'z' of null" if survey with related tables that was made from a Hosted Feature Service and a Feature Service from ArcGIS Server was published from Survey123 Connect version 3.6.137

The best workaround for submitting in a browser is as Chelsea suggests below: use a URL parameter to open the Survey in the 3.3 Version.

(I assume we should move this thread to a separate post for others who are searching for a solution. But I'm not sure how to do that.)

JoeBryant1
Occasional Contributor III

We're still working on it. My guess was that this was being caused by Survey123 not managing the relationship between the submitted record and the related point feature class. If submitted using the app, all the data except for the calculated GUID (used for the relationship) and the link/relationship itself is getting populated. We have followed James' other post on formatting the GUID (https://community.esri.com/thread/208613-pass-global-id-from-collector-to-g ), and can see the correctly formatted string value in a notes field in the form. However, the feature service is not accepting/storing this string currently. Once we fix this issue, I will see if the browser issue is resolved.

0 Kudos
ChelseaRozek
MVP Regular Contributor

Thanks for the quick reply! I'm trying to get the Election Management solution to work, and upon closer inspection, looks like the metrics table doesn't actually have a relationship with the feature layer so I guess my situation is a little different. Upon deployment, the form works. Republishing from Connect without even tweaking the xls form causes the form to get the Cannot set property 'z' of null" error in the web version. I'll report back if I figure anything out.

0 Kudos
JoeBryant1
Occasional Contributor III

Actually, you reminded me  - there originally was a repeat in our form from the relationship. We had deleted the Repeat Group, but I believe there was another "Form End" or similar field that was auto-created that also had to be deleted. This may have been related to the error we were getting. I'm currently not able to reproduce it as we changed multiple variables and now the form won't initialize. (Remember your good troubleshooting workflows, kids!)

0 Kudos
ChelseaRozek
MVP Regular Contributor

I might have it! Is your form pretty old? Looks like the Election Management Wait Time form was published with Survey123 version 3.3 (just deployed a fresh copy, didn't even download yet in Survey123 Connect). Survey123 website says under Settings>Version:

When I submit a record, it works.

When I click the "Press here to preview" and it runs in version 3.6, it breaks! Can you check which version yours is running as?

On my original copy of Election Management that I broke, it says: 

This must be because I republished the XLS form in Survey123 Connect version 3.6.137.

I'll check my laptop tomorrow, it might still have an old version of Connect to try republishing it on that.

0 Kudos