Select to view content in your preferred language

Upload Web Experience from ExB Dev to ExB AGOL with a Custom Widget (folderUrl not found)

60
1
6 hours ago
DirkAtWSP
New Contributor

I have a Web Experience  in ExB DevEd that includes a custom widget (Simple sample). I want to push that Experience  to ExB AGOL and for it to include the custom widget. According to the Python API documentation (https://developers.arcgis.com/python/latest/api-reference/arcgis.apps.expbuilder.html#webexperience) this is possible (and supported!) with the upload() method on the WebExperience class.

DirkAtWSP_0-1786469308826.png

 

The code to do this:

from arcgis.apps.expbuilder import WebExperience 
from arcgis.gis import GIS

print("STARTING")
gis = GIS("", "", "")
# Point to the config.json from your Dev Edition download folder
# (or, in API v2.4.0+, the path to the project folder itself)
local_exp = WebExperience(gis=gis, path=r"C:\Path\to\server\public\apps\0") #\config.json#")

new_item = local_exp.upload(
    gis=gis,
    publish=True,
    title="My Uploaded Experience",
    # widget_mapping={"my-widget":"my-widget"},
    auto_remap=True        # auto-matches datasources by name/type in target org
)
print("ALL DONE. BOOM!")

With the Experience uploaded to the AGOL portal (script executes successful), when I try to view the experience I get a blank screen. Looking at the developer tools I find the issue:

Load app config error. TypeError: Cannot read properties of undefined (reading 'folderUrl'): This is specific to the custom widget (simple)

DirkAtWSP_1-1786469378536.png

 

A thorough inventory of the Experience application content and artifacts does not reveal  'folderUrl' in any of the source items.

If you know the how and why of ‘folderUrl’ and how I can control it, please post here. TIA

 

0 Kudos
1 Reply
LReis
by
Occasional Contributor

I suspect what you are trying to do is not possible based on the following thread, which notes that:

"There is no way to use Custom Widgets in ArcGIS Online. You may use Custom Widgets on a separate site built in Developer Edition that connects to your ArcGIS Online Portal. Custom Widgets may also be used in Enterprise Edition 11 or higher."

The portal references in the documentation that you noted are probably referring to Enterprise portals, not AGOL.

https://community.esri.com/t5/arcgis-experience-builder-questions/registering-custom-widgets-in-arcg...