Hello, I'm attempting to get the Print Widget functioning with some secured layers hosted on AGOL but am running into some difficulty getting this to work. We have several feature layers that we've created (a mix of both points and polygons) and if any of them are turned on, the print widget fails:
{
"error": {
"code": 400,
"extendedCode": -2147467261,
"message": "Unable to complete operation.",
"details": ["Error executing tool. Export Web Map Task : Failed to create layer from service at https://services8.arcgis.com/redacted/arcgis/rest/services/redacted/FeatureServer/0.\nFailed to execute (Export Web Map).\nFailed to execute (Export Web Map Task)."]
}
}The strange this is that the print widget DOES work as expected with various Esri provided "premium" layers such as Tapestry Segmentation, Population Density, etc.
It seems like it should be possible to get this print service to work with AGOL secured services, since it works withe the Esri premium layers but this one has me baffled. If anybody has any insight into this, it'd be appreciated.
Thanks.
Relavent code snippets:
Print Widget
const print = new Print({
view: this.view,
printServiceUrl: 'https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export Web Map Task',
});
this.view.ui.add(print, 'top-right');
Feature Layer
import FeatureLayer from 'esri/layers/FeatureLayer';
import popupTemplate from '../../helpers/redacted';
const fLayer = new FeatureLayer({
url: 'https://services8.arcgis.com/redacted/arcgis/rest/services/redacted/FeatureServer/0',
outFields: ['*'],
title: 'redacted',
opacity: 1.0,
visible: false,
popupTemplate: popupTemplate
});
export default fLayer;
This is observed in MacOS, Chrome 67. I'm using the Esri js cli version 4.7 and Typescript.