Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Random Exception when loading a Segment

(1) ShareShare
ReportReport
Posted on by 4
We randomly get an Exception System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Exception 'ArgumentException' occured: Invalid SegmentId when opening a Realtime Segment.
 
It is not blocking and not systematic.
 
System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Exception 'ArgumentException' occured: Invalid SegmentId, CorrelationId: ff190ceb-0f8a-4298-a669-325a30a00eda
   at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricGrpcClient.ExecutePluginInternal(IRemotePluginRequest pluginRequest, ExecuteRequest executeRequest, Guid executionId, ISandboxFabricDuplexCommunicationHandler communicationHandler, Boolean returnTraceInfo, Guid organizationId, SandboxFabricCallTracker sandboxFabricCallTracker) +0x5d0
   at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricGrpcClient.ExecutePlugin(IRemotePluginRequest pluginRequest, IPluginExecutionContext executionContext, IPluginTracingService pluginTracingService, ISandboxFabricDuplexCommunicationHandler communicationHandler, ISet`1 earlySerializedPropertiesList, SandboxFabricCallTracker sandboxFabricCallTracker, ISandboxMemoryStreamProvider memoryStreamProvider) +0x2cd
   at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricCodeUnit.Execute(ILifetimeScope scope, IExecutionContext context, SandboxFabricCallTracker& sandboxFabricCallTracker, ISandboxMemoryStreamProvider memoryStreamProvider) +0x6e
   at Castle.Proxies.Invocations.ISandboxFabricCodeUnit_Execute.InvokeMethodOnTarget() +0x13
   at Castle.DynamicProxy.AbstractInvocation.Proceed() +0x2d
   at Microsoft.Xrm.RemotePlugin.Client.Interceptors.SandboxFabricPluginTraceInterceptor.Intercept(IInvocation invocation, IExecutionContext context, SandboxFabricCallTracker sandboxFabricCallTracker) +0x1f
  • Daivat Vartak (v-9davar) Profile Picture
    4,767 Super User 2025 Season 1 on at
    Random Exception when loading a Segment
    Hello FF-31101023-0,
     

    You're encountering a frustrating and intermittent error when opening Real-Time Segments in Dynamics 365 Customer Insights - Journeys (CIJ), specifically the "Invalid SegmentId" ArgumentException. This error, while not consistently blocking your work, can be disruptive and indicates an underlying issue.

    Let's break down the error and troubleshoot potential causes and solutions:

    Understanding the Error:

    • System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Exception 'ArgumentException' occured: Invalid SegmentId: This indicates that the system is trying to access a segment using an ID that it considers invalid.
    • Intermittent Nature: The fact that it happens randomly makes it harder to pin down.
    • CorrelationId: The CorrelationId (ff190ceb-0f8a-4298-a669-325a30a00eda in your example) is helpful for Microsoft support to track down the specific error.
    • Plugin Execution: The error originates within the plugin execution pipeline, suggesting a problem with how the segment ID is being passed or processed.


    •  

    Possible Causes:

    1. Data Corruption/Inconsistency:

      • The segment ID in the database might be corrupted or inconsistent.
      • There could be a mismatch between the ID in the UI and the actual ID in the database. 

    2. Caching Issues:

      • The segment ID might be cached incorrectly.
      • Clearing browser cache or restarting the browser might temporarily resolve the issue. 

    3. Synchronization Problems:

       

      • If you have any data synchronization processes between environments or systems, there might be inconsistencies in how segment IDs are handled.

    4. Plugin Errors:

      • The error originates within a plugin, suggesting a problem with how the plugin handles segment IDs.
      • This could be a bug in the plugin or a problem with the plugin's configuration. 

    5. Environment Issues:

      • There might be temporary issues with the Dynamics 365 environment or the CIJ service.
      • This could be related to server load, network problems, or other infrastructure issues. 

    6. Real-Time Segment Complexity:

      • If the segment is very complex, with many rules, this could be causing the issue.  

    7.  

    Troubleshooting Steps:

    1. Check Segment ID:

      • If possible, compare the segment ID displayed in the UI with the actual ID stored in the database.
      • Use the Dynamics 365 Web API or SDK to retrieve the segment record and verify the ID. 

    2. Clear Browser Cache and Cookies:

      • As a basic troubleshooting step, have users clear their browser cache and cookies.
      • Try using a different browser or incognito mode. 

    3. Environment Health Check:

      • Check the Dynamics 365 environment health and CIJ service status.
      • Look for any reported issues or outages. 

    4. Simplify the Segment:

      • If the segment is very complex, try to simplify it and see if the error still occurs.
      • This will help you to see if the complexity of the segment is the cause of the issue. 

    5. Review Customizations:

      • If you have any custom plugins or JavaScript code related to segments, review them carefully.
      • Look for any code that might be manipulating segment IDs. 

    6. Contact Microsoft Support:

      • This is the most crucial step, especially given the intermittent nature of the error.

      • Provide them with:

        • The complete error message, including the CorrelationId.
        • The affected segment ID.
        • Steps to reproduce the error (if possible).
        • Information about your Dynamics 365 environment and CIJ version.

        •  
         

    7.  

    Key Recommendations:

    • Escalate to Microsoft Support: Given the plugin execution error and the intermittent nature, this is likely a platform-level issue that requires Microsoft's attention.
    • Provide Detailed Information: The CorrelationId is essential for Microsoft to track down the error.
    • Monitor for Patterns: Try to identify any patterns or triggers that might be related to the error.

    •  

    By providing Microsoft Support with detailed information, you can help them diagnose and resolve the issue.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,361 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,522 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans