NullReferenceException during DatastoreDb.Create in F# .NET Core app
See original GitHub issueIn an empty F# .NET Core application this line of code throws a NullReferenceException
:
let db = DatastoreDb.Create "<some-project-id>"
These are the exception details:
Exception message: Object reference not set to an instance of an object.
Exception type: System.NullReferenceException
Stack trace: at Google.Api.Gax.Grpc.UserAgentBuilder.AppendDotNetEnvironment()
at Google.Api.Gax.Grpc.ServiceSettingsBase..ctor()
at Google.Cloud.Datastore.V1.DatastoreClientImpl..ctor(DatastoreClient grpcClient, DatastoreSettings settings)
at Google.Cloud.Datastore.V1.DatastoreClient.Create(Channel channel, DatastoreSettings settings)
at Google.Cloud.Datastore.V1.DatastoreDb.Create(String projectId, String namespaceId, DatastoreClient client)
at Program.subscribeToMailingList(Subscriber subscriber)
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
How can I resolve null reference exception in ASP.net Core ...
Why am I getting a null reference exception at @Html.DisplayNameFor(model => model.Contacts) and how can I fix it? ... What is being passed...
Read more >How to fix "System.NullReferenceException" When ...
I'm using ASP.net Core App to connect to MSSQL database. I checked the connection when - Connect to Database and the database is...
Read more >System.NullReferenceException message in creating ...
Hi everyone, I created a localdb sql server file(School.mdf) in the App_Data folder in an MVC project using .Net Framework 4.8.
Read more >NullReferenceException when opening file
NET Core 3.1 solution with C# classes and a SQL project with sql file. When I close the tab and open the file...
Read more >Issues with System.NullReferenceException occurrence ...
NET Core 3.1 is breaking when starting the web application because of a NullReferenceException, but this one is thrown in the IISHttpServer.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok makes sense. Well… that is sort of the beauty of OpenSource 😃 I love FSharp and the gcloud, this SDK is brilliant and my project relies on it and I don’t want to be blocked until this is resolved, so it was kind of my duty to investigate until I can keep moving, right? 😉
Also happy to help where I can!
Thanks very much for reporting this. It sounds like
Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default
is probably returning null. We’ll look into it.