<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:49:22 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-4793] Unable to cast object of type &apos;MongoDB.Bson.BsonNull&apos; to type &apos;MongoDB.Bson.BsonDocument</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4793</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h3&gt;&lt;a name=&quot;Account%2FCompanyName%3ASynergySportsTechnologyLLC&quot;&gt;&lt;/a&gt;Account/Company Name: Synergy Sports Technology LLC&lt;/h3&gt;

&lt;h3&gt;&lt;a name=&quot;IssueRelevantInfo&quot;&gt;&lt;/a&gt;Issue + Relevant Info&lt;/h3&gt;

&lt;p&gt;Customer is getting the following error message in their C# code after upgrading to version 7.0. They are running changeStream and their code requires pre- and post-images (have &lt;span class=&quot;error&quot;&gt;&amp;#91;&lt;font color=&quot;red&quot;&gt;changeStreamPreAndPostImages.enabled: true&lt;/font&gt;&amp;#93;&lt;/span&gt; set)&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;System.InvalidCastException: Unable to cast object of type &apos;MongoDB.Bson.BsonNull&apos; to type &apos;MongoDB.Bson.BsonDocument&apos;.&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at MongoDB.Bson.BsonValue.get_AsBsonDocument()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;at MongoDB.Driver.ChangeStreamDocument`1.get_FullDocumentBeforeChange()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;They are running C# version 2.20.0 and is compatible with 7.0&lt;br/&gt;
&lt;a href=&quot;https://www.mongodb.com/docs/drivers/csharp/current/compatibility/#std-label-csharp-compatibility-tables&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/drivers/csharp/current/compatibility/#std-label-csharp-compatibility-tables&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Found this Jira that might be related - &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4745&quot; title=&quot;Unable to cast object of type &amp;#39;MongoDB.Bson.BsonArray&amp;#39; to type &amp;#39;MongoDB.Bson.BsonDocument&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4745&quot;&gt;&lt;del&gt;CSHARP-4745&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Portion of customer&apos;s code snippets they use for changeStreams:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;await database.WatchAsync(pipeline, new ChangeStreamOptions&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;ResumeAfter = token.Token,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;FullDocument = ChangeStreamFullDocumentOption.WhenAvailable,&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;FullDocumentBeforeChange = ChangeStreamFullDocumentBeforeChangeOption.WhenAvailable&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}, cancellationToken);&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;this gets full document from &lt;font color=&quot;red&quot;&gt;ChangeStreamDocument&amp;lt;BsonDocument&amp;gt;&lt;/font&gt; change like this:&lt;br/&gt;
var fullDocument = change.FullDocument != default ? change.FullDocument : change.FullDocumentBeforeChange; - this line throws an exception&lt;/p&gt;

&lt;h3&gt;&lt;a name=&quot;RequestedAction&quot;&gt;&lt;/a&gt;Requested Action&lt;/h3&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Investigate and advise what may be the cause and workaround&lt;/li&gt;
	&lt;li&gt;Verify if this is may be related to &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-4745&quot; title=&quot;Unable to cast object of type &amp;#39;MongoDB.Bson.BsonArray&amp;#39; to type &amp;#39;MongoDB.Bson.BsonDocument&amp;#39;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-4745&quot;&gt;&lt;del&gt;CSHARP-4745&lt;/del&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;&lt;a name=&quot;Status&quot;&gt;&lt;/a&gt;Status&lt;/h3&gt;

&lt;div class=&apos;table-wrap&apos;&gt;
&lt;table class=&apos;confluenceTable&apos;&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Customer Name&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Synergy Sports Technology LLC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Is the customer production-down NOW?&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;*&lt;b&gt;NO&lt;/b&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Intercom/Case Link and Severity &lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt; NA &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Link to Cluster&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;&lt;a href=&quot;https://cloud.mongodb.com/v2/61e98f04d065906449efedd2#/clusters/detail/baseball&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Org/Project/Cluster Link&lt;/a&gt; - (M20 Instance)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Affected Nodes &amp;amp; Status&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;Have I attempted to restart the affected nodes?&lt;/td&gt;
&lt;td class=&apos;confluenceTd&apos;&gt;*&lt;b&gt;NO&lt;/b&gt;*&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</description>
                <environment></environment>
        <key id="2445199">CSHARP-4793</key>
            <summary>Unable to cast object of type &apos;MongoDB.Bson.BsonNull&apos; to type &apos;MongoDB.Bson.BsonDocument</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="raymond.chan@mongodb.com">Raymond Chan</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Sep 2023 18:50:07 +0000</created>
                <updated>Wed, 20 Sep 2023 18:11:06 +0000</updated>
                            <resolved>Wed, 20 Sep 2023 18:11:06 +0000</resolved>
                                                                    <component>Change Streams</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5718911" author="raymond.chan" created="Wed, 20 Sep 2023 18:09:59 +0000"  >&lt;p&gt;recreated this request in HELP-50259&#160; to set to the correct project type&lt;/p&gt;

&lt;p&gt;closing this ticket&lt;/p&gt;</comment>
                            <comment id="5715758" author="raymond.chan" created="Tue, 19 Sep 2023 17:51:42 +0000"  >&lt;p&gt;Customer observed that the errors seems to be related to&#160; &lt;font color=&quot;#FF0000&quot;&gt;ChangeStreamDocument.OperationType == Delete&lt;/font&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                                                <inwardlinks description="backports">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_13552" key="com.go2group.jira.plugin.crm:crm_generic_field">
                        <customfieldname>Case</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[[5006R00001wNCqKQAW]]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14266" key="com.atlassian.jira.plugin.system.customfieldtypes:textarea">
                        <customfieldname>Documentation Changes Summary</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>&lt;p&gt;1. What would you like to communicate to the user about this feature?&lt;br/&gt;
2. Would you like the user to see examples of the syntax and/or executable code and its output?&lt;br/&gt;
3. Which versions of the driver/connector does this apply to?&lt;/p&gt;</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i290gg:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>