Survey123 Connect Publish to Portal Fails with JSONObject[\"timeInterval\"] not found

2543
7
03-02-2018 09:22 AM
JonSwoveland
Occasional Contributor

Hello all, and thanks for reading.

First, my environment:

  • Survery123 Connect 2.6.4
  • ArcGIS Enterprise 10.6.1 (single server deployment on Windows)I
  • Authentication: built-in Portal identity, over http (was using IWA over SSL, but this caused other publishing issues)

I have a survey definition that publishes without issue to ArcGIS Online, however when I attempt to publish it to our ArcGIS Enterprise, publishing fails with the error JSONObject[\"timeInterval\"] not found.

JSONObject[\"timeInterval\"] not found

I have attached the Survey123 Connect log file (hostnames and usernames redacted).  

The error shown in the log is:

http://PORTAL_HOST_REDACTED/server/rest/admin/services/Hosted/service_ade64c8c3aa24a369dc5bb5153e68a... error {
"code": 500,
"details": [],
"message": "JSONObject[\"timeInterval\"] not found."
}

Another user posted the same error a couple of weeks ago, and said he resolved it by recreating his form definition line by line.  It would be great if  Survey123 team could do some debugging on this and find out what the actual underlying issue is.

I would post the survey definition itself, but it I am waiting to get permission from my client who authored it.  Will update this post with the form if granted

EDIT: Survey definition now attached (see IGC Physical Inspection.xlsx)

0 Kudos
7 Replies
danbecker
Occasional Contributor III

I've done more troubleshooting since my post a couple of weeks ago.

It seems to be a problem with repeats, and not anything to do with the underlying form xls file. I had a working, existing survey that was published to Portal/Server 10.6, the feat. service did not contain any data, it was blank. The survey consisted of 2 repeats, each with 2 text fields, nothing overly complicated.

I then tried to add a single text entry outside of the repeats, republish, then encountered the timeinterval error. I had to delete the survey, form, service and folder from portal and start over. I first tried publishing a survey with just the repeats, same timeinterval error.

I deleted everything and started re-publishing the survey one group at a time, every attempt to re-publish was successful. Every group of questions that were published were NOT repeats. I then added the 2 repeats, republished and everything worked.

Really strange behavior and will likely be difficult to repro. But seems to be related to repeats, and re-publishing (editing) existing features services.

Jon - Did your survey have atleast 1 repeat in it?

JonSwoveland
Occasional Contributor

Thanks for the quick response, Dan.

For the form that gave the error when publishing to Portal, did you happen to try publishing to AGOL? Or, if you still have an xls that fails to publish, would you be able to share it? Might be helpful to ESRI if we can get a few such files for them.

I’ll have to inspect the xls file for these repeats you speak of (I’m new to Survey123 and this form was authored by someone else).

I do think the best outcome would be if an ESRI dev could repro this in a debugger to determine the actual cause.

Cheers,

Jon

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

Hi Jon

This is the result of bug in Portal 10.6 in relation to the Start and End Question types.

We have added a workaround in 2.7 to be released this month.

Alternatively you can just remove those question types from the survey.

Cheers

John

JonSwoveland
Occasional Contributor

Ah ha! 

Thank-you, Johnathan, for this information!

Out of curiosity, is there somewhere I can search for ArcGIS Enterprise known issues?

Cheers,

Jon

0 Kudos
danbecker
Occasional Contributor III

Confirmed on my end also.

1) I had a survey with start/end fields, tried to edit a different survey question and re-publish; result was the timeInterval error.

2) deleted the start/end fields, republished successfully. The re-publish wipped out the data due to schema changes, so now I had a feat. service with no data.

3) I then added the start/end fields back into the survey and re-published again; successful.

So I have the start/end fields in the survey now, odd how the issue happens sometimes, not others.

0 Kudos
PruthaShirodkar
New Contributor

Hello,

Error

I am getting the same error. However I am trying to add a layer to an existing service via javascript code. I am passing the following parameters to the api. 

I am referring to the sample code in:

 Add to Definition (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers 

Sample code:

const options = {
query:
{
"layers": [
"adminLayerInfo": {
"tableName": "db_10.user_10.LOADTESTSOIL_LOADTESTSOIL",
"geometryField": {"name": "Shape"},
"xssTrustedFields": ""
},
"name": "LoadTestSoil",
"type": "Feature Layer",
"displayField": "",
"description": "",
"copyrightText": "",
"defaultVisibility": true,
"ownershipBasedAccessControlForFeatures": {
"allowOthersToQuery": false,
"allowOthersToDelete": false,
"allowOthersToUpdate": false
},
"editFieldsInfo": {
"creationDateField": "CreationDate",
"creatorField": "Creator",
"editDateField": "EditDate",
"editorField": "Editor"
},
"editingInfo": {
"lastEditDate": "1455126059440"
},
"relationships": [],
"isDataVersioned": false,
"supportsCalculate": true,
"supportsAttachmentsByUploadId": true,
"supportsRollbackOnFailureParameter": true,
"supportsStatistics": true,
"supportsAdvancedQueries": true,
"supportsValidateSql": true,
"supportsCoordinatesQuantization": true,
"supportsApplyEditsWithGlobalIds": true,
"advancedQueryCapabilities": {
"supportsPagination": true,
"supportsQueryWithDistance": true,
"supportsReturningQueryExtent": true,
"supportsStatistics": true,
"supportsOrderBy": true,
"supportsDistinct": true,
"supportsQueryWithResultType": true,
"supportsSqlExpression": true,
"supportsReturningGeometryCentroid": true
},
"useStandardizedQueries": false,
"geometryType": "esriGeometryPolygon",
"minScale": 2311163,
"maxScale": 1128,
"extent": {
"xmin": -13090714.767112788,
"ymin": 3841739.0914657288,
"xmax": -12922032.654624918,
"ymax": 3962581.2727843975,
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
"drawingInfo":{"renderer":{"type":"simple","symbol":{"type":"esriSFS","style":"esriSFSSolid","color":[76,129,205,191],"outline":{"type":"esriSLS","style":"esriSLSSolid","color":[0,0,0,255],"width":0.75}}},"transparency":0,"labelingInfo":null},
"allowGeometryUpdates": true,
"hasAttachments": false,
"htmlPopupType": "esriServerHTMLPopupTypeNone",
"hasM": false,
"hasZ": false,
"objectIdField": "FID",
"globalIdField": "GlobalID",
"typeIdField": "",
"fields": [
{
"name": "FID",
"type": "esriFieldTypeInteger",
"actualType": "int",
"alias": "FID",
"sqlType": "sqlTypeInteger",
"length": 4,
"nullable": false,
"editable": false,
"domain": null,
"defaultValue": null
},
{
"name": "SHP_ID_ARE",
"type": "esriFieldTypeDouble",
"actualType": "float",
"alias": "SHP_ID_ARE",
"sqlType": "sqlTypeFloat",
"nullable": true,
"editable": true,
"domain": null,
"defaultValue": null
}

],

"types": [],
"supportedQueryFormats": "JSON",
"hasStaticData": false,
"maxRecordCount": 1000,
"standardMaxRecordCount": 4000,
"tileMaxRecordCount": 4000,
"maxRecordCountFactor": 1,
"capabilities": "Create,Delete,Query,Update,Editing,Extract,Sync",
"exceedsLimitFactor"
}
]
}

Any help would be appreciated. Thanks.

Best,

Prutha

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Prutha,

While you are receiving the same error code as this user experienced in Survey123, it is not the same error message.  As you are using direct calls with javascript, not Survey123, the ArcGIS REST API‌ community may be more appropriate.  Given the error message, have you inspected your addToDefinition payload?

0 Kudos