Tuesday, June 29, 2021

Sitecore 10 - Quick fix - Detected that item /Content - in the destination should be moved to XX but /XX was not a path included in any serialized subtree being synced.

While working on Sitecore 10 - You will see this error, it's common because if someone will change the location of the template or content still you may have that serialization file on your local.



the quick fix is the cleanup of your working branch and that will remove all untracked files or changes and do the ser push.


Monday, June 28, 2021

Sitecore 10 -docker: Error response from daemon: failed to create endpoint serene_perlman on network nat: failed during hnsCallRawResponse:

 Recently, I found this issue.  


The error is simply that the process is in use, I checked a few links and found this could be related to Linux and so but the actual issue is this particular port is in use.


I have simply updated the port for the verification and it worked fine for me.

Sitecore 10 -x509: certificate signed by unknown authority

 Recently, I got this issue while doing a new installation with Docker.


Fix - The docker container was running under the Linux, After changing the container to Window this issue got fix.

Friday, June 25, 2021

Sitecore 10 - Error response from daemon: Unrecognised volume spec: file '\\.\pipe\docker_engine'

Recently, I was trying to set up a new test environment, I downloaded the package from the Sitecore Site, I did the init and while doing the docker-compose up -d, I got this error 

Error - Error response from daemon: Unrecognised volume spec: file '\\.\pipe\docker_engine' cannot be mapped. Only directories can be mapped on this platform


Starting searching for the solution - the first one was to remove the back slash

https://github.com/nicholasdille/docker/issues/1


didn't help me, below is the exact location where I can see it's complaining.


I found this is a common issue because one person has recently posted on stackoverflow-

https://stackoverflow.com/questions/68010612/error-response-from-daemon-unrecognised-volume-spec-file-pipe-docker-engi



Now, It's getting very interesting for me :) 

I removed all containers and tried to set up a new lighthouse repository and found new issues

services.smtp.scale must be a integer


I think I have noticed that I have the latest version of PowerShell on my machine, I have uninstalled and restarted it, but after the restart, init and compose-up, I got a new error, interesting day today!!



Now, I made one change here 


I think must be an issue with the Docker, or PowerShell etc, I checked the docker and tried to run one sample application (Not the Sitecore one).

docker run -d -p 80:80 docker/getting-started


Error Details - 

PS C:\WINDOWS\system32> docker run -d -p 80:80 docker/getting-started

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested

38f2bb488cc23aa18b3aa3d4ec5fa865a2fd3e1dac19945304e15fcf07fe765b

docker: Error response from daemon: failed to create endpoint unruffled_goodall on network nat: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).

I have changed the container to Linux and not got below warning

Digest: sha256:10555bb0c50e13fc4dd965ddb5f00e948ffa53c13ff15dcdc85b7ab65e1f240b

Status: Downloaded newer image for docker/getting-started:latest

a1d910768708a5221a179f05fdabf163b5625efe3ec9e59fd8e803ff1162bcb6

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

 

I removed everything inside the docker using the below command

docker system prune

Ran the sample application and ran it successfully, I ran the Sitecore but it didn't work because of the Linux container 

no matching manifest for linux/amd64 in the manifest list entries

(Which is a common understanding because they have mentioned in the document that the container should be a window one)

Another issue -
time="2021-06-25T10:52:44+10:00" level=warning msg="network demo: network.external.name is deprecated in favor of network.name"

Found that external.name is deprecated but it's in use in the lighthouse demo here -



Reference URL: 

  1. https://docs.docker.com/compose/compose-file/compose-file-v2/
  2. https://github.com/docker/docker.github.io/issues/6453

 Uninstalled and installed Docker - and tried to run the sample application, Got below error 

docker: no matching manifest for windows/amd64 10.0.19042 in the manifest list entries.See 'docker run --help'.



The above issue got resolve when I updated the experimental mode =true, Now got one more issue


PS C:\Projects\Demo> docker run -d -p 80:80 docker/getting-started
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (windows/amd64) and no specific platform was requested
0df026cfa1bf9150741def5a9dbb252911bb7d4a68424db0574a49f543fd9156
docker: Error response from daemon: failed to create endpoint distracted_banach on network nat: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).





I did a complete new machine setup, and followed the steps mentioned in the installation document, downloaded the package from here - https://github.com/Sitecore/docker-examples
Ran the ini and docker-compose up command, got below error now


PS C:\sitecore\docker-examples\getting-started> docker-compose up -d

Pulling mssql (scr.sitecore.com/sxp/sitecore-xp0-mssql:10.1.0-ltsc2019)...

ERROR: Get https://scr.sitecore.com/v2/: x509: certificate signed by unknown authority

PS C:\sitecore\docker-examples\getting-started>

Continusly getting the below error already turned off the firewall

x509: certificate signed by unknown authority

Continusly getting the below error already turned off the firewall.

Got the answere here - https://sitecore.namics.com/failed-to-pull-sitecore-image-on-aks/

normally means that your Docker is running in Linux container mode

Now, I got one more error 

ERROR: failed to register layer: rename C:\ProgramData\Docker\image\windowsfilter\layerdb\tmp\write-set-043761389 C:\ProgramData\Docker\image\windowsfilter\layerdb\sha256\a7ba3db29ebb3a32e6a9c912d6ab5941bd981a0c39a420e6786c70a66babb80b: Access is denied.

PS C:\sitecore\getting-started> I provided all access and removed the read only access, but still it didn't work. Finally found that could be related to Antivirous.

https://stackoverflow.com/questions/41104410/pull-image-with-docker-on-windows-10-failed-to-register-layer-denied-acce



Removing the complete antivisous just to make sure if that's the reason.



Removing the antiviroush has resolved my issue.



I can see an image file here -C:\ProgramData\Docker\image\windowsfilter\layerdb\sha256


Saturday, June 19, 2021

Sitecore 10 - manifests/latest: unauthorized: incorrect username or password

 While doing a new setup with Docker, I recently got below error -

manifests/latest: unauthorized: incorrect username or password

Fix -  As the error says clearly that it's related to the authorization, I opend the window docker and logged into with my docker id and that got resolve my issue.


Monday, June 14, 2021

Sitecore 10 - SCS - Input string was not in a correct format - Serialization.ps1

Recently, I got the below error while doing the serpush, I got the latest from the master and trying to update my local setup.


 [master] Applying changes...

[master] [Batch 1] [[U] /sitecore/content/XXXXX/XXXX/Dev (An error occurred when executing task 'SerPush'.

Error: One or more errors occurred.

        Program 'dotnet.exe' failed to run: Input string was not in a correct format.At D:\Dev\XXXX\CakeFiles\Serialization.ps1:63 char:5

+     dotnet sitecore ser push

+     ~~~~~~~~~~~~~~~~~~~~~~~~.

Investigation- I ran the servalfix and got the successful message after that I again ran the serpush command got the same error :( 


I was using the cake project and now run the below command directly through the PowerShell (Admin mode)

dotnet sitecore ser push

and got the below message

[master] [Batch 1] [[U] /sitecore/content/XXX/XXX/Dev ({152E5954-E420-4509-A31B-F7BB19DE055D})] UpdateFieldItemCommand Field  (ID: {165ED632-7C9E-4555-A39D-8F76A6FA04FD}) received a set value command, but its value was already equal to the value to set. This indicates sending extraneous commands.

[master] [Batch 1] [[U] /sitecore/content/XXX/XXX/Dev ({152E5954-E420-4509-A31B-F7BB19DE055D})] UpdateFieldItemCommand Field  (ID: {1D4E9AC1-8BF9-4292-9BCF-3AB8DC677924}) received a set value command, but its value was already equal to the value to set. This indicates sending extraneous commands.

Solution -  I have to remove the content manually and re-run the ser push command that resolved the issue for me.



Tuesday, June 1, 2021

Sitecore 10 - Setup auto suggestion (Predication) with Solr Cloud using Docker

 Today, I got a requirement to set up the auto-suggestion (Predication) for the SXA search, here are the steps to configure.


There are three options available but we wanted to configure the predications one

By default the search box will give you 404 when we do the query.

As per the Sitecore Documents, We need to configure the Suggester component and handler

https://doc.sitecore.com/users/sxa/18/sitecore-experience-accelerator/en/walkthrough--adding-search-functionality-to-your-page.html


and the name should be sxaSuggester, Although we can define and override on our own in this example we are going with the OOTB.

 Sitecore has also provided an example here https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/using-solr-auto-suggest.html with the sample configuration but the catch is in the sample configuration the name of the suggested is mySuggester so we need to make sure to update the correct name otherwise the search API will give you 404.

Steps to update - Go to your Docker build folder Example path docker\build\solr\Sitecore.zip - Unzip the file and update the 



To reflect the changes make sure to rebuild the image using docker-compose build solr (name of your solr image)

do the initialization and up again, you can verify your changes in the Solr through the admin panel. browser the file.

Make sure to refresh the collection and you would see the result in the search text box, I have used the field sxacontent_txn so there are a few unwanted fields and you can mention those field in the protected word to exclude from the search (I'm exploring more option to have a more purified suggestion and will update soon).

Let me know if you are implementing the prediction and found any issue, Happy to discuss and help.

Here is my SXA search in-depth review video that I presented in one of the Sitecore User Group -