All Articles

SXA CLI - Error 403.0 when deploying themes

Error Description

I tried to deploy a theme to my Sitecore Dev environment using the SXA CLI. As it was an initial deployment, I changed the root to the theme folder on Powershell and ran the below command:

sxa rebuild All -d

The error I got was as shown below:

Error 403 on SXA CLI

The error was actually a webpage but on the Powershell console or a Command Prompt, it was not helpful to understand.

I found the URL on the error message somehow and opened the same in the browser.

https://<sitecore-dev-instance>/sitecore%20modules/PowerShell/Services/RemoteScriptCall.ashx?user=sitecore%5Cusername&amp;password=pAssword&amp;script=%5CThemes%5CRoot%5CIMy%20Theme/scripts&amp;sc_database=master&amp;apiVersion=media&amp;scriptDb=master

I got an error page on the browser which looked as below:

Error 403 - SXA Remote Call Browser

After this, I checked my log files and yet found nothing about this error.

As the URL was to the Powershell service, I checked the SPE logs and found the below error logged many times.

23796 14:32:51 ERROR Attempt to call the media service failed as it is not enabled.

I checked the various config files in the Spe folders under Appconfig in my webroot and found out a config file named z.SPE.Sync.Enabler.Gulp.config.disabled under the path \AppConfig\Include\z.Feature.Overrides.

After I enabled this file, (by renaming the file and remove the ‘.disabled’) the error was resolved.

Error Solution

  1. Open your webroot and go the folder \App_Config\Include\z.Feature.Overrides.
  2. Rename the file z.SPE.Sync.Enabler.Gulp.config.disabled to z.SPE.Sync.Enabler.Gulp.config.

Please drop a comment below if you have any queries.

Happy Sitecoring!