Select to view content in your preferred language

Unable to Print Password Protected External Layers (url added to Portal as a new item) when using a LayerDefinition

3023
8
Jump to solution
06-30-2021 05:21 PM
BlytheSpendlove
Regular Contributor

Background:

I am in charge of a map for my organization that utilizes a lot of external data. If it is data that requires an ArcGIS Online subscription (like Living Atlas Data) we create a new layer in the portal by going to My Content > Add Item > From a URL > ArcGIS Sever web service. This way, we have a portal content item in our enterprise environment where we can save the ArcGIS Online password, and not require all of our users to sign into ArcGIS Online to use the layer.

Problem/Question:

Unfortunately, some of these password-protected-external-layers / 'Url-added-feature-layers' (not sure what to call these) have trouble with the print widget in our web apps and I've seen some really weird behavior. I am looking for help with troubleshooting the following situation in particular:

For our internal version of the USA_Wildfires_v1 layer I could print one of the layers in the feature service but not the other. Turns out, for the problem causing layer, I needed to go into the JSON of the map and remove the "layerDefinition" - after doing this I could print the layer. (https://services9.arcgis.com/RHVPKKiFTONKtxq3/arcgis/rest/services/USA_Wildfires_v1/FeatureServer)

I've been troubleshooting and it seems like, at least for some of the problem layers, removing the "layerDefinition"  from the layer in the map's JSON ((and instead having the map and print widget just reference the default feature service symbology) fixes the issue. 

Why is that? Could an old way that the Web Viewer used to create layer definitions cause problems with the current print service? Or could it be due to the print service not being able to reconcile what the service is saying the layer definition is versus what the map is saying?

Follow up Question: Does that (situation above) mean I can't have any "layerDefinitions" on these external layers if I want to be able to print them? 


Thanks,

Blythe Spendlove

0 Kudos
1 Solution

Accepted Solutions
BlytheSpendlove
Regular Contributor

Hi @BillFox It gives the normal red failure message in the dialog box, but in the developers console, I found a CORS error message. I am thinking there might have been an issue with the symbology image the layer was referencing. As in, referencing the symbology image directly in the json gives issues, but having the feature service reference the symbology (as it's default symbology) does not give the same issue.


The issue may also be related to a broader, more general problem we have confirmed, where the print service has intermittent to constant (depending on the layer) issues printing external feature services that we have hosted in our portal  (no useful error messages in the developers console for this one). We've narrowed down that the issue is limited to just hosted external services (particularly ones that have passwords saved in the item details). The issue also does not happen in AGOL, just in Enterprise. I'll be opening a ticket today with Esri, I'll let you know if they are able to help me pin down the issue any further.

View solution in original post

0 Kudos
8 Replies
ThomasJones1
Esri Contributor

Hello @BlytheSpendlove 

I haven't seen this behavior before, my initial thought is maybe the print service isn't able to print label properties defined in the layerDefinition for some of these services. If possible I'd recommend creating a support case to troubleshoot this issue further. 

I would also recommend gathering additional information to assist with further troubleshooting:

  • ArcGIS Server logs 
  • Any error messages returned
  • Specific service failing
  • layerDefinition examples

Thanks.

BlytheSpendlove
Regular Contributor

Thanks @ThomasJones1 I'll look into that and gather more information.

0 Kudos
BillFox
MVP Frequent Contributor

Hi Blythe,

Try standing up a separate non-federated ArcGIS Server machine so you can use it just for the ArcGIS Server printing URL.

Set your print widget to use it instead of the print service from your normal print service.

0 Kudos
BlytheSpendlove
Regular Contributor

Thanks @BillFox !  I'll mention that idea to my IT counterpart who is helping me troubleshoot this issue.

0 Kudos
TanuHoque
Esri Regular Contributor

@BlytheSpendlove 

That is very odd. Is your print service published from ArcGIS Pro or ArcMap?

I agree with @ThomasJones1 that it is better to contact Esri Support and have them take a look.

 

thanks

BillFox
MVP Frequent Contributor

Do you get any red failure message in the print widget dialog?

BlytheSpendlove
Regular Contributor

Hi @BillFox It gives the normal red failure message in the dialog box, but in the developers console, I found a CORS error message. I am thinking there might have been an issue with the symbology image the layer was referencing. As in, referencing the symbology image directly in the json gives issues, but having the feature service reference the symbology (as it's default symbology) does not give the same issue.


The issue may also be related to a broader, more general problem we have confirmed, where the print service has intermittent to constant (depending on the layer) issues printing external feature services that we have hosted in our portal  (no useful error messages in the developers console for this one). We've narrowed down that the issue is limited to just hosted external services (particularly ones that have passwords saved in the item details). The issue also does not happen in AGOL, just in Enterprise. I'll be opening a ticket today with Esri, I'll let you know if they are able to help me pin down the issue any further.

0 Kudos
BillFox
MVP Frequent Contributor

maybe in this realm

#BUG-000090817 Printing ArcGIS.com Marketplace Services from the Portal for ArcGIS map viewer using a print service from a federated ArcGIS for Server installation fails.

0 Kudos