Select to view content in your preferred language

Deploying experience builder custom widget to Arcgis Enterprise

2654
8
02-10-2024 11:49 AM
Labels (1)
salmaashraf
New Contributor

Hi,

I have create an application in the portal and used the "App id " and the portal URL to sign in using the https://localhost:3001/.  

I want to deploy the custom widget i have made on the Arcgis Enterprise and i am following this Url http://enterprise.arcgis.com/en/portal/latest/use/add-custom-widgets.htm  

and i am stuck at getting a full URL path for my widget, here is what the URL should look like <server.domain.com>/<my widget>/manifest.json.

How do I deploy to the Webserver and get this URL .

Thank you.

0 Kudos
8 Replies
FredericPoliart_EsriAU
Frequent Contributor

Try copying your whole widget folder from C:\ArcGISExperienceBuilder\client\your-extensions\widgets into (say) c:\inetpub\wwwrooot\mywidget   or any other computer running IIS 

Then go to your ArcGIS Enterprise Portal (must be 11.x) and click Contents : add item.
in the list, you should have "add an Experience Builder Widget URL" ,
specify the URL to your manifest.json   (ex : https://localhost/mywidget/simple/manifest.json )

now Click on the 9-dot button in Portal Home and create a new ExB project : your widget will be included in the [+] list (scroll down).

0 Kudos
BAdejumo
Emerging Contributor

I have tried this and still getting same error (below image), any clues/hints?

BAdejumo_0-1737574654498.png

 

0 Kudos
TimWestern
MVP

Perhaps we should start with some simple questions.



  • Where are you hosting the widget?
    • It's my understanding that the widget itself does not go on the portal, instead you setup a lightweight webserver somewhere, create a widgets folder (like under IIS inetpub/wwwroot/widgets/mywidgetname

    • The IIS server has to be running, and also, it needs to be routable within your available network. (you can't just expect it to be necessarily the exact same path as your enterprise, I mean its possible your install might set up that way, but its not always going to be the case)
    • If you don't have the domain name part of the url correct, it won't find the widget folder, even if you create the reference in portal by the steps outlined below by @RejeanLabbe 

  • Did you build the widget before deploying it?
    • To build it you have to go in via a command line to the client folder and do something like:
    • npm run build:prod
    • This will build every WIDGET in your client though so be alert to that.
    • Once built it should be under client/dist-prod
    • you then need to find the folder for the specific widget you want to use
    • I create a folder on c drive called c:/temp/projectName/prodbuilds
    • I will then create a folder with a timestamp on it in the form of YYYYMMDD.hhmm.x
      • Where
        • YYYY is 4 digit year
        • MM is 2 digit month
        • DD is 2 digit day
        • hh is 2 digit hour (24 hour)
        • mm is 2 digit minute
        • x is the number of what was published that day (you could also use a version number of the widget)
    • I then copy the dist/prod folder that the widget sits in (the folder name and all under it to the above created folder that is timestamped

    • You can then zip up this folder and move it to the server, extract it and then put the folder named for the widget (not the time stamped one) to the inetpub/wwwroot/widgets folder
      • Note that sometimes the server won't update cache correctly with an existing folder there
      • I rename the folder by adding the date it had as modified last (deployment date)
      • remove any remnants of the widget that were used in an experience
      • save the experience, reload the preview/publish to verify its gone
      • Then copy the mywidgetname folder in there
    • If you have not already setup a reference to the widget with the Add Experience Builder Widget URL button, you will need to do this (and if you don't see it under add in the portal, you'll need an admin to give you access)
  • Note you should check the domain the widget is on by doing a ping domainname.com where domainname.com is the domain, ipaddress, or base reference url for your widgets site under IIS or webserver
  • If you can't ping it from the server where enterprise is located, enterprise will be unable to load it
    • If this is the case you may need to talk with the people who manage your network to find the correct reference URL to use.


      I hope that helps
0 Kudos
milesleeaus
Occasional Contributor

Hi,

Our ArcGIS Portal is 11.1, but there is no "add an Experience Builder Widget URL" button. 

 

0 Kudos
TimWestern
MVP

I know you posted this back in April, but are you sure you have all the correct permissions in your portal?  I seem to recall if you don't have a certain level of permissions that this option may not appear, but I'm not familiar with the differences between 11.1 and 11.2 to know if it could be a version difference though.

0 Kudos
RejeanLabbe
Regular Contributor

Just to add a little precision to @FredericPoliart_EsriAU answer, with ArcGIS Enterprise 11.1 :

  • Click on Contents
  • Click on Add Item
  • Click on Application
  • Choose Experience Builder Widget
  • Enter your manifest URL
0 Kudos
milesleeaus
Occasional Contributor
That's correct.
0 Kudos
TimWestern
MVP

THis is where it would be, but if your account on the portal does not have sufficient user account level or permissions you may not find it. That's been my experience.

0 Kudos