cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Teresa24486
Super User
Super User

Unable to open the CDS app

Hi,

 

Strangely, I am unable to open all of my CDS app from a single environment or share it with the users. Anything wrong? This is the message:

 

Teresa24486_0-1639046079137.png

 

Below is the exception error:

 

{"httpStatusCode":500,"data":{"Message":"The type initializer for 'Microsoft.Crm.Extensibility.ODataV4.EdmModelProvider' threw an exception.","ExceptionMessage":"The type initializer for 'Microsoft.Crm.Extensibility.ODataV4.EdmModelProvider' threw an exception.","ExceptionType":"System.TypeInitializationException","StackTrace":" at Microsoft.Crm.Extensibility.ODataV4.EdmModelProvider.GetModel(ModelVersion modelVersion, ModelVisibility modelVisibility)\r\n at lambda_method(Closure , ServiceProvider )\r\n at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)\r\n at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.<>c__DisplayClass1_0.<Parse>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataUtilities.InvokeActionAndLogMetric[R,T](Func`1 action, XrmTelemetrySingletonActivityType`1 activityType)\r\n at System.Web.OData.Routing.ODataPathRouteConstraint.Match(HttpRequestMessage request, IHttpRoute route, String parameterName, IDictionary`2 values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.ProcessConstraint(HttpRequestMessage request, Object constraint, String parameterName, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.ProcessConstraints(HttpRequestMessage request, HttpRouteValueDictionary values, HttpRouteDirection routeDirection)\r\n at System.Web.Http.Routing.HttpRoute.GetRouteData(String virtualPathRoot, HttpRequestMessage request)\r\n at System.Web.Http.WebHost.Routing.HttpWebRoute.GetRouteData(HttpContextBase httpContext)","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"The type initializer for 'Microsoft.OData.Edm.Vocabularies.V1.VocabularyModelProvider' threw an exception.","ExceptionType":"System.TypeInitializationException","StackTrace":" at Microsoft.OData.Edm.EdmModelBase..ctor(IEnumerable`1 referencedModels, IEdmDirectValueAnnotationsManager annotationsManager, Boolean includeDefaultVocabularies)\r\n at Microsoft.Crm.Extensibility.OpenApi.Cache.OpenApiEdmModelCacheLoader.GetStrippedModel(ModelVersion version, ModelVisibility visibility, IMetadataCacheDataProvider provider)\r\n at Microsoft.Crm.Extensibility.OpenApi.Controller.CachingFlowOpenApiController.GetOrAddJsonModelAsync(OpenApiModelKey key)\r\n at Microsoft.Cds.Core.Caching.File.FileCache`2.<>c__DisplayClass26_0.<<GetOrAddAsync>b__0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Cds.Core.Caching.File.FileCache`2.<GetOrAddAsync>d__26.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OpenApi.Controller.CachingFlowOpenApiController.<ExecuteRequestAndCacheResponseAsync>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OpenApi.Controller.CachingFlowOpenApiController.<<GetAsync>b__5_0>d.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OpenApi.Controller.CachingFlowOpenApiController.<GetAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"Exception of type 'System.OutOfMemoryException' was thrown.","ExceptionType":"System.OutOfMemoryException","StackTrace":" at Microsoft.OData.Edm.Csdl.Parsing.CsdlDocumentParser.CreateRootElementParser()\r\n at Microsoft.OData.Edm.Csdl.Parsing.CsdlDocumentParser.TryGetDocumentElementParser(Version csdlArtifactVersion, XmlElementInfo rootElement, XmlElementParser`1& parser)\r\n at Microsoft.OData.Edm.Csdl.Parsing.Common.XmlDocumentParser`1.TryGetRootElementParser(Version artifactVersion, XmlElementInfo rootElement, XmlElementParser& parser)\r\n at Microsoft.OData.Edm.Csdl.Parsing.Common.XmlDocumentParser.ParseDocumentElement()\r\n at Microsoft.OData.Edm.Csdl.Parsing.CsdlParser.AddReader(XmlReader csdlReader, String source)\r\n at Microsoft.OData.Edm.Csdl.Parsing.CsdlParser.TryParse(IEnumerable`1 csdlReaders, CsdlModel& entityModel, IEnumerable`1& errors)\r\n at Microsoft.OData.Edm.Csdl.SchemaReader.TryParse(IEnumerable`1 readers, IEnumerable`1 references, Boolean includeDefaultVocabularies, IEdmModel& model, IEnumerable`1& errors)\r\n at Microsoft.OData.Edm.Vocabularies.V1.VocabularyModelProvider.LoadSchemaEdmModel(Assembly assembly, String vocabularyName, IEnumerable`1 referenceModels)\r\n at Microsoft.OData.Edm.Vocabularies.V1.VocabularyModelProvider..cctor()"}},"ErrorCode":"0x0"}}
 
Please advise.
1 ACCEPTED SOLUTION

Accepted Solutions
Teresa24486
Super User
Super User

Hi @rampprakash ,

Thank you for the suggestion. It was my browser cache that caused this issue. I cleared them and it worked as expected. 

View solution in original post

2 REPLIES 2
rampprakash
Super User
Super User

Hello @Teresa24486,

 

Not Sure my suggestion help you

 

1. Make Sure Logged in user have proper security Role

2. Make Sure Model Driven app have proper security Roles

 

If both of them not helping try raising Support Ticket to Microsoft to get it fixed.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Teresa24486
Super User
Super User

Hi @rampprakash ,

Thank you for the suggestion. It was my browser cache that caused this issue. I cleared them and it worked as expected. 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (3,751)