Issue with autoAddToSite Not Always Adding Widget Automatically

Question:
Why does autoAddToSite not always add my site widget automatically after installation?

Product:
Wix CLI (Custom Elements)

What are you trying to achieve:
I’ve developed a Wix CLI site widget, and I want it to be automatically added to a user’s site upon installation. My element.json configuration includes "autoAddToSite": true, but in some cases, the widget is not added automatically.

What have you already tried:

  • Verified that autoAddToSite is set to true.
  • Tested on multiple sites; sometimes it works, sometimes it doesn’t.
  • Checked console logs—no errors related to installation.
  • Considered setting "essential": true, but I’m unsure if that would make a difference.

Additional information:
Here’s my element.json configuration:

json

CopyEdit

{
  "$schema": "https://dev.wix.com/wix-cli/schemas/custom-element.json",
  "id": "f63b4b72-b597-40dc-afed-c637a0bad236",
  "name": "my widget",
  "width": {
    "defaultWidth": 90,
    "allowStretch": true
  },
  "height": {
    "defaultHeight": 90
  },
  "installation": {
    "autoAddToSite": true,
    "essential": false
  },
  "behaviors": {
    "dashboard": {
      "dashboardPageComponentId": "f1de2626-4462-49b5-80ea-a4bd3db2f0c9"
    }
  },
  "presets": [
    {
      "id": "9d61e36e-6ece-40e2-aaf6-8f951a8b5640",
      "thumbnailUrl": "./../../../../assets/my-widget/thumbnail.png"
    }
  ]
}

Are there any known limitations with autoAddToSite, or is there a better way to ensure the widget is always added automatically? Any insights would be appreciated! :rocket:

Hello! The best way to get more help with app dev on the CLI would be to open a ticket via this link Contact Wix