[CSHARP-4811] Linux /.Net 7 / mongodb.driver.core.2.21.0 - ExpressionNotSupportedException Created: 13/Oct/23 Updated: 27/Oct/23 Resolved: 17/Oct/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | LINQ3 |
| Affects Version/s: | 2.21.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Michele Lauriola | Assignee: | Boris Dogadov |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | Bug | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
| Comments |
| Comment by Boris Dogadov [ 17/Oct/23 ] |
|
Thanks for confirming michele.lauriola@gmail.com. |
| Comment by Michele Lauriola [ 16/Oct/23 ] |
|
robert@mongodb.com you're correct; it's not a bug. I overlooked the 'JustMyCode' settings. Thank you all for your assistance, and I apologize for mistakenly reporting an issue. |
| Comment by Robert Stam [ 14/Oct/23 ] |
|
This looks like it's the same issue as The exception you are observing is thrown and caught internally. It's not a bug because after catching the exception the correct actions are taken. Nonetheless we have refactored the code a bit to avoid throwing exceptions when possible. You are probably only seeing the exception because you asked the debugger to stop whenever any exception is thrown. |
| Comment by Michele Lauriola [ 14/Oct/23 ] |
|
Thank you, Boris, for your assistance. I'll attempt to create a working example in Visual Studio Code. My .NET project is quite extensive, so I'll need to extract and clean up a significant amount of content. I wanted to add one more observation: in my environment, the error surfaces when I set the 'JustMyCode' option to 'false'. Interestingly, when it's set to 'true', no errors are observed. In both scenarios, however, the functionality remains intact (i.e., the correct records are retrieved). Is it possible that the exception I'm witnessing is a managed one, triggered in a deeper layer but handled by an upper layer in the call stack with some sort of fallback? Thank you again for your help ps: I'd like to note that I couldn't reproduce the error using .NET Fiddle. Here's the link for reference: https://dotnetfiddle.net/mXGTVe |
| Comment by Boris Dogadov [ 13/Oct/23 ] |
|
I have failed to reproduce this with 2.21 driver and .NET 7 using the sample code (with both LINQ2 and LINQ3). Thanks. |
| Comment by PM Bot [ 13/Oct/23 ] |
|
Hi michele.lauriola@gmail.com, thank you for reporting this issue! The team will look into it and get back to you soon. |