"arcgis online null is not an object" - Error when making reports on CPR solution

1479
9
08-09-2017 12:17 PM
GrantHobgood
New Contributor

The full error 

"arcgis online null is not an object (evaluating 'this.feature Graphic Layer.clear')"

We are getting this on our phones when trying to place anonymous reports (no log in required) on our Citizen Problem Reporter. All of our layers are stock, straight out of the solutions deployment, aside from symbology being change to notate the problem status in the Issues web-map.  This error was happening prior to that change as well though. 

Where should I be looking to fix this error, and what exactly does it mean?

Also, when changing to this type symbology, it doesn't allow us to change the <null> value to be not allowed, nor a way to default to the report to be "submitted". Any way of changing that within Pro or AGOL?

0 Kudos
9 Replies
DevinBartley2
New Contributor III

I am getting the same error using the Crowdsource Reporter template. I am also using the stock template, but the error only shows up on mobile phones. The application is embedded into our webpage.

0 Kudos
AllisonMuise1
Occasional Contributor III

Do you see the same message when you use the sample version of this solution on the same mobile device? If so, could you provide some information on the mobile device, such as OS and model? If not, could you share the URL to your application? 

0 Kudos
DevinBartley2
New Contributor III

Hi Allison this does not happen in the sample version of the application you sent. In our application it happens on iOS using Safari. Our application that is having the problem is embedded in this page: Town of Canmore - Benchlands Trail Rehabilitation   Again, we just modified this application within ArcGIS online. There are no other custom modifications to it.

0 Kudos
AllisonMuise1
Occasional Contributor III

This app looks like it is hosted on a production site - is it ok if I submit a few test reports? I will mark them with my name and email so you can delete/hide them later

0 Kudos
DevinBartley2
New Contributor III

Yes - please test away, I can easily remove your submissions later. Thanks for your work on this!

0 Kudos
AllisonMuise1
Occasional Contributor III

It looks like you are coming across a known bug that we are planning to resolve in the next release of ArcGIS Online. The reference number is BUG-000107645, and you can also track the dev progress here: BUG-000107645 In the ArcGIS Online Crowdsource Reporter app when the mobile display settings uses 'S... 

In the meantime, you can get around this by displaying the list first, instead of the map, although I do understand why you have the map displayed first for your use case.

Regarding your other questions:

In my opinion, if you need to do this for multiple fields, the easiest way to do this would be to export your layer to a geodatabase, download that gdb, and edit the schema of the feature class in Pro. You will likely need to add new fields with the properties you'd like, calculate across any existing data, and then delete the old fields. You can then use this updated feature class to overwrite your existing layer. 

If you'd rather edit the layer directly and you need EITHER a default value OR the field to be required, the Solution Deployment Tool will allow you to add required fields, and the Add Data tool on the Data tab of the Details page of a service (under the burger menu) will allow you to add a field with a default value. The Solution Deployment Tool can then be used to either add or adjust domains on fields added through either workflow. Just like in the Pro workflow, I suggest adding the new fields with the properties you'd like, using the Calculate tool to bring across data from the old fields (click the header of the new field on the Data tab of the Details page), then delete your old fields.

In either case, keep an eye on your popup configurations. These are new fields, so you will likely need to re-do any settings such as order, aliases, and other display properties. You queries in the map may also be impacted if they reference any of the old fields.

(making these settings easier to change for people who are configuring this app is definitely on our radar!)

0 Kudos
DevinBartley2
New Contributor III

Thank for for your work on this Allison and the link to the bug tracking page. It is much appreciated.

KathrynCliftonGIS
New Contributor III

Allison,  

I've been researching how to add fields, apply default values, and also define domains for said fields. 

I appreciate the information about the "Add Data tool on the Data tab of the Details page of a service (under the burger menu)".  While I can add a field with a default value, I have not been able to find a way to then go into ArcGIS Pro and apply an existing domain to an existing field.  Is this still a limitation?

If I do export the feature service to a GDB, should I then be able to re-publish the service by overwriting it?

Thanks so much.  I look forward to your response.

Kathryn Clifton

Kathryn Clifton, GISP, PLS
0 Kudos
AllisonMuise1
Occasional Contributor III

Kathryn,

The Solutions Deployment Tool add-in can be used in Pro to add domains to existing fields on a layer. You will need to type out all the values for the domain, even if they are used on another field. 

Yes, if you export to an FGDB you can overwrite the service from Pro. Keep in mind that if there are any edits made to the service in the time between your export and the overwrite they will be lost.

-Allison

0 Kudos