Select to view content in your preferred language

ArcGIS Print Service Failing

271
10
04-17-2025 08:47 AM
MT_JenAmes
Frequent Contributor

I have an EB application with a print map tool in it that has been failing regularly lately. There's a lot of weird conditions going on here so I'm going to bullet point all the scenarios:

  • One computer we tested on had no issues printing
  • One computer we tested on had issues where it wouldn't print, we'd try again, and it would print. Then trying a new map, it would print immediately. Then trying another new map, it'd take 2 or 3 tries before it prints.
  • Two computers are failing almost every time. We found that sometimes it would help to try to print a map with zero layers visible, but that was a temporary fix.

For reference, we use the standard ArcGIS print service, and all the data in the map we're trying to print is either from our own ArcGIS Online hosted feature services, or a different organization's (our county government) server hosted parcel layer.

0 Kudos
10 Replies
DavidPike
MVP Notable Contributor

I'd check the developer toolbar (f12) and check for errors/info in the tabs.  It seems likely it's issues accessing certain layers with different user permissions.

0 Kudos
MT_JenAmes
Frequent Contributor

I'll check the developer toolbar, but they were able to use the print map function for over a year with no issue before this started happening. None of the permissions have changed. And in the situations described above, the 2nd and 3rd bullet point describes different users with the same permissions.

0 Kudos
TimWestern
MVP

I have seen some strange behavior from the print services. in Exb recently too.

Sometimes it requires creating a 'custom' print service when using a custom layout.

If it's failing from different computers I'd be curious if the routing in the network is the same for them when calling the service, or if something in between is blocking them also.  when checking the Dev Tools via F12 look for any failing Network requests also.

0 Kudos
MT_JenAmes
Frequent Contributor

@TimWestern @DavidPike I finally got the opportunity to look at the computers that were having the issue,. I tested on my own (ArcGIS admin credential) login and on the login credentials of the end users who initially brought this problem to my attention. The map failed to print, and this is the error message I received in the console:

MT_JenAmes_0-1747850363281.png

I then proceeded to check on my new laptop, which has never tried to use the print function in ExB, as I've only had this laptop a week, and I received this error on my laptop too.
Edit: I also tested on my desktop, and received the same error, which is new, because I used to not have any problems with the print function on my desktop.

Any advice here? Thanks

0 Kudos
TimWestern
MVP

Yeah this is the ArcGIS Online CORS Error I've seen before.

Basically its blocking one system (whatever the base url for the experience is from fetching the sharing item there with the token.  (I was thinking an item_id should be in the query)
When you setup your experience builder for this did you create an application, setup a client ID
Like in this screen shot?

TimWestern_0-1747853508342.png






If so did you click manage, and ensure the host URL under application is correcft and that you have redirect URLs setup (It may look like this:

TimWestern_1-1747853563341.png

 

If you have, then the only other thought I have is that your Administrator may need to do something to enable CORS for your domain where the experience is hosted.

The reason that message occurs is because the layer is loading data from ArcGIS Online in the experience, but since it doesn't recognize the experience request URL hostname or path its blocking it at the AGOL side.

That's what I believe may be going on.

now I saw an example of some extension (may or may not still work in Chrome) over here by @RachelGomez 
https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cors-error/td-p/1081694

But this is likely only a temporary fix for testing, the server needs something, or the experience side needs something to be submitted when it makes that call to know it should be 'treated' as a same-origin.  (I believe its somewhere in Administration for the server, but I don't have access on our systems to make those kinds of changes to show you an example.)


This article on the ArcGIS Server information might give some clues:

https://enterprise.arcgis.com/en/server/latest/administer/linux/restricting-cross-domain-requests-to... 



0 Kudos
MT_JenAmes
Frequent Contributor

I don't have an option for a credentials section. I am the org's administrator though, so I can look into the settings and see if there's somewhere where I can enable CORS. 

MT_JenAmes_0-1747920145180.png

I did look over that other Community post you shared though. Are you suggesting I look into a CORS unblocking extension? Or more along the lines of the marked solution where they have too many features on a layer that has limited features allowed?

0 Kudos
TimWestern
MVP

The extension would only help for local development I think, if the service/application is needed by multiple people, people outside your network, it's not a great idea to expect everyone to have and know how to configure an extension.


How did you create the experience? Did you go to New App > Create Experience? (this creates it inside of your instance, and is not like a local dev or hosted experience IIRC)

The other is to go to new item 

TimWestern_0-1747934231046.png



You can create an application there, and you can also setup API Key and OAuth 2.0 Credentials for custom applications.

I'm not sure which you may need most.





0 Kudos
MT_JenAmes
Frequent Contributor

I made it over 2 years ago so I'm not positive the method, but I think I created it directly as a new item from the ExB site.

MT_JenAmes_0-1747935087657.png

The app is really only used by 2 people, both within my network, so a browser extension would be an easy deploy, assuming our IT team okays that installation.

 

0 Kudos
TimWestern
MVP

Let us know if that works in your context.  I had never seen this extension before, so don't have  an example to test it against.

0 Kudos