I am trying to get started using Sitecore CLI on my Sitecore 10.1 project. I am using Sitecore CLI v5.2.113
. When I try to run an info command, I get success so I am thinking my setup is okay.
However, I am not able to pull. I get an error from the GraphQL API. I have tried suggestions from the few articles I found online, such as deleting my user.json and login to recreate it, and confirmed that identity and cM URLs are both https. Hopefully, someone can guide me? Thanks in advance.
PS A:\Code\sitecore-paas> dotnet sitecore --version
5.2.113+530fb34dbe030bda1abdb1f9db9cabc774e65ca5
PS A:\Code\sitecore-paas> dotnet sitecore plugin list
List of plugins:
[Installed] Sitecore.DevEx.Extensibility.Serialization v.5.2.113
[Installed] Sitecore.DevEx.Extensibility.Publishing v.5.2.113
[Installed] Sitecore.DevEx.Extensibility.Indexing v.5.2.113
[Installed] Sitecore.DevEx.Extensibility.ResourcePackage v.5.2.113
[Installed] Sitecore.DevEx.Extensibility.Database v.5.2.113
PS A:\Code\sitecore-paas>
PS A:\Code\sitecore-paas> dotnet sitecore ser info
Maximum subtree-relative item path allowed: 100
content
Subtrees:
content: /sitecore/content/path/to/user/Login
FieldsFilter Excludes: 0
Roles: 0
Users: 0
PS A:\Code\sitecore-paas> dotnet sitecore ser pull -t -v --what-if
Looking for package [email protected]
Looking for package [email protected]
Looking for package [email protected]
Looking for package [email protected]
Looking for package [email protected]
Finished resolving plugins. Total elapsed resolution time: 968ms
What if mode is active. No changes will be made.
> Resolving modules from expressions:
* ./folder/serialization/content/content.json
>> Resolved 1 local module(s) using glob(s)
* ./folder/serialization/content/content.json
[master] Source: Sitecore endpoint default (Host: https://<CM hostname>/, DB: master)
[master] Destination: serialized items (1 subtrees)
[master] Loading data...
[master] FSIndex: Loaded filesystem indices in 16ms (0 metadatas)
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] Sending GraphQL request 1
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] [Version comparison] versionComparisonEnabled: True
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] [Version comparison] Added sitecore-graphql-version-comparing-enabled: True
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] [Version comparison] Added sitecore-graphql-cli-version: 5.2.113
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] HTTP Error invoking GraphQL endpoint https://CM.hostname//sitecore/api/management
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] Query 1:
query($aP: String! $aD: String! $aE: [String] $aS: TreeScope!) {
a:
serialize(path: $aP, database: $aD, scope: $aS , excludedFieldIds : $aE) {
id
parentId
templateId
path
hasChildren
dataSignature
}
}
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] Query 1 variables: {
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] "aP": "/sitecore/content/path/to/user/Login",
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] "aD": "master",
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] "aE": [],
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] "aS": "ITEM_AND_DESCENDANTS"
[master] [GraphQL> Get metadata (master; 1 specs, ItemAndDescendants)] }
[GraphQLHttpException] Unexpected HttpResponseMessage with code: InternalServerError
at GraphQL.Client.Http.Internal.GraphQLHttpHandler.ReadHttpResponseMessageAsync(HttpResponseMessage httpResponseMessage)
at GraphQL.Client.Http.Internal.GraphQLHttpHandler.PostAsync(GraphQLRequest request, CancellationToken cancellationToken)
at Sitecore.DevEx.Core.Client.GraphQl.SitecoreApiClient.<>c__DisplayClass11_0.<<RunQuery>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Sitecore.DevEx.Configuration.Authentication.OidcAuthenticationProvider.MakeAuthenticatedRequestInternal(HttpClient client, Func`2 requestAction) in C:\BA\ca7111d945a16af4\src\Sitecore.DevEx.Configuration\Authentication\OidcAuthenticationProvider.cs:line 86
at Sitecore.DevEx.Configuration.Authentication.OidcAuthenticationProvider.MakeAuthenticatedRequest(HttpClient client, Func`2 requestAction) in C:\BA\ca7111d945a16af4\src\Sitecore.DevEx.Configuration\Authentication\OidcAuthenticationProvider.cs:line 30
at Sitecore.DevEx.Configuration.Models.EnvironmentConfiguration.MakeAuthenticatedRequest(HttpClient client, Func`2 requestAction) in C:\BA\ca7111d945a16af4\src\Sitecore.DevEx.Configuration\Models\EnvironmentConfiguration.cs:line 313
at Sitecore.DevEx.Core.Client.GraphQl.SitecoreApiClient.RunQuery(String servicePath, GraphQLRequest request, Boolean assertNoErrors, CancellationToken cancellationToken)
at Sitecore.DevEx.Serialization.Client.Datasources.Sc.Query.SitecoreTreeDataStore.ExecuteSingleBatchQuery[T](String batchQueryFragment, TreeScope scope, ItemSpec[] specs, CancellationToken cancellationToken)
at Sitecore.DevEx.Serialization.Client.Datasources.Sc.Query.SitecoreTreeDataStore.<>c__DisplayClass21_0`1.<<CreateParallelQuery>b__0>d.MoveNext()
Internal Server Error
- have you looked at the logs on the CM?