1

I am getting this error when I am trying to create a new theme using SXA CLI.

? Enter your login sitecore\admin
? Enter your password [hidden]
? Specify theme path. Root is Themes folder(format <RootFolderName/ChildFolderName>) Test Tenant\SiteTest
? Do you want to set up theme config file? yes
C:\Users\samed\AppData\Roaming\npm\node_modules\@sxa\CLI\util\serverRequests.js:25
                    _c8a‍.g.console.log(chalk.bold.red(body.match(/<li>([\d\w\s\.]*)<\/li>/)[1]))

TypeError: Cannot read properties of null (reading '1')

I was searching on the Google, and there is some post about adding the user role to the sitecore\admin, and the name of the role is sitecore\PowerShell Extensions Remoting

Is that a fix, or there is something else that can be done

1
  • Edit your question and paste error in a text snippet instead of screenshot
    – Marek Musielak
    Jan 4, 2022 at 12:56

1 Answer 1

0

There are at least two potential causes for this error:

  1. The situation you described - the user you are logging in with must have thesitecore\PowerShell Extensions Remoting role, not just the Administrator checkbox. Reference: https://sitecorevn.blogspot.com/2021/03/sitecore-sxa-cli-theme-setup-error.html?m=1

  2. The user must also have a simple (assume alphanumeric only) password. A password containing # did not get encoded correctly, causing the login attempt to fail.

Note that the main Sitecore log file will likely contain additional information about this error. e.g.

8548 22:48:35 WARN  Request is redirected to document not found page. Requested url: /login.aspx?ReturnUrl=%2Fsitecore%2520modules%2FPowerShell%2FServices%2FRemoteScriptCall.ashx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.