Cannot print. Very frustrating problem.

18247
87
03-26-2019 09:19 AM
CarlTownsend1
New Contributor III

Hi, I'm trying to use the print widget but it fails with the error message failed to create layer from service at http....../..../.../....etc. doesn;'t matter the page size or format, it always fails.

I'm using webAppBuilder 2.11 on our dev server and using locallayer to bring in layers from ArcGIS Server 10.6 via a published mxd.

I had the same problem when I was trying to develop a mapping service using the javascript api. printing would not work there either (It fails silently)

Assuming the print service is an out of the box solution, what else can I look at? I've looked at the setting on ArcGIS server,  I've also tried logging onto our server loading up the map and printing directly from there with no luck. I've really hit a brick wall here and everything I've tried does not work.

Does anyone have any ideas on where I could try looking next? Thanks.

87 Replies
TanuHoque
Esri Regular Contributor

Nate Sylvester‌,
what type of security you have enabled?
you have portal too?

please check the value for webmap_as_json that being sent to your print service. Does it contain tokens?

0 Kudos
AndrewThompsonTRC
New Contributor II

Yes we have Portal too.  I upgraded to 10.8 over the weekend. The map services and custom print service all reside on the same server which is federated with the Portal.  Everything appears to be configured correctly and I can print webmaps without secured services.  What is the easiest way to check to see if the webmap_as_json contains tokens?

0 Kudos
TanuHoque
Esri Regular Contributor
What is the easiest way to check to see if the webmap_as_json contains tokens?
  • Open you web app
  • If you use Firefox, choose Web Developer | Network from the menu or press Ctrl + Shift + E to open FireFox DevTools.
    • If you use Chrome, click More Tools | Developer Tools from the menu or press Ctrl + Shift + I and switch to Network tab.
  • Click print, and you should see requests going out to the print service in the Network tab. One of them will make the request to a url that ends with /execute, you can find webmap_as_json in there

Q:

1. what kind of security you?

2. was it working before you upgrade to 10.8?

0 Kudos
AndrewThompsonTRC
New Contributor II

It doesn’t appear that the Web_Map_as_JSON request contains tokens.

 

Security is SAML through the Portal.  I “think” this was working before the upgrade to 10.8 but honestly hadn’t looked in awhile.

0 Kudos
TanuHoque
Esri Regular Contributor

I'm not at all familiar with SAML. Let me check to find more information on that.

In the meantime, please read the following help topic and see whether it helps you anyway in your situation.

Print maps that contain secured services—Documentation (10.7) | Documentation for ArcGIS Enterprise 

0 Kudos
AndrewThompsonTRC
New Contributor II

The security on the GIS server is managed by Portal and the Portal security is Enterprise Login via SAML using an identity provider.  The GIS server is federated with the Portal and hosts the map services and the custom print service.  The Authentication Tier for the Server is the ARCGIS_PORTAL not through the web adapter on the server.  From what I can tell everything is configured as described in the link above.

0 Kudos
TanuHoque
Esri Regular Contributor

Thanks Nate for the details.

It looks like we need to look at this from JS API side to begin with. And I'm looping in Noah Sager‌ to help us out.

Thanks Noah.

Noah-Sager
Esri Regular Contributor

Nate Sylvester‌ - One issue that trips people up with SAML is if they sign into the Server’s services directly (via the REST directory or Server Manager), then a cookie is created that gives them access to the server. When you then load an app it doesn’t know about this cookie and the service appears to be public, so it doesn’t generate a token for it. So one way to check for this is to see if the requests to the service in the app include token parameters or not. Another way to check is to clear the browser cache and then try to print in the app, or I suppose you could try in Incognito Mode if available.

0 Kudos
AndrewThompsonTRC
New Contributor II

I checked this before and there were no token parameters included in the service URL in the request from the print service.

0 Kudos
Noah-Sager
Esri Regular Contributor

And if you clear the browser cache? Try in incognito mode? 

0 Kudos