Select to view content in your preferred language

Failed to load images or geojson as blob in ExB widget for Enterprise

251
2
02-23-2025 05:30 PM
Labels (1)
GuthierryAlmeida
Emerging Contributor

I have a widget published to be used in ArcGIS Enterprise. When plotting a PNG image as a MediaLayer I receive the error that the blob: is not allowed in the Content Security Policy (CSP). The same error occurs with a GeoJSON layer (pointing to an "in-memory" GeoJSON). The native "Add data" widget also fails when adding a local .geojson file - the layer doesn't load. I tested it on Chrome and Safari with the same failure.

Is there an alternative to use them?

Chrome error:

Refused to load the image 'blob:<URL>' because it violates the following Content Security Policy directive: "img-src * data:". Note that '*' matches only URLs with network schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme matches `self`'s scheme. The scheme 'blob:' must be added explicitly.

 

PS: the fail doesn't happen when the same widget is used inside an application from the ExB developer. It happens only when using it on ArcGIS Enterprise ExB.

0 Kudos
2 Replies
TianWen
Esri Contributor

Thanks for the post! Could you also provide any additional information, such as sample data, screenshots, or recordings? Thanks!

0 Kudos
GuthierryAlmeida
Emerging Contributor

Hi @TianWen, the error happens with my custom widget but the easiest way to check the error is by using the native "Add data" widget as shown below:

1 - In ArcGIS Enterprise, create a new ExB application, and add the "Add data" widget:

GuthierryAlmeida_2-1741870270491.png

 

2 - Using the widget in the preview:

GuthierryAlmeida_0-1741870148234.png

3 - Add a GeoJSON layer (it happens for PNG URL images as well):

GuthierryAlmeida_1-1741870182403.png

4 - The layer is added but no data is displayed. See the error in the console:

GuthierryAlmeida_3-1741870430650.png

Note: Enterprise 11.3.

 

0 Kudos