[CSHARP-4551] Avoid using PID when generating ObjectIds Created: 28/Feb/23 Updated: 28/Oct/23 Resolved: 29/Mar/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 2.19.2 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Isaac Borrero | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes: | Not Needed | ||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
|
The C# BSON creates a ObjectId value with a call to System.Diagnostics.Process.GetCurrentProcess().Id. The Blazor Webassembly framework does not support calls to Process.GetCurrentProcess() (see here and here and here). Are there any plans to fix this? |
| Comments |
| Comment by Patrick Gilfether [ 18/May/23 ] |
|
b.dhokia@gmail.com Thanks for following up. We'll be releasing this fix in 2.19.2. We're aiming to publish that nuget package this week or early next. |
| Comment by Bhavik Dhokia [ 18/May/23 ] |
|
So is this resolved in the 2.19.1 nuget available on nuget.org as I'm still facing the same issue.
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] |
| Comment by Githook User [ 18/May/23 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by Bhavik Dhokia [ 25/Apr/23 ] |
|
I also face this issue so looking forward to the release. Any ideas when it will be available on nuget.org as I can't see it available at the moment. |
| Comment by Githook User [ 29/Mar/23 ] |
|
Author: {'name': 'Dmitry Lukyanov', 'email': 'dmitry.lukyanov@mongodb.com', 'username': 'DmitryLukyanov'}Message: |
| Comment by Isaac Borrero [ 28/Feb/23 ] |
|
While I would LOVE, LOVE, LOVE for you to fix this, I understand if its not a priority. I am trying to determine if I should build a permanent workaround into my project. |
| Comment by Isaac Borrero [ 28/Feb/23 ] |
|
Yes, the inner exception is 'System.PlatformNotSupportedException', while the outer exception is System.TypeInitializationException. |
| Comment by Dmitry Lukyanov (Inactive) [ 28/Feb/23 ] |
|
Hey isaac.borrero@firestar.io, thanks for your report, can you please confirm that you see a "PlatformNotSupportedException" exception in your case? |