cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sry
Regular Visitor

PCF - importing a solution including a custom component

Hi All,

I managed to create my first component and added it the unmanaged solution zip file and tried to import it to the production environment. However, it gives the following error with the log. 

When I import this to development environment it was successful. Why did it happen? and how to solve it because I want to import it to my production environment?

 

Thank you. 

sry_1-1599150683414.png

 


</Cell>


-<Cell ss:StyleID="s137">

<Data ss:Type="String">An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization's Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support. : Microsoft.Crm.Tools.ImportExportPublish.ImportCustomControlException: CustomControl with name SampleNamespace.TSLinearInputComponent failed to import with error: Principal user (Id=933dcf37-ee06-42af-87d9-dc8ae9cf18f0, type=8, roleCount=3, privilegeCount=1678, accessMode=0), is missing prvCreateWebResource privilege (Id=bd57cfa5-8495-4b3e-b358-da246ba797b5) on OTC=9333 for entity 'webresource'. context.Caller=933dcf37-ee06-42af-87d9-dc8ae9cf18f0. Or identityUser.SystemUserId=e9bc4b73-eb87-4658-959a-4b371ce807fb, identityUser.Privileges.Count=1836, identityUser.Roles.Count=0 is missing prvCreateWebResource privilege (Id=bd57cfa5-8495-4b3e-b358-da246ba797b5) on OTC=9333 for entity 'webresource'. ---> Microsoft.Crm.CrmSecurityException: Principal user (Id=933dcf37-ee06-42af-87d9-dc8ae9cf18f0, type=8, roleCount=3, privilegeCount=1678, accessMode=0), is missing prvCreateWebResource privilege (Id=bd57cfa5-8495-4b3e-b358-da246ba797b5) on OTC=9333 for entity 'webresource'. context.Caller=933dcf37-ee06-42af-87d9-dc8ae9cf18f0. Or identityUser.SystemUserId=e9bc4b73-eb87-4658-959a-4b371ce807fb, identityUser.Privileges.Count=1836, identityUser.Roles.Count=0 is missing prvCreateWebResource privilege (Id=bd57cfa5-8495-4b3e-b358-da246ba797b5) on OTC=9333 for entity 'webresource'.at Microsoft.Crm.BusinessEntities.SecurityLibrary.ThrowCrmSecurityException(SecurityPrincipal principal, Guid privilegeId, Int32 errorCode, ExecutionContext context)at Microsoft.Crm.BusinessEntities.SecurityLibrary.CheckPrivilege(Guid user, Guid privilege, ExecutionContext context)at Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandlerEntityPrivilegeCheck(Object sender, SecurityTraits traits, SecurityAttributes attributes, ExtensionEventArgs e)at Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateSecurityCheck(Object sender, ExtensionEventArgs e, BusinessEntity entity)at Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandler(ExtensionEventArgs e, Object sender)at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreCreateEventHandler.Invoke(Object sender, ExtensionEventArgs e)at Microsoft.Crm.BusinessEntities.BusinessProcessObject.<>c__DisplayClass224_0.<Create>b__0()at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)at Microsoft.Crm.ObjectModel.WebResourceService.Create(IBusinessEntity entity, Boolean verifyDuplicateName, Boolean flushCache, ExecutionContext context)at Microsoft.Crm.Tools.ImportExportPublish.CustomControlsInstaller.CreateWebResource(WebResource webResource, String fileContent, IWebResourceService webResourceService, ExecutionContext context)at Microsoft.Crm.Tools.ImportExportPublish.CustomControlsInstaller.AddWebResource(CustomControlResourceDefinition resource, ExecutionContext context, IWebResourceService webResourceService, String customControlNamespace, String customControlConstructor)at Microsoft.Crm.Tools.ImportExportPublish.CustomControlsInstaller.Install() --- End of inner exception stack trace --- at Microsoft.Crm.Tools.ImportExportPublish.CustomControlsInstaller.Install()at Microsoft.Crm.Tools.ImportExportPublish.ImportCustomControlsHandler.ImportItem()</Data>

</Cell>

3 REPLIES 3
timl
Super User III
Super User III

Hi @sry 

I suspect this is a permissions related problem.

timl_0-1599160569049.png

 

This is what the documentation says:

https://docs.microsoft.com/en-us/powerapps/developer/component-framework/get-powerapps-cli

 

>> To deploy your code component using Power Apps CLI, you must have a Common Data Service environment with system administrator or system customizer privileges.

 

Therefore, the first thing I would do is to check that you have sufficient CDS privileges.

sry
Regular Visitor

Hi,

 

I used to be the system admin of that production environment.

Based on your advice, I went to the powerplatform admin center.

But the production environment is not listed in the admin center any more 😞

But I am still able to select that environment  in the environment dropdown.

Maybe this causes that issue. 

Should I raise a support ticket for this? or are there any ways to solve this bug? 

 

Thank you 

timl
Super User III
Super User III

Hi @sry 

Yes, I think it would be a good idea to raise a support ticket for this, especially as you can't see your production environment in the admin center.

If it turns out not to be a permissions problem, perhaps you could update this post in case other users experience the same issue?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (42,070)