laptop and a wrench

Bug

The error message, "Promise rejected: a.toJSON is not a function" is returned when autocasting a new query using QueryTask.

Last Published: July 16, 2019 ArcGIS API for JavaScript
Bug ID Number BUG-000123651
SubmittedJuly 11, 2019
Last ModifiedDecember 1, 2020
Applies toArcGIS API for JavaScript
Version found4.12
Operating SystemWindows
Version Fixed4.13
StatusFixed

Workaround

Create a new instance of a QueryTask to execute the query successfully. Refer to the script in the following link:https://jsbin.com/kiwomecage/1/edit?js,output

Steps to Reproduce

Bug ID: BUG-000123651

Software:

  • ArcGIS API for JavaScript

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic