This error is usually due to the API's automatic detection of CORS support. The JSAPI attempts to access the rest endpoint of the service. If the service doesn't support CORS the request fails and the error you see is logged to the console.
In cases where CORS support is not available either due to lack of browser support for CORS or if the service you are making cross domain requests to does not support it you may need to setup a proxy for use by your application. Details on installing and configuring the proxy can be found here: Esri/resource-proxy · GitHub