Plug-in type With Id = GUID Does Not Exist

We suddenly started getting following exception on one of our CRM environment.

Unhandled Exception: System.Web.Services.Protocols.SoapException:
Server was unable to process request. Detail:

0x80040217
plugintype With Id = 6ba57788-1975-df11-8b26-0050568d68ea Does Not Exist Platform

Cause:

The reason this error occurred on our environment is that we had plug in assembly registered on crm database as Database deployment and we then unregister the assembly and registered it again which caused problem because steps of the previous assembly was already there in the database (even though they are marked for deletion).

Resolution:

This is tricky problem and might need unsupported SQL delete of the records which are corrupted.

IMP. NOTE: This is unsupported and you should back up your SQL before doing any changes. If you got MS support then it is better to contact them for this tricky issue.

Basically you need to delete or check records regarding this plug in type and store all the rows you remove in excel file because you might need to refer it again to get the relevant Guid.
Firstly let me explain the list of table which stored plug in related details.

PluginTypeBase – all individual Plug In (classes) will be stored in this table.

PluginTypeBaseIds – This is GUID of the record from PluginTypeBase table (this table links individual class with other tables in CRM).

SdkMessageProcessingStepBase – This table stores all the steps related to particular class

SdkMessageProcessingStepBaseIds – This table stores GUID of the record from SdkMessageProcessingStepBase table.

SdkMessageProcessingStepImageBase – This tale stores image s details related to steps.

SdkMessageProcessingStepSecureConfigBase – This table stores any configuration related to this plug-In type.

Now let’s do select queries first to see all records are relevant to our plug–in type and then we need to just replace delete command with select to remove related records from database.

select * from PluginTypeBaseIds where PluginTypeId = GUID
(e.g. select * from PluginTypeBaseIds where PluginTypeId = 'FB270B8E-B48D-DF11-8D06-18A90547D5EE')

SELECT * FROM PluginTypeBase where PluginTypeId = GUID

SELECT * FROM [SdkMessageProcessingStepBase] where PluginTypeId = GUID

SELECT * FROM [SdkMessageProcessingStepBaseIds] where [SdkMessageProcessingStepId] in (Select
SdkMessageProcessingStepId FROM [SdkMessageProcessingStepBase]
where PluginTypeId = GUID)

SELECT * FROM [SdkMessageProcessingStepImageBase] where [SdkMessageProcessingStepId] in (Select
SdkMessageProcessingStepId FROM [SdkMessageProcessingStepBase]
(Select SdkMessageProcessingStepId FROM [SdkMessageProcessingStepBase]where PluginTypeId = GUID)

SELECT * FROM [SdkMessageProcessingStepSecureConfigBase]

Verify that above queries gives you only record related to your plug-in Type , so read the description column on each row and make sure this is related to your plug in type only, Now we need to start deleting records from bottom tables to top.

-> SdkMessageProcessingStepSecureConfigBase table first (only row related to your plug in type and if your plug in type does not have related record in this table ignore this one) and then

-> SdkMessageProcessingStepImageBase (only record related to your GUID) and then

-> SdkMessageProcessingStepBaseIds (you may need to do this after sdkMessageProcessingStepBase so store Guid
and then delete after you delete records from sdkMessageProcessingStepBase table) (only record related to your
GUID)

-> SdkMessageProcessingStepBase (only record related to your GUID)

-> PluginTypeBaseIds (only record related to your GUID)

-> PluginTypeBase (only record related to your GUID)

After all delete queries are run successfully restart CRM Service and Asynchronous Service..

Hope this helps, if need more information please put comments on this post and I will respond with more details ..

Cheers,
MayankP 🙂

Advertisements

9 thoughts on “Plug-in type With Id = GUID Does Not Exist

  1. Rafal

    Great post!

    But I’ve one question more. I successfuly deleted one old plugin. I checked all related tables – everything looks clean now, I don’t see any rows related to deleted plugin in tables SdkMessageProcessingStepBase, SdkMessageProvessintStepBaseIds.
    But when I try to remove some entities in CRM that were related to deleted plugin, I get an error “Cannot delete component” and I see a list with some dependent components of type “Sdk Message Processing Step” but without any display name or id.
    How can I find out which Message Processing Steps are still associated with my entities and how to delete them?

    Reply
    1. mayankp Post author

      Hi Rafal,
      I assume this question is for CRM 4.0, in this case you can open plugin registration tool and display the list by Entities to see if there is plug in associated with this entity.

      if you want to find this in SQL in then first you need run following kind of query..

      SELECT * FROM [SdkMessageFilterBase] where [PrimaryObjectTypeCode]=1

      above query runs for account (becuase obecttypedcode is 1 for account), similarly pass your Entity object type code and see what results you getting.

      this SdkMessageFilterId will be refered in your SdkMessageProcessingStepBase table which needs to be check/verified and may be removed..

      Since all above changes are unsupported and you should back up your SQL before doing any changes.

      Hope this helps..

      Reply
      1. Rafal

        Hi, thanks for your reply.

        Actually it’s CRM 2011. I try to remove old plugins and entities that were installed in CRM 4.0 and then migrated to CRM 2011.

        I tried your ssuggestion but still have some problems. For example – when I try to remove one entity I get information about 3 dependent SdkMessageProcessingSteps. ObjectTypeCode for this entity is f.e. 10008.

        Query SELECT * from dbo.SdkMessageFilterBase where PrimaryObjectTypeCode = 10008 gives me 8 rows (not 3).

        And then query SELECT * FROM dbo.SdkMessageProcessingStepBase where SdkMessageFilterId IN (SELECT SdkMessageFilterId from dbo.SdkMessageFilterBase where PrimaryObjectTypeCode = 10008) gives me 11 rows.

        So I deleted all those rows from tables: SdkMessageProcessingStepBase, SdkMessageProcessingStepBaseIds, SdkMessageFilterBase and SdkMessageFilterBaseIds, but still can’t remove my entity in CRM, because of dependent Message Processing steps.

        Are there any other tables that I should clean up? SdkMessage table?

  2. mayankp Post author

    Hi Refal,
    Best thing to do is make plug in registration tool (of CRM 2011) connect to your orgination and see what plugins are displayed in that, the one which are giving error you can remove them and see if this works.. (if you not sure which one plug in cusing issue, try removing one at a time)..

    Since plug in registration is supported way to remove them, this should not cause any issue in your CRM system..

    Reply
  3. Santiago

    I found a super easy solution. You must open a new solution CRM2011 -> in the “components” -> you should go to -> Processing Mesage SDK —> in this option you must click the “add existing”, select the step broken which will be marked as “(profiler)” and disable it.

    And that’s all

    By SCL (Avanade)

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s