This error consumed me some time and I can't see the problem that brings the wkid error.
At first, a buffer is drawn around a line (identified as gra below), then I use the buffer polygon to capture any features from the feature service that are located within the buffer polygon. The buffer is drawn around the line, but the second query brings the error. Suggestions? Thank you.
getthelinebuffer: function(){
mysymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NONE, new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255,0,0]), 2), new Color([255,255,0,0.25]));
var resultEvent;
geodesicBuffer.distances = [1];
geodesicBuffer.geometries = [gra.geometry];
geodesicBuffer.unit = bufferunit;
geodesicBuffer.outSpatialReference = this.map.spatialReference;