Skip to content

Unable to cast object of type 'generatedProxy_3' to type 'Microsoft.PowerPlatform.Dataverse.Client.IOrganizationServiceAsync' #219

Closed

Description

@Dashulol

Using Microsoft.PowerPlatform.Dataverse.Client 0.5.10

I got an Azure function with a Blob trigger that parses the blobs and writes to Dynamics 365 CE. Was working fine until the frequency of Blobs uploaded increased drastically. First I was seeing the error

Unable to cast object of type 'generatedProxy_2' to type 'Microsoft.PowerPlatform.Dataverse.Client.IOrganizationServiceAsync'

I read through #48 and added

RequireNewInstance=true

to the connectionString.

Now it looks like more Blobs get processed but the majority now produces the very similar exception

Unable to cast object of type 'generatedProxy_3' to type 'Microsoft.PowerPlatform.Dataverse.Client.IOrganizationServiceAsync'

Activity

  1. Dashulol commented on Dec 16, 2021

    @Dashulol
    Author

    Setting UseWebApi = false drastically reduced the issue, Did not fully resolve, Now I'm seeing generatedProxy_2 again.

  2. MattB-msft commented on Dec 18, 2021

    @MattB-msft
    Member

    Sascha (@Dashulol) can you link a repro of your use case? that would help us understand what is happening as it sounds like a threading issue.

  3. MattB-msft commented on Feb 17, 2022

    @MattB-msft
    Member

    We have refactored some of the client code in this upcoming release to see if we can lock this down. or at least give us a better understanding of where the type is getting lost.

    should be in the next update.

  4. added
    Investigating
    on Feb 17, 2022
  5. sdhz236 commented on Mar 26, 2022

    @sdhz236

    MattB (@MattB-msft) I still occasionally got the error "Unable to cast object of type 'generatedProxy_2' to type 'Microsoft.PowerPlatform.Dataverse.Client.IOrganizationServiceAsync'", The version of Microsoft.powerplatform.dataverse.client is 0.6.1. Could you give me some suggestion how to fix this error. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Investigating

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions