Troubleshooting Guide: Sitecore XM Cloud Local Setup and JSS Errors

Table of Contents

  1. Error 1: Access Issue for Files Under the Project Folder
  2. Error 2: Network Not Found
  3. Error 3: Could Not Resolve Host
  4. Error 4: Port 8984 Already in Use
  5. Error 5: Traefik Port Conflict
  6. Error 6: hcsshim::ExpandScratchSize
  7. Error 7 & 8: Unhealthy Containers
  8. Error 9: Invalid Rewrites Found
  9. Error 10: Files are Blocked
  10. Error 11: CM Session Timeout
  11. Error 12: Container Compatibility
  12. Error 13: Errors During Initial Setup
  13. Error 14: Outdated JSS Dev Tools
  14. Error: Virtualization Not Enabled in BIOS
  15. Error: Container Mode Conflict (Linux vs Windows)
  16. Error: Outdated Sitecore JSS Dev Tools in package.json
  17. Docker Startup Issues

=====Errors and steps to resolve=========

Error 1: Access issue for the files under the project folder

Article content

Solution:

dir -Path . -Recurse | Unblock-File

Then run the up.ps1 script again to proceed with the setup.


Error 2: Error Response from daemon: network xxxxxx not found

Article content

Solution:

cd "C:\Program Files\Docker\Docker"
.\DockerCli.exe -SwitchDaemon
.\DockerCli.exe -SwitchDaemon

Then run the up.ps1 script again.


Error 3: Curl: (6) Could not resolve host: nodejs.org

Article content

Cause: DNS resolution issue inside Docker.

Solution: Add the following to Docker Daemon configuration:

"dns": ["8.8.8.8"]

Then restart Docker and run the up.ps1 script again.


Error 4: Error response from daemon: failed to create endpoint xxxxx-solr-1 on network xxxxxx_default: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20)

Article content

Cause: SOLR service conflict.

Solution: Stop the SOLR services using port 8984 and run the up.ps1 script again.


Error 5: Error response from daemon: failed to create endpoint xxxxx—traefil-1 on network xxxxxx_default: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20)


Article content

Solution:

  1. Stop IIS, , it might be due the port usage and Run the up script again.
  2. If the issue persists, Run the following commands:

Stop-Service docker
Stop-service hns
Start-service hns
Start-Service docker

Then rerun the up.ps1 script.


Error 6: hcsshim::ExpandScratchSize issue

Solution:

  1. Delete all containers, images, and networks in Docker.
  2. Uninstall Docker Desktop.
  3. Delete all files from:
  4. Reinstall Docker Desktop.
  5. Follow the Sitecore setup guide again.
  6. Run the up.ps1 script.


Error 7: Dependency failed to start: Containers "xxx-cm-1" is unhealthy

Article content

Error 8: Error: for traefik Containers "xxxxxx" is unhealthy

Article content

Solution: for error 7 & 8

docker-compose stop
docker-compose down
iisreset /stop
docker-compose up -d

Then rerun the up.ps1 script.


Error 9: Invalid Rewrites Found

Solution: Create a deploy folder inside the Docker directory:

C:\projects\xxyx\code\docker\deploy\platform

Error 10: Files are Blocked


Article content

Solution: Right-click the file, select "Properties", and check the "Unblock" checkbox at the bottom.


Article content

Error 11: CM Session Timeout / Not Loading


Article content

Solution:

  1. Try opening CM in Incognito mode:

https://xxyx.xmcloudcm.localhost/sitecore/shell/sitecore/client/Applications/Launchpad

  1. If that fails, try:

.\down.ps1
docker network prune
.\up.ps1

Or:

docker-compose stop
docker-compose down
docker-compose up -d

Error 12: Container Compatibility


Article content

Solution: Switch the Docker container from Linux to Windows mode.


Error 13: Errors During Initial Setup


Article content

Solution:

  1. Restart your system.
  2. Run the following and delete all contents:

%temp%
temp

Error14: Virtualization Not Enabled in BIOS


Article content

Solution:

  • Access your system BIOS settings and enable the virtualization feature.


Error15: Container Mode Conflict (Linux vs Windows)



Article content

Solution:

  • Ensure Docker is set to Windows containers, not Linux.

Article content

Error 16: Outdated Sitecore JSS Dev Tools in package.json


Article content

Solution: Ensure package.json is not modified before running npm commands. Update to the correct versions as per Sitecore’s recommendations.


Error 17: Docker Startup Issues After Reboot

Solution:

  • Remove the two Docker-related files causing conflict (paths not specified).

Article content

  • Clear all related background tasks via Task Manager (Run as Admin).

Article content

  • Restart your system and check Docker again.


Note: Some importable command that need to be helpful:

.\down.ps1 
 docker compose stop
 cd docker 
 ./clean.ps1 
 cd..
 Stop-Service docker 
 Stop-service hns 
 Start-service hns 
 Start-Service docker 
 docker network prune
.\init.ps1 -InitEnv -LicenseXmlPath C:\Project\xxx\\license.xml -AdminPassword b
.\up.ps1 
-------------
 npm run build
 dotnet sitecore cloud login
 dotnet sitecore ser push x
---------------
 dotnet sitecore itemres cleanup -n "environment" --path "/sitecore/content/xxx" --force --what-if

Comments

Popular posts from this blog

Content Hub Integration with XM Cloud from Sitecore DAM directly from Sitecore DAM

Mastering Sitecore Search API Crawlers: A Comprehensive Series (Part 1-3)

Removing Edge Content and Purging Edge Cache with Sitecore XM Cloud Admin API